diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 7d135256..f6c6ff39 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -22,7 +22,7 @@ env: VENOM_VAR_directory: /home/runner/testout/azure VENOM_VAR_gitRepo: git@github.com:pluralsh/plural-cli-e2e.git VENOM_VAR_gitRepoPrivateKeyPath: /home/runner/.ssh/id_rsa - E2E_GCP_SA_KEY_FILE: /home/runner/google_sa.json +# E2E_GCP_SA_KEY_FILE: /home/runner/google_sa.json jobs: plural-up-gcp: name: plural up / GCP @@ -41,12 +41,13 @@ jobs: chmod 600 ${{ env.VENOM_VAR_gitRepoPrivateKeyPath }} eval "$(ssh-agent -s)" ssh-add ${{ env.VENOM_VAR_gitRepoPrivateKeyPath }} - - name: Decode and save Google service account to a file - run: (base64 -d <<< ${{ secrets.E2E_GCP_SA_KEY }}) > ${{ env.E2E_GCP_SA_KEY_FILE }} +# - name: Decode and save Google service account to a file/env var +# run: (base64 -d <<< ${{ secrets.E2E_GCP_SA_KEY }}) > ${{ env.E2E_GCP_SA_KEY_FILE }} - name: GCloud Auth - uses: google-github-actions/auth@v2 + uses: 'google-github-actions/auth@v2' with: - credentials_json: ${{ env.E2E_GCP_SA_KEY_FILE }} + project_id: 657418122889 + workload_identity_provider: "projects/657418122889/locations/global/workloadIdentityPools/github/providers/github" - name: Setup Go uses: actions/setup-go@v4.1.0 with: @@ -72,7 +73,7 @@ jobs: VENOM_VAR_provider: gcp VENOM_VAR_region: us-central1 VENOM_VAR_gcpEmail: ${{ secrets.E2E_GCP_EMAIL }} - VENOM_VAR_gcpSAKeyFile: ${{ secrets.E2E_GCP_SA_KEY_FILE }} + # VENOM_VAR_gcpSAKeyFile: ${{ secrets.E2E_GCP_SA_KEY_FILE }} VENOM_VAR_gcpOrgID: ${{ secrets.E2E_GCP_ORG_ID }} VENOM_VAR_gcpBillingID: ${{ secrets.E2E_GCP_BILLING_ID }} VENOM_VAR_project: e2e-${{ env.TIMESTAMP }} diff --git a/Makefile b/Makefile index c97a4853..5ca1eaab 100644 --- a/Makefile +++ b/Makefile @@ -209,7 +209,6 @@ e2e: --ensure-venom VENOM_VAR_azureSubscriptionId=${PLRL_CLI_E2E_AZURE_SUBSCRIPTION_ID} \ VENOM_VAR_azureTenantId=${PLRL_CLI_E2E_AZURE_TENANT_ID} \ VENOM_VAR_azureStorageAccount=${PLRL_CLI_E2E_AZURE_STORAGE_ACCOUNT}${TIMESTAMP} \ - VENOM_VAR_gcpSAKeyFile=${PLRL_CLI_E2E_GCLOUD_KEY_FILE} \ VENOM_VAR_gcpEmail=${PLRL_CLI_E2E_GCLOUD_EMAIL} \ VENOM_VAR_gcpOrgID=${PLRL_CLI_E2E_GCLOUD_ORG_ID} \ VENOM_VAR_gcpBillingID=${PLRL_CLI_E2E_GCLOUD_BILLING_ID} \ diff --git a/az-test b/az-test deleted file mode 100755 index 046de269..00000000 Binary files a/az-test and /dev/null differ diff --git a/pkg/up/deploy.go b/pkg/up/deploy.go index 9f08c72d..7f85ba3c 100644 --- a/pkg/up/deploy.go +++ b/pkg/up/deploy.go @@ -154,7 +154,6 @@ func (tf *terraformCmd) outputs() (map[string]Output, error) { func (tf *terraformCmd) run() (err error) { for tf.retries >= 0 { - fmt.Println(tf.dir, tf.cmd, tf.args) args := append([]string{tf.cmd}, tf.args...) cmd := exec.Command("terraform", args...) cmd.Dir = tf.dir diff --git a/test/plural/lib/gcloud-setup.yml b/test/plural/lib/gcloud-setup.yml index dcd7bf77..87ffceb3 100644 --- a/test/plural/lib/gcloud-setup.yml +++ b/test/plural/lib/gcloud-setup.yml @@ -1,14 +1,12 @@ executor: gcloud-setup input: email: '' - saKeyFile: '' orgID: '' project: '' billingID: '' steps: - script: | - gcloud auth activate-service-account {{ .input.email }} --key-file={{ .input.saKeyFile }} ;\ gcloud projects describe {{ .input.project }} ;\ if [ $? -eq 1 ]; then \ echo "Project does not exist. Creating..." ;\ diff --git a/test/plural/lib/gcloud-teardown.yml b/test/plural/lib/gcloud-teardown.yml index 632d04ac..b4eac5a6 100644 --- a/test/plural/lib/gcloud-teardown.yml +++ b/test/plural/lib/gcloud-teardown.yml @@ -5,9 +5,7 @@ input: project: '' steps: - - script: | - gcloud auth activate-service-account {{ .input.email }} --key-file={{ .input.saKeyFile }} ;\ - gcloud -q projects delete {{ .input.project }} + - script: gcloud -q projects delete {{ .input.project }} retry: 3 retry_if: - result.code ShouldNotEqual 0 diff --git a/test/plural/up.yml b/test/plural/up.yml index 336cd008..99046010 100644 --- a/test/plural/up.yml +++ b/test/plural/up.yml @@ -36,8 +36,6 @@ vars: ### GCP variables # Google Service Account email gcpEmail: '' - # Google Service Account key file - gcpSAKeyFile: '' # Google organization ID gcpOrgID: '' # Google billing account ID @@ -94,7 +92,6 @@ testcases: steps: - type: gcloud-setup email: {{ .gcpEmail }} - saKeyFile: {{ .gcpSAKeyFile }} orgID: {{ .gcpOrgID }} billingID: {{ .gcpBillingID }} project: {{ .project }} @@ -120,7 +117,6 @@ testcases: steps: - type: gcloud-teardown email: {{ .gcpEmail }} - saKeyFile: {{ .gcpSAKeyFile }} project: {{ .project }} - name: Git teardown