added drone ci step
continuous-integration/drone/push Build is failing Details

This commit is contained in:
Kofo Okesola 2025-08-14 03:09:50 +01:00
parent f684db081b
commit 1509fa3f02
1 changed files with 54 additions and 0 deletions

54
.drone.yml Normal file
View File

@ -0,0 +1,54 @@
---
kind: pipeline
type: docker
name: helm-chart-pipeline
workspace:
path: /drone/src
# Only run this pipeline on pushes to the master branch
# Skip the pipeline when the commit message contains [CI SKIP]
trigger:
branch:
- main
event:
- push
steps:
- name: package-and-index
image: alpine/helm:3.12.0
commands:
# Verify the chart directory exists
- 'test -d ./servflow || (echo "Error: servflow directory not found" && exit 1)'
# Update dependencies if they exist
- "if [ -f ./servflow/Chart.lock ]; then helm dependency update ./servflow; fi"
# Make sure charts directory exists
- "mkdir -p ./charts"
# Package the Helm chart into the charts directory
- 'helm package ./servflow -d ./charts || (echo "Error: failed to package chart" && exit 1)'
# Update the Helm repository index
- "helm repo index ./charts"
# Show what was created for debugging
- "ls -la ./charts"
- name: commit-and-push
image: alpine/git
commands:
# Configure Git
- 'git config --global user.name "Drone CI"'
- 'git config --global user.email "drone@example.com"'
# Check if there are changes to commit
- "git add charts/"
- |
if git diff --cached --quiet; then
echo "No changes to commit"
exit 0
fi
# Commit and push changes
- 'git commit -m "Update Helm chart [CI SKIP]"'
- "git push"
# Limit concurrent builds to avoid conflicts when updating the repository
concurrency:
limit: 1