Moved to gitlab
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
stages:
|
||||
- test-and-publish
|
||||
|
||||
test-and-publish-template:
|
||||
stage: test-and-publish
|
||||
image: hashicorp/terraform:latest
|
||||
|
||||
variables:
|
||||
TEMPLATE_NAME: "LTH"
|
||||
CODER_URL: "https://coder.soderberg.tech"
|
||||
|
||||
rules:
|
||||
- if: '$CI_COMMIT_BRANCH == "main"'
|
||||
- if: '$CI_PIPELINE_SOURCE == "web"'
|
||||
|
||||
before_script:
|
||||
- apk add --no-cache curl
|
||||
- curl -fsSL https://coder.com/install.sh | sh
|
||||
|
||||
script:
|
||||
- terraform init
|
||||
- terraform validate
|
||||
- coder templates push $TEMPLATE_NAME -d $CI_PROJECT_DIR --activate=false --name $CI_COMMIT_SHORT_SHA --message "$CI_COMMIT_TITLE" --yes
|
||||
- coder create -t $TEMPLATE_NAME --template-version $CI_COMMIT_SHORT_SHA test-$CI_COMMIT_SHORT_SHA --yes --parameter "username=TEST-GIT-NAME,user_email=test@test.com"
|
||||
- coder template version promote --template=$TEMPLATE_NAME --template-version=$CI_COMMIT_SHORT_SHA
|
||||
|
||||
after_script:
|
||||
- coder delete test-$CI_COMMIT_SHORT_SHA --yes || true
|
||||
Reference in New Issue
Block a user