This repository has been archived on 2026-01-10. You can view files and clone it, but cannot push or open issues or pull requests.
coder-templates/.drone.yml
Steve McMaster 61cc7e9be9
Some checks failed
continuous-integration/drone/push Build is failing
test
2022-11-04 16:51:34 -04:00

25 lines
685 B
YAML

kind: pipeline
name: default
type: docker
steps:
- name: install coder cli
image: alpine:3.16
commands:
- curl -L https://coder.com/install.sh | sh
- name: push templates
image: ghcr.io/coder/coder:v0.11.0
environment:
CODER_URL: http://coder.coder.svc.cluster.local
CODER_SESSION_TOKEN:
from_secret: CODER_SESSION_TOKEN
CODER_TEMPLATE_VERSION: $${DRONE_COMMIT_SHA}
commands:
- apk add git
- |
for template in * ; do
[ -e "$template/main.tf" ] || continue
coder templates push -d $template --yes $template || \
coder templates create -d $template --yes $template
done