stages: - build - test - deploy build-job: stage: build tags: - deploiement script: - echo "Compilation du code..." # Ajoutez vos commandes de build ici test-job: stage: test tags: - deploiement script: - echo "Exécution des tests..." # Ajoutez vos commandes de test ici deploy-job: stage: deploy tags: - deploiement script: - echo "Déploiement sur Portainer..." - echo "Utilisation du token API de Portainer..." - | API_KEY="$PORTAINER_API_KEY" - | curl -s -X PUT \ -H "Authorization: Bearer $API_KEY" \ -H "Content-Type: application/json" \ -d '{"Prune": true}' \ http://$PORTAINER_URL/api/stacks/$STACK_ID/deploy - echo "Déploiement terminé." dependencies: - build-job - test-job