talos/hack/test/gcp-setup.sh
Spencer Smith ce7a0e36cc chore: re-enable e2e testing
This PR will re-enable e2e testing by using the new cluster api
bootstrap provider and various infra providers.

Signed-off-by: Spencer Smith <robertspencersmith@gmail.com>
2019-11-05 16:53:38 -05:00

23 lines
709 B
Bash
Executable File

#!/bin/bash
set -eou pipefail
TMP=/tmp/e2e/gcp
mkdir -p ${TMP}
## Setup svc acct
echo $GCE_SVC_ACCT | base64 -d > ${TMP}/svc-acct.json
gcloud auth activate-service-account --key-file ${TMP}/svc-acct.json
## Push talos-gcp to storage bucket
gsutil cp ./build/gcp.tar.gz gs://talos-e2e/gcp-${SHA}.tar.gz
## Create image from talos-gcp
gcloud --quiet --project talos-testbed compute images delete talos-e2e-${SHA} || true ##Ignore error if image doesn't exist
gcloud --quiet --project talos-testbed compute images create talos-e2e-${SHA} --source-uri gs://talos-e2e/gcp-${SHA}.tar.gz
## Setup the cluster YAML.
sed -e "s/{{TAG}}/${SHA}/" ${PWD}/hack/test/manifests/gcp-cluster.yaml > ${TMP}/cluster.yaml