Fixes latest tag problem
testing/ogcore-api/pipeline/head This commit looks good Details

jenkins-provision
Nicolas Arenas 2024-10-25 11:58:05 +02:00
parent 3ee70ef7e6
commit 0908f1bbe9
1 changed files with 6 additions and 1 deletions

7
Jenkinsfile vendored
View File

@ -22,7 +22,8 @@ pipeline {
}
stage('Build Environment') {
steps {
script {
script {
docker.build("${DOCKER_IDENTITY}", '-f docker/Dockerfile-jenkins-php .')
docker.build("${DOCKER_IDENTITY_NGINX}", '-f docker/Dockerfile-nginx .')
}
@ -67,6 +68,10 @@ pipeline {
docker.withRegistry('https://index.docker.io/v1/', 'docker-hub-credentials') {
docker.image("${DOCKER_IDENTITY}").push()
docker.image("${DOCKER_IDENTITY_NGINX}").push()
if (env.BRANCH_NAME == 'main') {
docker.image("${DOCKER_IDENTITY}").push("latest")
docker.image("${DOCKER_IDENTITY_NGINX}").push("latest")
}
}
}
}