From d9b1b0f6fdf40e527d77d5b99305007b06fd740d Mon Sep 17 00:00:00 2001 From: anthorob Date: Tue, 8 Jul 2025 12:09:51 -0400 Subject: [PATCH] add CI config --- .gitlab-ci.yml | 17 +++++++++++++++ ci-scripts/generate-pipeline.sh | 37 +++++++++++++++++++++++++++++++++ coder-base/variables.tf | 2 +- 3 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 .gitlab-ci.yml create mode 100644 ci-scripts/generate-pipeline.sh diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..a68cf11 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,17 @@ +stages: + - generate + +generate-child-pipeline: + stage: generate + image: alpine:latest + script: + - apk add --no-cache bash + - ./ci-scripts/generate-pipeline.sh > child-pipeline.yml + artifacts: + paths: + - child-pipeline.yml + trigger: + include: + - artifact: child-pipeline.yml + job: generate-child-pipeline + strategy: depend diff --git a/ci-scripts/generate-pipeline.sh b/ci-scripts/generate-pipeline.sh new file mode 100644 index 0000000..b026239 --- /dev/null +++ b/ci-scripts/generate-pipeline.sh @@ -0,0 +1,37 @@ +#!/bin/bash +set -euo pipefail + +echo "stages:" +echo " - validate" +echo " - deploy" + +for dir in templates/*; do + [ -d "$dir" ] || continue + name=$(basename "$dir") + + cat <