Merge branch 'MON-437_update_ci' into 'master'

Resolve MON-437 "Update ci"

Closes MON-437

See merge request claranet/pt-monitoring/projects/datadog/terraform/monitors!39
This commit is contained in:
Quentin Manfroi 2019-04-18 18:57:43 +02:00
commit 1a7925a795
3 changed files with 9 additions and 7 deletions

View File

@ -15,5 +15,6 @@ test_auto_update:
- git status
- git diff --exit-code
tags:
- docker-runner
- product-teams
- kubernetes
- gke

View File

@ -7,10 +7,12 @@ This repository is used to store all our monitors templates ready to use for gen
First, you may refresh your knowledge and look at the [terminology](https://confluence.fr.clara.net/display/DAT/Getting+started).
To contribute you will need to [report an issue](https://confluence.fr.clara.net/display/DAT/Project+and+Workflow).
To contribute you will need to [report an issue](https://confluence.fr.clara.net/display/DAT/Project+and+Workflow) and create a branch with its Jira ID.
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.
### Important notes ###
* This repository represents a terraform feature and each first level directory could be imported as a terraform module, you must choose the one(s) you need.
@ -34,12 +36,11 @@ provider "datadog" {
Both of the `datadog_api_key` and `datadog_app_key` are unique to the client.
### Module Declaration example ###
### Module declaration example ###
A quick example of using a set of monitors for a given terraform module:
A quick example of using a set of monitors for a given terraform module:
```
variable "oncall_24x7" {
default = "@pagerduty-Public_Cloud_FR_-_Yoda_-_Unibail_HNO"
}
@ -68,8 +69,8 @@ module "datadog-monitors-my-monitors-set" {
}
```
`my/monitors/set` represents the path to a monitors set sub directory listed above.
The `//` is very important, it's a terraform specific syntax used to separate git url and folder path.
`my/monitors/set` represents the path to a monitors set sub directory listed below.
### Monitors summary ###

View File

@ -10,7 +10,7 @@ sed -i '/### Monitors summary ###/q' README.md
# add a newline after listing section
echo >> README.md
# loop over all ready monitors sets on the repo
for path in $(find -mindepth 1 \( -path './incubator' -o -path './scripts' -o -path './testing' -o -path '*/\.*' \) -prune -o -type d -print | sort -fdbi); do
for path in $(find "$(get_scope $1)" -mindepth 1 \( -path './incubator' -o -path './scripts' -o -path './testing' -o -path '*/\.*' \) -prune -o -type d -print | sort -fdbi); do
# split path in directories
directories=($(list_dirs $path))
# loop over directories in path