terraform/.woodpecker/dns.yml

38 lines
826 B
YAML
Raw Normal View History

2022-06-09 02:29:59 +00:00
pipeline:
validate:
image: alpine
when:
path: "dns/**"
event: pull_request
secrets:
- linode_token
2022-06-09 03:25:55 +00:00
- aws_access_key_id
- aws_secret_access_key
2022-06-09 02:29:59 +00:00
commands:
- apk add --no-cache terraform
- terraform version
- |
cd dns
echo 'token = "$${LINODE_TOKEN}"' > .auto.tfvars
terraform validate
terraform plan
deploy:
image: alpine
when:
path: "dns/**"
event: push
secrets:
- linode_token
2022-06-09 03:25:55 +00:00
- aws_access_key_id
- aws_secret_access_key
2022-06-09 02:29:59 +00:00
commands:
- apk add --no-cache terraform
- terraform version
- |
cd dns
echo 'token = "$${LINODE_TOKEN}"' > .auto.tfvars
terraform validate
terraform plan -out deploy.plan
terraform apply deploy.plan