Commit a6ab18b0 authored by Pierre Smeyers's avatar Pierre Smeyers
Browse files

Merge branch 'fix/gcp-variant' into 'master'

fix(gcp): reduce scope of GCP App Default Creds script to template

See merge request to-be-continuous/ansible!73
parents ae79316c 625b5c97
Loading
Loading
Loading
Loading
+39 −40
Original line number Diff line number Diff line
@@ -50,8 +50,7 @@ variables:
  GCP_PROD_OIDC_ACCOUNT: $[[ inputs.gcp-prod-oidc-account ]]
  GCP_PROD_OIDC_PROVIDER: $[[ inputs.gcp-prod-oidc-provider ]]

.gcp-provider-auth:
  before_script:
.ansible-gcp-adc:
  - echo "Installing GCP authentication with env GOOGLE_APPLICATION_CREDENTIALS file"
  - echo $GCP_JWT > "$CI_BUILDS_DIR/.auth_token.jwt"
  - |-
@@ -95,7 +94,7 @@ variables:
      aud: "$GCP_OIDC_AUD"
  before_script:
    - !reference [.ansible-scripts]
    - !reference [.gcp-provider-auth, before_script]
    - !reference [.ansible-gcp-adc]
    - install_ca_certs "${CUSTOM_CA_CERTS:-$DEFAULT_CA_CERTS}"
    - cd $ANSIBLE_PROJECT_DIR
    - assert_defined "${ENV_INVENTORY:-${ANSIBLE_DEFAULT_INVENTORY}}" 'Missing required Ansible inventory'
@@ -107,7 +106,7 @@ variables:
      aud: "$GCP_OIDC_AUD"
  before_script:
    - !reference [.ansible-scripts]
    - !reference [.gcp-provider-auth, before_script]
    - !reference [.ansible-gcp-adc]
    - install_ca_certs "${CUSTOM_CA_CERTS:-$DEFAULT_CA_CERTS}"
    - cd $ANSIBLE_PROJECT_DIR
    - assert_defined "${ENV_INVENTORY:-${ANSIBLE_DEFAULT_INVENTORY}}" 'Missing required Ansible inventory'