CI/CD
Intégrez GitScrum CLI dans vos pipelines CI/CD. Exemples pour GitHub Actions, GitLab CI et Bitbucket Pipelines.
Automatisez les mises à jour de tâches dans vos pipelines.
Authentification
export GITSCRUM_ACCESS_TOKEN="votre-token"Stockez le token dans les secrets de votre plateforme CI.
GitHub Actions
name: Deploy
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Installer GitScrum CLI
run: curl -fsSL https://cli.gitscrum.com/install.sh | sh
- name: Mettre à jour tâche
run: |
TASK_ID=$(git log -1 --format=%s | grep -oE 'GS-[0-9]+' | head -1)
if [ -n "$TASK_ID" ]; then
gitscrum task update $TASK_ID --status deployed
fi
env:
GITSCRUM_ACCESS_TOKEN: ${{ secrets.GITSCRUM_ACCESS_TOKEN }}GitLab CI
update-gitscrum:
stage: notify
script:
- curl -fsSL https://cli.gitscrum.com/install.sh | sh
- TASK_ID=$(echo $CI_COMMIT_MESSAGE | grep -oE 'GS-[0-9]+' | head -1)
- |
if [ -n "$TASK_ID" ]; then
gitscrum task update $TASK_ID --status deployed
fi
variables:
GITSCRUM_ACCESS_TOKEN: $GITSCRUM_ACCESS_TOKENMeilleures Pratiques
- Stockez les tokens comme secrets
- N'affichez jamais les tokens dans les logs
- Cachez le CLI pour des builds plus rapides