From 3844cf92595c85ffe35345f142a3c2be718e782c Mon Sep 17 00:00:00 2001 From: Erick Fejta Date: Thu, 20 Feb 2020 16:47:37 -0800 Subject: [PATCH] Prepare trusted jobs for RBE --- .bazelrc | 4 ++++ rbe/install-k8s-prow.sh | 8 +++++--- rbe/install.sh | 16 ++++++++-------- 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/.bazelrc b/.bazelrc index 0bfac359a75f..aa0982d47068 100644 --- a/.bazelrc +++ b/.bazelrc @@ -62,9 +62,13 @@ run:remote --experimental_remote_download_outputs=all --noexperimental_inmemory_ # --config=ci-instance adds the instance name build:ci-instance --remote_instance_name=projects/k8s-prow-builds/instances/default_instance +build:trusted-instance --remote_instance_name=projects/k8s-prow/instances/default_instance # Config we want to use in ci build:ci --config=remote --config=ci-instance +# Config we want trusted jobs to use +build:trusted --config=remote --config=trusted-instance + # https://github.com/bazelbuild/rules_go/pull/2110#issuecomment-508713878 build --stamp=true diff --git a/rbe/install-k8s-prow.sh b/rbe/install-k8s-prow.sh index 0736988710d7..feebfa9d1ef8 100755 --- a/rbe/install-k8s-prow.sh +++ b/rbe/install-k8s-prow.sh @@ -22,7 +22,9 @@ pool=prow-pool workers=20 disk=600 machine=n1-standard-2 -#bot=pr-kubekins@kubernetes-jenkins-pull.iam.gserviceaccount.com -bot=TODO(fejta):pick-a-different-service-account +bots=( + deployer@k8s-prow.iam.gserviceaccount.com + pusher@k8s-prow.iam.gserviceaccount.com +) -"$(dirname "$0")/install.sh" "$proj" "$pool" "$workers" "$disk" "$machine" "$bot" +"$(dirname "$0")/install.sh" "$proj" "$pool" "$workers" "$disk" "$machine" "${bots[@]}" diff --git a/rbe/install.sh b/rbe/install.sh index d850e02bc789..e7bed406be73 100755 --- a/rbe/install.sh +++ b/rbe/install.sh @@ -17,8 +17,8 @@ set -o errexit set -o nounset set -o pipefail -if [[ $# -lt 1 ]]; then - echo "Usage: $(basename "$0") [pool-name]" >&2 +if [[ $# -lt 6 ]]; then + echo "Usage: $(basename "$0") " >&2 exit 1 fi @@ -28,16 +28,16 @@ fi # More info: https://cloud.google.com/remote-build-execution/docs/overview proj=$1 -pool=${2:-} -workers=${3:-200} -disk=${4:-600} -machine=${5:-n1-standard-2} -bot=${6:-pr-kubekins@kubernetes-jenkins-pull.iam.gserviceaccount.com} +pool=$2 +workers=$3 +disk=$4 +machine=$5 +shift 5 users=() groups=() bots=( - "$bot" + "$@" ) log() {