-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
49 lines (41 loc) · 1.36 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
include:
- project: syseleven/gitlab-ci-templates
ref: 3.29.3
file: job-templates/TerraformValidate.yml
- project: syseleven/gitlab-ci-templates
ref: 3.29.3
file: job-templates/TerraformFormat.yml
- project: syseleven/gitlab-ci-templates
ref: 3.29.3
file: MarkdownLint.yml
stages:
- test
workflow:
rules:
- if: $CI_MERGE_REQUEST_IID
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
- if: $CI_COMMIT_TAG
default:
retry:
max: 2
when:
- runner_system_failure
##################################################################
# JOBS #
##################################################################
terraform-format:
extends:
- .terraform-format
terraform-validate:
extends:
- .terraform-validate
tfplugindocs:
image: golang:1.23.4
before_script:
- apt update && apt install -y unzip
- wget -O /tmp/tfplugindocs.zip https://github.com/hashicorp/terraform-plugin-docs/releases/download/v0.19.2/tfplugindocs_0.19.2_linux_amd64.zip
- unzip -p /tmp/tfplugindocs.zip tfplugindocs > /usr/local/bin/tfplugindocs
- chmod 0555 /usr/local/bin/tfplugindocs
script:
- tfplugindocs
- if [[ ! -z "$(git status -s)" ]]; then echo "Found documentation files. Please run tfplugindocs locally and commit changes." && git diff && exit 1; fi