kind: pipeline name: default type: docker steps: - name: push templates image: alpine:3.16 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 - wget -O- https://github.com/coder/coder/releases/download/v0.11.0/coder_0.11.0_linux_amd64.tar.gz | tar -xzf - -C /usr/local/bin - | for template in * ; do [ -e "$template/main.tf" ] || continue coder templates push -d $template --yes $template || \ coder templates create -d $template --yes $template done