Add drone yaml

This commit is contained in:
2023-10-31 14:15:31 +01:00
parent 620984927a
commit 309b538093
+38
View File
@@ -0,0 +1,38 @@
---
kind: pipeline
name: run speculative plan
type: docker
platform:
os: linux
arch: arm64
clone:
disable: true
steps:
- name: clone terraform
image: alpine/git
environment:
SSH_KEY:
from_secret: private_ssh_key
commands:
- mkdir $HOME/.ssh
- echo "$SSH_KEY" > $HOME/.ssh/id_ed25519
- chmod 600 $HOME/.ssh/id_ed25519
- touch $HOME/.ssh/known_hosts
- chmod 600 $HOME/.ssh/known_hosts
- ssh-keyscan -H git.2martens.de > $HOME/.ssh/known_hosts 2>/dev/null
- git clone ssh://giteajim@git.2martens.de:22/2martens/terraform.git .
- git checkout $DRONE_COMMIT
- name: terraform plan
image: 2martens/terraform-drone-plugin
settings:
api_token:
from_secret: tfc_api_token
cloud_organization: 2martens
args: plan
trigger:
branch:
- main