Skip to content

Commit

Permalink
Remove gcp runner zone from user input
Browse files Browse the repository at this point in the history
Signed-off-by: Parthvi <parthvi.vala@gmail.com>
  • Loading branch information
valaparthvi committed Jan 4, 2024
1 parent 5eae2bc commit 86606e2
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 23 deletions.
6 changes: 1 addition & 5 deletions .github/workflows/aks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,7 @@ on:
description: Runner template to use
default: hosted-prov-e2e-ci-runner-spot-n2-highmem-16-gl-template-v1
type: string
zone:
description: GCP zone to host the runner
default: asia-south2-c
type: string

jobs:
aks-e2e:
uses: ./.github/workflows/main.yaml
Expand All @@ -62,4 +59,3 @@ jobs:
run_support_matrix_importing_tests: ${{ inputs.run_support_matrix_importing_tests == true }}
destroy_runner: ${{ inputs.destroy_runner == true }}
runner_template: ${{ inputs.runner_template }}
zone: ${{inputs.zone}}
6 changes: 1 addition & 5 deletions .github/workflows/eks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,7 @@ on:
description: Runner template to use
default: hosted-prov-e2e-ci-runner-spot-n2-highmem-16-gl-template-v1
type: string
zone:
description: GCP zone to host the runner
default: asia-south2-c
type: string

jobs:
eks-e2e:
uses: ./.github/workflows/main.yaml
Expand All @@ -62,4 +59,3 @@ jobs:
run_support_matrix_importing_tests: ${{ inputs.run_support_matrix_importing_tests == true }}
destroy_runner: ${{ inputs.destroy_runner == true }}
runner_template: ${{ inputs.runner_template }}
zone: ${{inputs.zone}}
6 changes: 1 addition & 5 deletions .github/workflows/gke.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,7 @@ on:
description: Runner template to use
default: hosted-prov-e2e-ci-runner-spot-n2-highmem-16-gl-template-v1
type: string
zone:
description: GCP zone to host the runner
default: asia-south2-c
type: string

jobs:
gke-e2e:
uses: ./.github/workflows/main.yaml
Expand All @@ -63,4 +60,3 @@ jobs:
run_support_matrix_importing_tests: ${{ inputs.run_support_matrix_importing_tests == true }}
destroy_runner: ${{ inputs.destroy_runner == true }}
runner_template: ${{ inputs.runner_template }}
zone: ${{inputs.zone}}
13 changes: 5 additions & 8 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,6 @@ on:
description: Runner template to use
default: hosted-prov-e2e-ci-runner-spot-n2-highmem-16-gl-template-v1
type: string
zone:
description: GCP zone to host the runner
default: asia-south2-c
type: string

env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
Expand All @@ -56,6 +52,7 @@ env:
GKE_PROJECT_ID: ${{ secrets.GKE_PROJECT_ID }}
PROVIDER: ${{ inputs.hosted_provider }}
RANCHER_PASSWORD: rancherpassword
GCP_RUNNER_ZONE: asia-south2-c

jobs:
create-runner:
Expand Down Expand Up @@ -83,14 +80,14 @@ jobs:
uses: google-github-actions/setup-gcloud@v1
- name: Create runner
run: |
REGION=$(echo ${{ inputs.zone }} | sed 's/-[abcdef]$//')
REGION=$(echo ${{ env.GCP_RUNNER_ZONE }} | sed 's/-[abcdef]$//')
gcloud compute instances create ${{ steps.generator.outputs.runner }} \
--zone ${{ inputs.zone }} \
--zone ${{ env.GCP_RUNNER_ZONE }} \
--source-instance-template projects/${{ env.GKE_PROJECT_ID }}/regions/${REGION}/instanceTemplates/${{ inputs.runner_template }}
- name: Allow traffic
run: |
gcloud compute instances add-tags ${{ steps.generator.outputs.runner }} \
--tags http-server,https-server --zone ${{ inputs.zone }}
--tags http-server,https-server --zone ${{ env.GCP_RUNNER_ZONE }}
- name: Create GCP secrets
run: |
echo -n ${{ secrets.PAT_TOKEN }} \
Expand Down Expand Up @@ -215,4 +212,4 @@ jobs:
run: |
gcloud --quiet compute instances delete ${{ needs.create-runner.outputs.runner }} \
--delete-disks all \
--zone ${{ inputs.zone }}
--zone ${{ env.GCP_RUNNER_ZONE }}

0 comments on commit 86606e2

Please sign in to comment.