31 lines
889 B
YAML
31 lines
889 B
YAML
pipeline:
|
|
validate:
|
|
image: alpine:3.16
|
|
when:
|
|
path: "dns/**"
|
|
event: pull_request
|
|
commands:
|
|
- apk add --no-cache terraform
|
|
- terraform version
|
|
- cd dns
|
|
- terraform init
|
|
- terraform validate
|
|
- terraform plan -var "token=$LINODE_TOKEN" -var "secret=$GLAUCA_TSIG_SECRET"
|
|
secrets: [linode_token, aws_access_key_id, aws_secret_access_key, glauca_tsig_secret]
|
|
|
|
deploy:
|
|
image: alpine:3.16
|
|
when:
|
|
path: "dns/**"
|
|
branch: main
|
|
event: push
|
|
commands:
|
|
- apk add --no-cache terraform
|
|
- terraform version
|
|
- cd dns
|
|
- terraform init
|
|
- terraform validate
|
|
- terraform plan -out deploy.plan -var "token=$LINODE_TOKEN" -var "secret=$GLAUCA_TSIG_SECRET"
|
|
- terraform apply deploy.plan
|
|
secrets: [linode_token, aws_access_key_id, aws_secret_access_key, glauca_tsig_secret]
|