diff --git a/proiect-nutritie/Jenkinsfile b/proiect-nutritie/Jenkinsfile index 6b62cf5..6641e4f 100644 --- a/proiect-nutritie/Jenkinsfile +++ b/proiect-nutritie/Jenkinsfile @@ -1,26 +1,34 @@ pipeline { agent any + + tools { + maven 'MVN-WSL' + } stages { stage('Checkout') { steps { - // Jenkins ia automat codul de pe branch-ul develop checkout scm } } + stage('Maven Analysis') { + steps { + sh 'mvn --version' + echo 'Maven a fost integrat cu succes în pipeline-ul de Python!' + } + } + stage('Build Docker Image') { steps { - // Mergem în folderul proiectului și facem build dir('proiect-nutritie') { sh 'docker build -t dieta-app-jenkins .' } } } - stage('Clean & Deploy') { + stage('Deploy') { steps { - // Oprim ce rulează manual (pe portul 8085) și pornim versiunea Jenkins sh ''' docker stop test-dieta || true docker rm test-dieta || true