Actualiser Jenkinsfile
This commit is contained in:
parent
04e519681b
commit
52fb9f61f1
17
Jenkinsfile
vendored
17
Jenkinsfile
vendored
|
|
@ -1,10 +1,5 @@
|
||||||
pipeline {
|
pipeline {
|
||||||
agent {
|
agent { docker { image 'node:20' } }
|
||||||
docker {
|
|
||||||
image 'node:20' // 👉 exécuter dans un conteneur Node.js
|
|
||||||
args '-u root:root' // pour avoir les droits nécessaires
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
stages {
|
stages {
|
||||||
stage('Checkout') {
|
stage('Checkout') {
|
||||||
|
|
@ -34,8 +29,10 @@ pipeline {
|
||||||
stage('Deploy') {
|
stage('Deploy') {
|
||||||
steps {
|
steps {
|
||||||
sh '''
|
sh '''
|
||||||
docker compose down
|
echo "🚀 Déploiement du frontend via Docker Compose..."
|
||||||
docker compose up -d --build
|
cd /srv/devops/the-tip-top
|
||||||
|
docker compose down the-tip-top-frontend || true
|
||||||
|
docker compose up -d --build the-tip-top-frontend
|
||||||
'''
|
'''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -43,10 +40,10 @@ pipeline {
|
||||||
|
|
||||||
post {
|
post {
|
||||||
success {
|
success {
|
||||||
echo '✅ Déploiement frontend réussi !'
|
echo "✅ Déploiement réussi !"
|
||||||
}
|
}
|
||||||
failure {
|
failure {
|
||||||
echo '❌ Échec du pipeline Frontend'
|
echo "❌ Échec du pipeline Frontend"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user