Try real pipeline
This commit is contained in:
parent
54ec108864
commit
ad713fc161
@ -1,28 +1,23 @@
|
||||
steps:
|
||||
- name: step-1
|
||||
image: alpine
|
||||
- name: detect-and-validate
|
||||
image: alpine:latest
|
||||
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
|
||||
image: alpine
|
||||
commands:
|
||||
- echo "🔧 Step 2 Simulating Helm Lint"
|
||||
if [ -z "$CHANGED_APPS" ]; then
|
||||
echo "✅ No values-int.yaml changes detected. Skipping."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
- name: step-3
|
||||
image: alpine
|
||||
commands:
|
||||
- echo "📦 Step 3 Would validate ArgoCD YAML here"
|
||||
echo "Changed apps: $CHANGED_APPS"
|
||||
|
||||
- name: step-4
|
||||
image: alpine
|
||||
commands:
|
||||
- echo "🌐 Step 4 Would create Cloudflare DNS record here"
|
||||
for app in $CHANGED_APPS; do
|
||||
echo "🔧 Validating app: $app"
|
||||
helm lint charts/$app || exit 1
|
||||
helm template charts/$app -f manifest/$app/values-int.yaml || exit 1
|
||||
done
|
||||
|
||||
- name: done
|
||||
image: alpine
|
||||
commands:
|
||||
- echo "✅ Pipeline finished successfully"
|
||||
|
||||
when:
|
||||
event: push
|
||||
- echo "✅ All changed apps passed lint and render. ArgoCD will sync them automatically."
|
||||
|
||||
28
woodpecker-pipeline-example.yml
Normal file
28
woodpecker-pipeline-example.yml
Normal 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
|
||||
Loading…
x
Reference in New Issue
Block a user