Skip to content

Commit

Permalink
github: update workflow to use test project and updated workflows
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ridwanmsharif committed Jun 19, 2024
1 parent 70b2b3a commit 5bf1b35
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 12 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
2 changes: 1 addition & 1 deletion test/packer/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ cat <<END>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",
Expand Down
2 changes: 1 addition & 1 deletion test/terraform/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# limitations under the License.

variable "project" {
default = "united-aura-313415"
default = "stackdriver-test-143416"
}

variable "preemptible" {
Expand Down

0 comments on commit 5bf1b35

Please sign in to comment.