ci: drift-detection and docs with terraform-docs
Some checks are pending
continuous-integration/drone/pr Build is pending
Some checks are pending
continuous-integration/drone/pr Build is pending
This commit is contained in:
32
.drone.yml
32
.drone.yml
@@ -4,11 +4,9 @@ type: kubernetes
|
||||
name: Terraform root module
|
||||
|
||||
trigger:
|
||||
event:
|
||||
- cron
|
||||
- push
|
||||
branch:
|
||||
- main
|
||||
ref:
|
||||
- refs/heads/main
|
||||
- refs/pull/*/head
|
||||
|
||||
environment:
|
||||
TF_IN_AUTOMATION: "1"
|
||||
@@ -34,7 +32,7 @@ steps:
|
||||
- name: terraform plan
|
||||
image: hashicorp/terraform:1.1.8
|
||||
commands:
|
||||
- terraform plan -out .tfplan
|
||||
- terraform plan $([[ $${DRONE_BUILD_EVENT} = cron ]] && echo "-detailed-exit-code") -out .tfplan
|
||||
environment:
|
||||
AWS_ACCESS_KEY_ID:
|
||||
from_secret: terraform-aws-key-id
|
||||
@@ -65,6 +63,28 @@ steps:
|
||||
KUBE_TOKEN:
|
||||
from_secret: lawndale-k8s-ci-token
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
type: kubernetes
|
||||
name: Check docs and format
|
||||
|
||||
environment:
|
||||
TF_IN_AUTOMATION: "1"
|
||||
|
||||
trigger:
|
||||
ref:
|
||||
- refs/pull/*/head
|
||||
|
||||
steps:
|
||||
- name: format and generate docs
|
||||
image: hashicorp/terraform:1.1.8
|
||||
commands:
|
||||
- apk add bash wget
|
||||
- wget -q https://github.com/terraform-docs/terraform-docs/releases/download/v0.16.0/terraform-docs-v0.16.0-linux-amd64.tar.gz -O - | tar -xz terraform-docs -C /usr/local/bin
|
||||
- terraform fmt
|
||||
- terraform-docs .
|
||||
- git diff --exit-code
|
||||
|
||||
---
|
||||
kind: signature
|
||||
hmac: 6950738d3bbe37bb7d5201b9fd7a086ee09a2206a433f19d01c2570cc5718b61
|
||||
|
||||
Reference in New Issue
Block a user