@@ -31,9 +31,12 @@ BOOTKUBE_REPO=${BOOTKUBE_REPO:-}
3131BOOTKUBE_VERSION=${BOOTKUBE_VERSION:- }
3232COREOS_CHANNEL=${COREOS_CHANNEL:- ' coreos-stable' }
3333WORKER_COUNT=4
34- GCE_PREFIX=${GCE_PREFIX:- ' bootkube-ci' }
3534SELF_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+
3740function 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 {
4649function 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 " "
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 ) "
119122fi
0 commit comments