From 5bf1b35cb4bff5e2207bc408adff3604f5e3516f Mon Sep 17 00:00:00 2001 From: Ridwan Sharif Date: Wed, 19 Jun 2024 20:57:58 +0000 Subject: [PATCH] github: update workflow to use test project and updated workflows The presubmits were broken because it pointed to `master` which no longer exists. It is now `main`. See https://github.com/google-github-actions/setup-gcloud Upon fixing it, I discovered a few broken things that I also started fixing in this PR. --- .github/workflows/linux.yml | 11 ++++++----- .github/workflows/windows.yml | 11 ++++++----- test/packer/build.sh | 2 +- test/terraform/main.tf | 2 +- 4 files changed, 14 insertions(+), 12 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 1c5dd58..05e2197 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -52,12 +52,13 @@ jobs: PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} PUBLIC_KEY: ${{ secrets.SSH_PUBLIC_KEY }} - - name: Install Gcloud SDK - uses: google-github-actions/setup-gcloud@master + - name: Authenticate using ServiceAccount + uses: 'google-github-actions/auth@v2' with: - project_id: ${{ secrets.GCP_PROJECT_ID }} - service_account_key: ${{ secrets.GCP_SA_KEY }} - export_default_credentials: true + credentials_json: '${{ secrets.GCP_SA_KEY }}' + + - name: Set up Cloud SDK + uses: 'google-github-actions/setup-gcloud@v2' - name: Deploy instance run: ../../.github/scripts/terraform-apply.sh ${{ matrix.distro }} ${{ matrix.agent_type }} ${{ matrix.version }} diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 70f73e2..c81b5ff 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -32,12 +32,13 @@ jobs: PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} PUBLIC_KEY: ${{ secrets.SSH_PUBLIC_KEY }} - - name: Install Gcloud SDK - uses: google-github-actions/setup-gcloud@master + - name: Authenticate using ServiceAccount + uses: 'google-github-actions/auth@v2' with: - project_id: ${{ secrets.GCP_PROJECT_ID }} - service_account_key: ${{ secrets.GCP_SA_KEY }} - export_default_credentials: true + credentials_json: '${{ secrets.GCP_SA_KEY }}' + + - name: Set up Cloud SDK + uses: 'google-github-actions/setup-gcloud@v2' - name: Deploy instance run: ../../.github/scripts/terraform-apply.sh ${{ matrix.distro }} ${{ matrix.agent_type }} ${{ matrix.version }} diff --git a/test/packer/build.sh b/test/packer/build.sh index b24e582..99bfa3d 100755 --- a/test/packer/build.sh +++ b/test/packer/build.sh @@ -22,7 +22,7 @@ cat <packer.json "image_family": "puppet-${image_family}", "source_image_family": "${image_family}", "type": "googlecompute", - "project_id": "united-aura-313415", + "project_id": "stackdriver-test-143416", "ssh_username": "packer", "zone": "us-east1-b", "startup_script_file": "bootstrap.sh", diff --git a/test/terraform/main.tf b/test/terraform/main.tf index 8bf20e1..825696b 100644 --- a/test/terraform/main.tf +++ b/test/terraform/main.tf @@ -13,7 +13,7 @@ # limitations under the License. variable "project" { - default = "united-aura-313415" + default = "stackdriver-test-143416" } variable "preemptible" {