add jenkins pipeline

This commit is contained in:
Vincent Guillet
2025-11-20 16:10:38 +01:00
parent 6ef5b998a4
commit 028bd80669

View File

@@ -24,7 +24,15 @@ pipeline {
stage('Maven Build') {
steps {
dir('api') {
sh 'mvn compile'
sh 'mvn clean compile'
}
}
}
stage('Maven Test') {
steps {
dir('api') {
sh 'mvn test'
}
}
}
@@ -38,48 +46,28 @@ pipeline {
}
}
stage('Maven Test') {
steps {
dir('api') {
sh 'mvn test'
}
}
}
stage('Spring Docker Build') {
steps {
dir('api') {
sh 'docker-compose build spring'
}
sh 'docker-compose build spring'
}
}
stage('Angular Docker Build') {
steps {
dir('client') {
sh 'docker-compose build angular'
}
sh 'docker-compose build angular'
}
}
stage('Spring Deployment') {
steps {
sh """
docker-compose stop spring
docker-compose rm spring
docker-compose up -d --no-recreate spring
"""
sh 'docker-compose up -d spring'
}
}
stage('Angular Deployment') {
steps {
sh """
docker-compose stop angular
docker-compose rm angular
docker-compose up -d --no-recreate angular
"""
sh 'docker-compose up -d angular'
}
}
}
}
}