diff --git a/dev/staging/cloudbuild.yaml b/dev/staging/cloudbuild.yaml index 2891346ec..f380412f0 100644 --- a/dev/staging/cloudbuild.yaml +++ b/dev/staging/cloudbuild.yaml @@ -6,6 +6,7 @@ options: steps: - name: golang:1.19 + waitFor: ['-'] env: - PULL_BASE_REF=$_PULL_BASE_REF - VERSION=$_GIT_TAG @@ -13,7 +14,8 @@ steps: - DOCKER_IMAGE_PREFIX=$_DOCKER_IMAGE_PREFIX - ARTIFACT_LOCATION=$_ARTIFACT_LOCATION entrypoint: dev/staging/push-etcdadm.sh -- name: golang:1.19 +- name: gcr.io/google.com/cloudsdktool/google-cloud-cli:slim + waitFor: ['-'] env: - PULL_BASE_REF=$_PULL_BASE_REF # We don't pass version; we want to use our own version tagging from git diff --git a/dev/staging/push-etcdadm.sh b/dev/staging/push-etcdadm.sh index 51ff537a8..c920914a4 100755 --- a/dev/staging/push-etcdadm.sh +++ b/dev/staging/push-etcdadm.sh @@ -34,6 +34,22 @@ if [[ "${ARTIFACT_LOCATION}" != */ ]]; then ARTIFACT_LOCATION="${ARTIFACT_LOCATION}/" fi -# Build and upload etcdadm binary +# Build etcdadm binary make etcdadm + +# Upload etcdadm binary +DOWNLOAD_URL="https://dl.google.com/dl/cloudsdk/channels/rapid/google-cloud-sdk.tar.gz" +echo "Downloading google-cloud-sdk.tar.gz from $DOWNLOAD_URL" +curl -L -o "/tmp/google-cloud-sdk.tar.gz" "${DOWNLOAD_URL}" +tar xzf /tmp/google-cloud-sdk.tar.gz -C / +rm /tmp/google-cloud-sdk.tar.gz +/google-cloud-sdk/install.sh \ + --bash-completion=false \ + --usage-reporting=false \ + --quiet +ln -s /google-cloud-sdk/bin/gcloud /usr/local/bin/gcloud +ln -s /google-cloud-sdk/bin/gsutil /usr/local/bin/gsutil +gcloud info +gcloud config list +gcloud auth list gsutil -h "Cache-Control:private, max-age=0, no-transform" -m cp -n etcdadm ${ARTIFACT_LOCATION}${VERSION}/etcdadm