Update jenkinsfile-fullbuild
This commit is contained in:
1 parent
d482c09e90
commit
2f0232e9ba
1 file changed
+21
-4
+21
-4
@@ -7,6 +7,14 @@ pipeline {
|
||||
}
|
||||
}
|
||||
stages {
|
||||
stage('Checkout') {
|
||||
steps {
|
||||
git(
|
||||
url: 'https://github.com/spring-projects/spring-petclinic.git',
|
||||
branch: 'main'
|
||||
)
|
||||
}
|
||||
}
|
||||
stage('Build') {
|
||||
steps {
|
||||
mavenBuild(goals: 'clean package -DskipTests')
|
||||
@@ -21,9 +29,7 @@ pipeline {
|
||||
steps {
|
||||
container('build') {
|
||||
sh '''
|
||||
tar -czf app.tar.gz target/*.jar 2>/dev/null || \
|
||||
tar -czf app.tar.gz src/ requirements.txt 2>/dev/null || \
|
||||
tar -czf app.tar.gz .
|
||||
tar -czf app.tar.gz target/*.jar
|
||||
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