Skip to content

Commit

Permalink
Prepare trusted jobs for RBE
Browse files Browse the repository at this point in the history
  • Loading branch information
fejta committed Feb 21, 2020
1 parent 401a772 commit 3844cf9
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 11 deletions.
4 changes: 4 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -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
8 changes: 5 additions & 3 deletions rbe/install-k8s-prow.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ pool=prow-pool
workers=20
disk=600
machine=n1-standard-2
#[email protected]
bot=TODO(fejta):pick-a-different-service-account
bots=(
[email protected]
[email protected]
)

"$(dirname "$0")/install.sh" "$proj" "$pool" "$workers" "$disk" "$machine" "$bot"
"$(dirname "$0")/install.sh" "$proj" "$pool" "$workers" "$disk" "$machine" "${bots[@]}"
16 changes: 8 additions & 8 deletions rbe/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ set -o errexit
set -o nounset
set -o pipefail

if [[ $# -lt 1 ]]; then
echo "Usage: $(basename "$0") <gcp-project-id> [pool-name]" >&2
if [[ $# -lt 6 ]]; then
echo "Usage: $(basename "$0") <gcp-project-id> <pool-name> <workers:200> <diskgb:600> <machine:n1-standard-2> <bot ...>" >&2
exit 1
fi

Expand All @@ -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() {
Expand Down

0 comments on commit 3844cf9

Please sign in to comment.