diff --git a/Jenkinsfile b/Jenkinsfile index 94625d8..d853fb4 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,7 +1,4 @@ pipeline { - - - agent any parameters { @@ -39,8 +36,6 @@ pipeline { 🏷️ Tag Docker = ${env.TAG} 📂 Chemin de déploiement = ${env.DEPLOY_PATH} """ - - sh "ls -l ${env.DEPLOY_PATH} || echo '⚠️ Dossier non accessible depuis Jenkins'" } } } @@ -70,9 +65,18 @@ pipeline { } stage('Build Frontend') { + agent { + docker { + image 'node:20' + args '-u root' + } + } steps { echo "⚙️ Build de l’application Next.js..." - sh 'npm run build' + sh ''' + npm ci + npm run build + ''' } }