Compare commits
2 Commits
fc4b82be5d
...
88d75f6b7c
| Author | SHA1 | Date | |
|---|---|---|---|
| 88d75f6b7c | |||
| 8969cd3e21 |
53
.drone.yml
Normal file
53
.drone.yml
Normal file
@@ -0,0 +1,53 @@
|
||||
---
|
||||
kind: pipeline
|
||||
type: kubernetes
|
||||
name: Terraform root module
|
||||
|
||||
trigger:
|
||||
event:
|
||||
- cron
|
||||
- push
|
||||
branch:
|
||||
- main
|
||||
|
||||
environment:
|
||||
AWS_ACCESS_KEY_ID:
|
||||
from_secret: terraform-aws-key-id
|
||||
AWS_SECRET_ACCESS_KEY:
|
||||
from_secret: terraform-aws-secret-access-key
|
||||
|
||||
steps:
|
||||
- name: terraform init
|
||||
image: hashicorp/terraform:1.1.8
|
||||
commands:
|
||||
- mkdir -p ~/.ssh
|
||||
- chmod 755 ~/.ssh
|
||||
- echo "$${CI_SSH_KEY}" | base64 -d > ~/.ssh/id_rsa
|
||||
- chmod 600 ~/.ssh/id_rsa
|
||||
- terraform init
|
||||
environment:
|
||||
GIT_SSH_COMMAND: "ssh -o StrictHostKeyChecking=no"
|
||||
CI_SSH_KEY:
|
||||
from_secret: ci-ssh-key
|
||||
|
||||
- name: terraform plan
|
||||
image: hashicorp/terraform:1.1.8
|
||||
commands:
|
||||
- terraform plan -out .tfplan
|
||||
|
||||
- name: terraform apply
|
||||
when:
|
||||
when:
|
||||
branch:
|
||||
- main
|
||||
event:
|
||||
- push
|
||||
image: hashicorp/terraform:1.1.8
|
||||
commands:
|
||||
- terraform show -plan .tfplan
|
||||
# - terraform apply -plan .tfplan -auto-approve
|
||||
---
|
||||
kind: signature
|
||||
hmac: 27148d661f9be0ea64b8ac57e17774f150c39a02565c787ba793bdde3b798110
|
||||
|
||||
...
|
||||
@@ -17,6 +17,7 @@ resource "helm_release" "drone_runner" {
|
||||
DRONE_SERVER_HOST = "https://${local.ingress_domain}"
|
||||
DRONE_RPC_HOST = "${helm_release.drone_server.name}.${helm_release.drone_server.namespace}.svc.cluster.local"
|
||||
DRONE_RPC_PROTO = "http"
|
||||
DRONE_NAMESPACE_DEFAULT = kubernetes_namespace.jobs.metadata.0.name
|
||||
}
|
||||
}),
|
||||
jsonencode({
|
||||
|
||||
Reference in New Issue
Block a user