add jenkins pipeline
This commit is contained in:
34
jenkinsfile
34
jenkinsfile
@@ -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,47 +46,27 @@ pipeline {
|
||||
}
|
||||
}
|
||||
|
||||
stage('Maven Test') {
|
||||
steps {
|
||||
dir('api') {
|
||||
sh 'mvn test'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Spring Docker Build') {
|
||||
steps {
|
||||
dir('api') {
|
||||
sh 'docker-compose build spring'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Angular Docker Build') {
|
||||
steps {
|
||||
dir('client') {
|
||||
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'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user