From 4e084972a05e47a7d4bc49b787f3ac2731b0dbcb Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 26 Apr 2022 15:11:39 +0000 Subject: [PATCH] chore(ci): Upload halconfigs to GCS on Tag push (#9838) (#9845) Previous release tools would publish basic halconfig profiles to GCS bucket: [https://console.cloud.google.com/storage/browser/halconfig/``/``/*](https://console.cloud.google.com/storage/browser/halconfig/%60%3Cservice%3E%60/%60%3Cversion%3E%60/*) Where `` might be `rosco` and `` is our git tag, eg: `v1.2.3`. Halyard downloads these profiles during `hal deploy apply`. As the profiles are deprecated it would be ideal to remove from Halyard but it may break users workflows. For now we can upload the files as part of our regular service 'release' flow (git tag && git push) using GHA. (cherry picked from commit f134927db9e7f6444c312e66f5409c70c4fe0bab) Co-authored-by: kskewes-sf <96093759+kskewes-sf@users.noreply.github.com> --- .github/workflows/release.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 72d3f446222..2df53670eb5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -71,6 +71,22 @@ jobs: GAR_JSON_KEY: ${{ secrets.GAR_JSON_KEY }} run: | ./gradlew --info publishDebToArtifactRegistry + - name: Login to Google Cloud + # Only run this on repositories in the 'spinnaker' org, not on forks. + if: startsWith(github.repository, 'spinnaker/') + uses: 'google-github-actions/auth@v0' + # use service account flow defined at: https://github.com/google-github-actions/upload-cloud-storage#authenticating-via-service-account-key-json + with: + credentials_json: '${{ secrets.GAR_JSON_KEY }}' + - name: Upload halconfig profiles to GCS + # https://console.cloud.google.com/storage/browser/halconfig + # Only run this on repositories in the 'spinnaker' org, not on forks. + if: startsWith(github.repository, 'spinnaker/') + uses: 'google-github-actions/upload-cloud-storage@v0' + with: + path: 'halconfig/' + destination: 'halconfig/${{ steps.build_variables.outputs.REPO }}/${{ steps.release_info.outputs.RELEASE_VERSION }}' + parent: false - name: Login to GAR # Only run this on repositories in the 'spinnaker' org, not on forks. if: startsWith(github.repository, 'spinnaker/')