Update jenkinsfile-fullbuild
This commit is contained in:
1 parent
d482c09e90
commit
2f0232e9ba
1 file changed
+20
-3
+20
-3
@@ -7,6 +7,14 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
stages {
|
stages {
|
||||||
|
stage('Checkout') {
|
||||||
|
steps {
|
||||||
|
git(
|
||||||
|
url: 'https://github.com/spring-projects/spring-petclinic.git',
|
||||||
|
branch: 'main'
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
stage('Build') {
|
stage('Build') {
|
||||||
steps {
|
steps {
|
||||||
mavenBuild(goals: 'clean package -DskipTests')
|
mavenBuild(goals: 'clean package -DskipTests')
|
||||||
@@ -21,9 +29,7 @@ pipeline {
|
|||||||
steps {
|
steps {
|
||||||
container('build') {
|
container('build') {
|
||||||
sh '''
|
sh '''
|
||||||
tar -czf app.tar.gz target/*.jar 2>/dev/null || \
|
tar -czf app.tar.gz target/*.jar
|
||||||
tar -czf app.tar.gz src/ requirements.txt 2>/dev/null || \
|
|
||||||
tar -czf app.tar.gz .
|
|
||||||
ls -lh app.tar.gz
|
ls -lh app.tar.gz
|
||||||
'''
|
'''
|
||||||
}
|
}
|
||||||
@@ -40,4 +46,15 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
post {
|
||||||
|
success {
|
||||||
|
echo "Pipeline terminé avec succès ✅"
|
||||||
|
}
|
||||||
|
failure {
|
||||||
|
echo "Pipeline en échec ❌"
|
||||||
|
}
|
||||||
|
cleanup {
|
||||||
|
cleanWs()
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user