Merge pull request #835 from muresan/master
Fix workflow-gitlab.yaml template rendering
This commit is contained in:
commit
714382f3ad
|
@ -14,7 +14,7 @@
|
||||||
|
|
||||||
default:
|
default:
|
||||||
before_script:
|
before_script:
|
||||||
- echo "${CI_JOB_JWT_V2}" > token.txt
|
- echo "$${CI_JOB_JWT_V2}" > token.txt
|
||||||
image:
|
image:
|
||||||
name: hashicorp/terraform
|
name: hashicorp/terraform
|
||||||
entrypoint:
|
entrypoint:
|
||||||
|
@ -49,10 +49,10 @@ gcp-auth:
|
||||||
script:
|
script:
|
||||||
- |
|
- |
|
||||||
gcloud iam workload-identity-pools create-cred-config \
|
gcloud iam workload-identity-pools create-cred-config \
|
||||||
${FAST_WIF_PROVIDER} \
|
$${FAST_WIF_PROVIDER} \
|
||||||
--service-account=${FAST_SERVICE_ACCOUNT} \
|
--service-account=$${FAST_SERVICE_ACCOUNT} \
|
||||||
--service-account-token-lifetime-seconds=3600 \
|
--service-account-token-lifetime-seconds=3600 \
|
||||||
--output-file=${GOOGLE_CREDENTIALS} \
|
--output-file=$${GOOGLE_CREDENTIALS} \
|
||||||
--credential-source-file=token.txt
|
--credential-source-file=token.txt
|
||||||
tf-files:
|
tf-files:
|
||||||
dependencies:
|
dependencies:
|
||||||
|
@ -62,14 +62,14 @@ tf-files:
|
||||||
stage: tf-files
|
stage: tf-files
|
||||||
script:
|
script:
|
||||||
# - gcloud components install -q alpha
|
# - gcloud components install -q alpha
|
||||||
- gcloud config set auth/credential_file_override ${GOOGLE_CREDENTIALS}
|
- gcloud config set auth/credential_file_override $${GOOGLE_CREDENTIALS}
|
||||||
- mkdir -p .tf-setup
|
- mkdir -p .tf-setup
|
||||||
- |
|
- |
|
||||||
gcloud alpha storage cp -r \
|
gcloud alpha storage cp -r \
|
||||||
"gs://${FAST_OUTPUTS_BUCKET}/providers/${TF_PROVIDERS_FILE}" .tf-setup/
|
"gs://$${FAST_OUTPUTS_BUCKET}/providers/$${TF_PROVIDERS_FILE}" .tf-setup/
|
||||||
- |
|
- |
|
||||||
gcloud alpha storage cp -r \
|
gcloud alpha storage cp -r \
|
||||||
"gs://${FAST_OUTPUTS_BUCKET}/tfvars" .tf-setup/
|
"gs://$${FAST_OUTPUTS_BUCKET}/tfvars" .tf-setup/
|
||||||
|
|
||||||
tf-plan:
|
tf-plan:
|
||||||
# uncomment the following lines and set the SSH key secret for private modules repo
|
# uncomment the following lines and set the SSH key secret for private modules repo
|
||||||
|
@ -82,9 +82,9 @@ tf-plan:
|
||||||
# ssh-keyscan gitlab.com | sort -u - ~/.ssh/known_hosts -o ~/.ssh/known_hosts
|
# ssh-keyscan gitlab.com | sort -u - ~/.ssh/known_hosts -o ~/.ssh/known_hosts
|
||||||
stage: tf-plan
|
stage: tf-plan
|
||||||
script:
|
script:
|
||||||
- cp .tf-setup/${TF_PROVIDERS_FILE} ./
|
- cp .tf-setup/$${TF_PROVIDERS_FILE} ./
|
||||||
- |
|
- |
|
||||||
for f in ${TF_VAR_FILES}; do
|
for f in $${TF_VAR_FILES}; do
|
||||||
ln -s ".tf-setup/tfvars/$f" ./
|
ln -s ".tf-setup/tfvars/$f" ./
|
||||||
done
|
done
|
||||||
- terraform init
|
- terraform init
|
||||||
|
@ -104,9 +104,9 @@ tf-apply:
|
||||||
# ssh-keyscan gitlab.com | sort -u - ~/.ssh/known_hosts -o ~/.ssh/known_hosts
|
# ssh-keyscan gitlab.com | sort -u - ~/.ssh/known_hosts -o ~/.ssh/known_hosts
|
||||||
stage: tf-apply
|
stage: tf-apply
|
||||||
script:
|
script:
|
||||||
- cp .tf-setup/${TF_PROVIDERS_FILE} ./
|
- cp .tf-setup/$${TF_PROVIDERS_FILE} ./
|
||||||
- |
|
- |
|
||||||
for f in ${TF_VAR_FILES}; do
|
for f in $${TF_VAR_FILES}; do
|
||||||
ln -s ".tf-setup/tfvars/$f" ./
|
ln -s ".tf-setup/tfvars/$f" ./
|
||||||
done
|
done
|
||||||
- terraform init
|
- terraform init
|
||||||
|
|
Loading…
Reference in New Issue