talos/hack/test/gce-setup.sh
Spencer Smith 9e02c77c0a chore: add azure e2e testing
This PR will allow us to run an azure e2e test in parallel with our
current GCE implementation.

Signed-off-by: Spencer Smith <robertspencersmith@gmail.com>
2019-08-07 12:16:32 -04:00

19 lines
871 B
Bash
Executable File

#!/bin/bash
set -eou pipefail
## Setup svc acct
echo $GCE_SVC_ACCT | base64 -d > /tmp/svc-acct.json
apk add --no-cache python
wget https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-253.0.0-linux-x86_64.tar.gz
tar -xf google-cloud-sdk-253.0.0-linux-x86_64.tar.gz
./google-cloud-sdk/install.sh --disable-installation-options --quiet
./google-cloud-sdk/bin/gcloud auth activate-service-account --key-file /tmp/svc-acct.json
## Push talos-gce to storage bucket
./google-cloud-sdk/bin/gsutil cp ./build/talos-gce.tar.gz gs://talos-e2e
## Create image from talos-gce
./google-cloud-sdk/bin/gcloud --quiet --project talos-testbed compute images delete talos-e2e || true ##Ignore error if image doesn't exist
./google-cloud-sdk/bin/gcloud --quiet --project talos-testbed compute images create talos-e2e --source-uri gs://talos-e2e/talos-gce.tar.gz