Try real pipeline

This commit is contained in:
dvirlabs 2025-05-05 23:53:56 +03:00
parent 54ec108864
commit ad713fc161
2 changed files with 45 additions and 22 deletions

View File

@ -1,28 +1,23 @@
steps: steps:
- name: step-1 - name: detect-and-validate
image: alpine image: alpine:latest
commands: commands:
- echo "🚀 Step 1 Starting preview pipeline" - apk add --no-cache bash git curl jq
- echo "🔍 Detecting changed apps with values-int.yaml"
- |
CHANGED_APPS=$(git diff --name-only origin/master | grep 'manifest/.*/values-int.yaml' | cut -d'/' -f2 | sort -u)
- name: step-2 if [ -z "$CHANGED_APPS" ]; then
image: alpine echo "✅ No values-int.yaml changes detected. Skipping."
commands: exit 0
- echo "🔧 Step 2 Simulating Helm Lint" fi
- name: step-3 echo "Changed apps: $CHANGED_APPS"
image: alpine
commands:
- echo "📦 Step 3 Would validate ArgoCD YAML here"
- name: step-4 for app in $CHANGED_APPS; do
image: alpine echo "🔧 Validating app: $app"
commands: helm lint charts/$app || exit 1
- echo "🌐 Step 4 Would create Cloudflare DNS record here" helm template charts/$app -f manifest/$app/values-int.yaml || exit 1
done
- name: done - echo "✅ All changed apps passed lint and render. ArgoCD will sync them automatically."
image: alpine
commands:
- echo "✅ Pipeline finished successfully"
when:
event: push

View File

@ -0,0 +1,28 @@
steps:
- name: step-1
image: alpine
commands:
- echo "🚀 Step 1 Starting preview pipeline"
- name: step-2
image: alpine
commands:
- echo "🔧 Step 2 Simulating Helm Lint"
- name: step-3
image: alpine
commands:
- echo "📦 Step 3 Would validate ArgoCD YAML here"
- name: step-4
image: alpine
commands:
- echo "🌐 Step 4 Would create Cloudflare DNS record here"
- name: done
image: alpine
commands:
- echo "✅ Pipeline finished successfully"
when:
event: push