Browse Source

Need to package all charts first

master
Fábio Kaiser Rauber 2 weeks ago
parent
commit
f18494e581
  1. 12
      .drone.yml

12
.drone.yml

@ -10,14 +10,16 @@ steps:
- find charts -maxdepth 2 -type d -regex ".*/v[0-9]+\.[0-9]+\.[0-9]+" -exec helm lint {} \; - find charts -maxdepth 2 -type d -regex ".*/v[0-9]+\.[0-9]+\.[0-9]+" -exec helm lint {} \;
# Step 2: Package only changed Helm charts # Step 2: Package only changed Helm charts
- name: package-changed-charts - name: package-all-charts
image: alpine/helm:latest image: alpine/helm:latest
commands: commands:
- mkdir -p charts/dist - mkdir -p charts/dist
# Detect changed versioned chart directories (e.g., charts/my-chart/v1.0.0) # Find all versioned chart directories
- CHANGED_CHARTS=$(git diff --name-only $DRONE_PREV_COMMIT $DRONE_COMMIT | grep '^charts/.*v[0-9]\+\.[0-9]\+\.[0-9]\+' | sed 's|/[^/]*$||' | sort -u) - ALL_CHARTS=$(find charts -maxdepth 2 -type d -regex ".*/v[0-9]+\.[0-9]+\.[0-9]+")
- if [ -n "$CHANGED_CHARTS" ]; then echo "$CHANGED_CHARTS" | xargs -I {} helm package {} --destination charts/dist; else echo "No charts changed"; fi - "echo \"Detected charts: $ALL_CHARTS\""
- mkdir -p charts/dist - if [ -n "$ALL_CHARTS" ]; then echo "$ALL_CHARTS" | xargs -I {} helm package {} --destination charts/dist; else echo "No charts found in repository"; exit 1; fi
# Debug: List packaged files
- ls -la charts/dist/ || echo "No files in charts/dist/"
depends_on: depends_on:
- lint-charts - lint-charts

Loading…
Cancel
Save