diff --git a/backend/Jenkinsfile b/backend/Jenkinsfile new file mode 100644 index 00000000..d5b6f346 --- /dev/null +++ b/backend/Jenkinsfile @@ -0,0 +1,31 @@ +pipeline { + agent any + environment { + COMPOSE_DIR = '/srv/devops/the-tip-top' + SERVICE = 'backend' + } + stages { + stage('Checkout') { + steps { + checkout scm + } + } + stage('Build & Deploy') { + steps { + sh """ + cd ${COMPOSE_DIR} + docker compose up -d ${SERVICE} + """ + } + } + } + post { + success { + echo "✅ Backend déployé avec succès." + } + failure { + echo "❌ Échec du déploiement du backend." + } + } +} +