2023-06-15 16:01:53 +00:00
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
|
|
|
name: default
|
|
|
|
|
|
|
|
trigger:
|
|
|
|
event:
|
|
|
|
- push
|
|
|
|
- pull_request
|
|
|
|
- tag
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Lint
|
|
|
|
image: docker.io/hashicorp/terraform
|
2023-06-15 16:04:57 +00:00
|
|
|
network_mode: host
|
2023-06-15 16:01:53 +00:00
|
|
|
commands:
|
|
|
|
- cd hetzner-cloud/
|
|
|
|
- terraform init
|
|
|
|
- terraform validate
|
|
|
|
|
|
|
|
- name: Push
|
2024-03-20 04:11:27 +00:00
|
|
|
image: ghcr.io/coder/coder:v2.9.1
|
2023-06-15 16:04:57 +00:00
|
|
|
network_mode: host
|
2023-06-15 16:01:53 +00:00
|
|
|
commands:
|
|
|
|
- |
|
|
|
|
coder templates push \
|
|
|
|
--name "$DRONE_COMMIT" \
|
|
|
|
--directory "hetzner-cloud" \
|
|
|
|
--variable hcloud_token="$HCLOUD_TOKEN" \
|
|
|
|
--variable use_subdomain=true \
|
|
|
|
--variable private_network_id="$HCLOUD_PRIVATE_NETWORK_ID" \
|
|
|
|
--yes \
|
|
|
|
"Hetzner-Cloud"
|
|
|
|
environment:
|
|
|
|
CODER_URL: https://ide.icb4dc0.de
|
|
|
|
CODER_SESSION_TOKEN:
|
|
|
|
from_secret: coder_token
|
|
|
|
HCLOUD_TOKEN:
|
|
|
|
from_secret: hcloud_token
|
|
|
|
HCLOUD_PRIVATE_NETWORK_ID:
|
|
|
|
from_secret: hcloud_private_network_id
|