ci: added ci pipelines
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2022-05-26 23:17:00 +02:00
parent d5e9fe017f
commit 193cb931d0
5 changed files with 147 additions and 1 deletions

68
.drone.yml Normal file
View File

@@ -0,0 +1,68 @@
---
kind: pipeline
type: kubernetes
name: Vet
trigger:
event:
- push
- tag
environment:
TF_IN_AUTOMATION: "1"
steps:
- name: get terraform
image: hashicorp/terraform:1.1.8
commands:
- mv /bin/terraform .
- name: Generate docs
image: ubuntu:22.04
commands:
- mv terraform /bin/terraform
- apt-get update && apt-get install git wget
- wget https://github.com/terraform-docs/terraform-docs/releases/download/v0.16.0/terraform-docs-v0.16.0-linux-amd64.tar.gz -O - | tar -xz terraform-docs -C /usr/local/bin
- scripts/format.sh
- scripts/generate-docs.sh
- git diff-index --name-status HEAD
---
kind: pipeline
type: kubernetes
name: Terraform validate
trigger:
event:
- push
- tag
branch:
- main
environment:
TF_IN_AUTOMATION: "1"
steps:
- name: get terraform
image: hashicorp/terraform:1.1.8
commands:
- mv /bin/terraform .
- name: validate
image: ubuntu:22.04
commands:
- mkdir -p ~/.ssh
- chmod 755 ~/.ssh
- echo "$${CI_SSH_KEY}" | base64 -d > ~/.ssh/id_rsa
- chmod 600 ~/.ssh/id_rsa
- mv terraform /bin/terraform
- scripts/validate.sh
environment:
GIT_SSH_COMMAND: "ssh -o StrictHostKeyChecking=no"
CI_SSH_KEY:
from_secret: ci-ssh-key
---
kind: signature
hmac: beaf2a47ac9fc015b2109c08e24c7ae79c1833b5f7010258f9aaceb7a81aee41
...