This commit is contained in:
Ionel Andrei Cataon
2026-02-18 15:20:28 +02:00
parent d9285fb410
commit 6b8d5d505c

View File

@@ -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