Skip to content
This repository was archived by the owner on Jul 30, 2021. It is now read-only.

Commit d1a45d8

Browse files
author
Patrick Baxter
committed
hack/tests: make more gce options configurable
1 parent de62c72 commit d1a45d8

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

hack/tests/conformance-gce.sh

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,12 @@ BOOTKUBE_REPO=${BOOTKUBE_REPO:-}
3131
BOOTKUBE_VERSION=${BOOTKUBE_VERSION:-}
3232
COREOS_CHANNEL=${COREOS_CHANNEL:-'coreos-stable'}
3333
WORKER_COUNT=4
34-
GCE_PREFIX=${GCE_PREFIX:-'bootkube-ci'}
3534
SELF_HOST_ETCD=${SELF_HOST_ETCD:-false}
3635

36+
GCE_PREFIX=${GCE_PREFIX:-'bootkube-ci'}
37+
GCE_SERVICE_ACCOUNT=${GCE_SERVICE_ACCOUNT:-'bootkube-ci'}
38+
GCE_PROJECT=${GCE_PROJECT:-coreos-gce-testing}
39+
3740
function cleanup {
3841
gcloud compute instances delete --quiet --zone us-central1-a ${GCE_PREFIX}-m1 || true
3942
gcloud compute firewall-rules delete --quiet ${GCE_PREFIX}-api-443 || true
@@ -46,8 +49,8 @@ function cleanup {
4649
function init {
4750
curl https://sdk.cloud.google.com | bash
4851
source ~/.bashrc
49-
gcloud config set project coreos-gce-testing
50-
gcloud auth activate-service-account ${GCE_PREFIX}@coreos-gce-testing.iam.gserviceaccount.com --key-file=/build/keyfile
52+
gcloud config set project ${GCE_PROJECT}
53+
gcloud auth activate-service-account ${GCE_SERVICE_ACCOUNT}@${GCE_PROJECT}.iam.gserviceaccount.com --key-file=/build/keyfile
5154
apt-get update && apt-get install -y jq
5255

5356
ssh-keygen -t rsa -f /root/.ssh/id_rsa -N ""
@@ -113,7 +116,7 @@ else
113116
)
114117

115118
#TODO(pb): See if there is a way to make the --inherit-env option replace
116-
#passing all the variables manually.
119+
#passing all the variables manually.
117120
sudo rkt run --insecure-options=image ${RKT_OPTS} docker://golang:1.7.4 --exec /bin/bash -- -c \
118-
"IN_CONTAINER=true BOOTKUBE_REPO=${BOOTKUBE_REPO} BOOTKUBE_VERSION=${BOOTKUBE_VERSION} COREOS_CHANNEL=${COREOS_CHANNEL} GCE_PREFIX=${GCE_PREFIX} SELF_HOST_ETCD=${SELF_HOST_ETCD} /build/bootkube/hack/tests/$(basename $0)"
121+
"IN_CONTAINER=true BOOTKUBE_REPO=${BOOTKUBE_REPO} BOOTKUBE_VERSION=${BOOTKUBE_VERSION} COREOS_CHANNEL=${COREOS_CHANNEL} GCE_PREFIX=${GCE_PREFIX} GCE_SERVICE_ACCOUNT=${GCE_SERVICE_ACCOUNT} GCE_PROJECT=${GCE_PROJECT} SELF_HOST_ETCD=${SELF_HOST_ETCD} /build/bootkube/hack/tests/$(basename $0)"
119122
fi

0 commit comments

Comments
 (0)