|
|
@@ -89,20 +89,18 @@ pipeline {
|
|
|
// }
|
|
|
// }
|
|
|
|
|
|
- stage('Docker Registry Login and Pull') {
|
|
|
+ stage('Docker Registry Login, Pull, and Push') {
|
|
|
when {
|
|
|
branch 'master'
|
|
|
}
|
|
|
steps {
|
|
|
script {
|
|
|
docker.withRegistry('https://nexus.foodgame.fr:8123', 'nexus') {
|
|
|
- sh """
|
|
|
- docker pull nexus.foodgame.fr:8123/fatboar_master_apache_preprod:latest || \
|
|
|
- docker pull nexus.foodgame.fr:8123/fatboar_master_apache_preprod || {
|
|
|
- echo "Failed to pull image"
|
|
|
- exit 1
|
|
|
- }
|
|
|
- """
|
|
|
+ // Pull image
|
|
|
+ docker.image('nexus.foodgame.fr:8123/fatboar_master_apache_preprod:latest').pull()
|
|
|
+
|
|
|
+ // Push image
|
|
|
+ docker.image('nexus.foodgame.fr:8123/fatboar_master_apache_preprod:latest').push()
|
|
|
}
|
|
|
}
|
|
|
}
|