Commit 46b2c73c authored by Ryan Causey's avatar Ryan Causey

Fix using deprecated global declarations in example .gitlab-ci.ymls

* See: https://docs.gitlab.com/ee/ci/yaml/#globally-defined-image-services-cache-before_script-after_script
parent 7bc75068
...@@ -376,17 +376,18 @@ can configure this manually as follows: ...@@ -376,17 +376,18 @@ can configure this manually as follows:
### Example `.gitlab-ci.yaml` file ### Example `.gitlab-ci.yaml` file
```yaml ```yaml
image: registry.gitlab.com/gitlab-org/terraform-images/stable:latest default:
image: registry.gitlab.com/gitlab-org/terraform-images/stable:latest
cache:
key: example-production
paths:
- ${TF_ROOT}/.terraform
variables: variables:
TF_ROOT: ${CI_PROJECT_DIR}/environments/example/production TF_ROOT: ${CI_PROJECT_DIR}/environments/example/production
TF_ADDRESS: ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/terraform/state/example-production TF_ADDRESS: ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/terraform/state/example-production
cache:
key: example-production
paths:
- ${TF_ROOT}/.terraform
before_script: before_script:
- cd ${TF_ROOT} - cd ${TF_ROOT}
...@@ -436,15 +437,16 @@ apply: ...@@ -436,15 +437,16 @@ apply:
Starting with 13.2, you can display multiple reports on the Merge Request page. The reports will also display the `artifacts: name:`. See example below for a suggested setup. Starting with 13.2, you can display multiple reports on the Merge Request page. The reports will also display the `artifacts: name:`. See example below for a suggested setup.
```yaml ```yaml
image: default:
name: registry.gitlab.com/gitlab-org/gitlab-build-images:terraform image:
entrypoint: name: registry.gitlab.com/gitlab-org/gitlab-build-images:terraform
- '/usr/bin/env' entrypoint:
- 'PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' - '/usr/bin/env'
- 'PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'
cache:
paths: cache:
- .terraform paths:
- .terraform
stages: stages:
- build - build
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment