mirror of
https://github.com/2martens/terraform.git
synced 2026-10-17 16:06:52 +02:00
Add drone yaml
This commit is contained in:
+38
@@ -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
|
||||
Reference in New Issue
Block a user