MON-485 use docker image for claranet datadog terraform

This commit is contained in:
Quentin Manfroi 2019-07-24 20:22:44 +02:00
parent ad2918ad4f
commit 65461fcc0b
2 changed files with 9 additions and 10 deletions

View File

@ -5,18 +5,10 @@ stages:
- build - build
- deploy - deploy
before_script:
- apk update
- apk upgrade
- apk add --no-cache curl
auto_update: auto_update:
image: hashicorp/terraform:0.12.3 image: qmanfroi/datadog-terraform:latest
stage: test stage: test
script: script:
- apk add --no-cache bash git grep coreutils
- curl -Lo /usr/local/bin/terraform-docs "https://github.com/$(curl -s https://github.com/segmentio/terraform-docs/releases | grep terraform-docs-v0.6.0-linux-amd | head -n 1 | cut -d '"' -f 2)"
- chmod +x /usr/local/bin/terraform-docs
- ./scripts/auto_update.sh ./ - ./scripts/auto_update.sh ./
- git status - git status
- git diff --exit-code - git diff --exit-code

View File

@ -10,7 +10,14 @@ To contribute you will need to [report an issue](https://confluence.fr.clara.net
If you would like to resolve an issue or implement new monitors you must follow our [best practices](https://confluence.fr.clara.net/display/DAT/Templates+monitors). If you would like to resolve an issue or implement new monitors you must follow our [best practices](https://confluence.fr.clara.net/display/DAT/Templates+monitors).
After any change you should run `./scripts/auto_update.sh ./` command to make sure all is up to date else the CI pipeline will fail on the branch. After any change on this repo, you need to run the `./scripts/auto_update.sh ./` command to make sure all is up to date otherwise the CI pipeline will fail:
- the parameter will limit the scripts execution on a specific path on the repository
- on linux system it is possible to run the script directly while `terraform` and `terraform-docs` commands are available in your PATH
- else you can use [the same docker image as the CI](https://hub.docker.com/r/claranet/datadog-terraform) with docker which is available on every platforms
```
docker run --rm -v "$PWD:/work" claranet/datadog-terraform /work/scripts/auto_update.sh ./
```
## Important notes ## ## Important notes ##