diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a9a7e8b..58ce21e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -5,18 +5,10 @@ stages: - build - deploy -before_script: - - apk update - - apk upgrade - - apk add --no-cache curl - auto_update: - image: hashicorp/terraform:0.12.3 + image: qmanfroi/datadog-terraform:latest stage: test 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 ./ - git status - git diff --exit-code diff --git a/README.md b/README.md index acab7c5..3a2515e 100644 --- a/README.md +++ b/README.md @@ -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). -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 ##