From 9896dfdcec946df16959427fa4fee437c3687b10 Mon Sep 17 00:00:00 2001 From: Van Leemput Dayron Date: Mon, 15 Dec 2025 18:26:34 +0100 Subject: [PATCH] chore: remove Jenkinsfile --- jenkinsfile | 56 ----------------------------------------------------- 1 file changed, 56 deletions(-) delete mode 100644 jenkinsfile diff --git a/jenkinsfile b/jenkinsfile deleted file mode 100644 index 3721650..0000000 --- a/jenkinsfile +++ /dev/null @@ -1,56 +0,0 @@ -pipeline { - agent any - - // Assurez-vous d'avoir configuré l'outil "NodeJS 20" dans Jenkins (Global Tool Configuration) - tools { - nodejs 'NodeJS 20' - } - - environment { - // Variables pour éviter de répéter les chemins - FRONT_DEST = '/var/www/xeewy.be' - BACK_DEST = '/var/www/xeewy/backend' - SERVICE_NAME = 'xeewy-backend' - } - - stages { - stage('Build Frontend') { - steps { - echo '--- Building React Frontend ---' - dir('frontend') { - sh 'npm install' - sh 'npm run build' - } - } - } - - stage('Deploy Frontend') { - steps { - echo '--- Deploying Frontend to Apache folder ---' - sh "rm -rf ${FRONT_DEST}/*" - sh "cp -r frontend/build/* ${FRONT_DEST}/" - } - } - - stage('Deploy Backend') { - steps { - echo '--- Deploying Backend Code ---' - // On copie le code backend vers sa destination - // On exclut node_modules pour éviter de copier des milliers de fichiers inutilement - sh "rsync -av --exclude='node_modules' backend/ ${BACK_DEST}/" - - dir("${BACK_DEST}") { - sh 'npm install --production' - } - } - } - - stage('Restart Service') { - steps { - echo '--- Restarting Node.js Service ---' - // Nécessite la règle sudo NOPASSWD configurée précédemment - sh "sudo systemctl restart ${SERVICE_NAME}" - } - } - } -} \ No newline at end of file