【发布时间】:2022-12-15 03:09:59
【问题描述】:
是否有可能,或者有没有办法,在 BASH if 子句中使用 yaml 锚点引用。 如果是这样,如何? 到目前为止,这是我正在尝试的。
create-cluster:
needs:
- terra-bootstrap
script:
- export TF_VAR_state_bucket_prefix="${TF_VAR_vsad}/${TF_VAR_cluster_name}"
- pushd terra-cluster
- *init_with_gcs_state
- |
if [[ "${CLUSTER_EXISTS}" == 'false' ]]; then
terraform apply -auto-approve
*does_cluster_exist
fi
- popd
stage: create-cluster
tags:
- gke
【问题讨论】:
标签: yaml gitlab-pipelines yaml-anchors