Add Jenkinsfile for CI/CD pipeline
All checks were successful
the-tip-top-backend/pipeline/head This commit looks good

This commit is contained in:
wkadmin 2025-10-17 12:20:11 +00:00
parent 5a92812927
commit 1058efc409

31
Jenkinsfile vendored Normal file
View File

@ -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."
}
}
}