diff --git a/ci-scripts/Jenkinsfile-GitLab-Container b/ci-scripts/Jenkinsfile-GitLab-Container index 44d857f1dc..3301c133ec 100644 --- a/ci-scripts/Jenkinsfile-GitLab-Container +++ b/ci-scripts/Jenkinsfile-GitLab-Container @@ -267,6 +267,23 @@ pipeline { } } } + stage ("DockerHub-Push") { + when { expression {doBuild && "PUSH".equals(env.gitlabActionType)} } + steps { + script { + triggerSlaveJob ('RAN-DockerHub-Push', 'DockerHub-Push') + } + } + post { + failure { + script { + echo "Push to Docker-Hub KO" + currentBuild.result = 'FAILURE' + failingStages += '\n * RAN-DockerHub-Push' + } + } + } + } stage ("Image Test Processes") { when { expression {doBuild} } parallel { @@ -756,23 +773,6 @@ pipeline { } } } - stage ("DockerHub-Push") { - when { expression {doBuild && "PUSH".equals(env.gitlabActionType)} } - steps { - script { - triggerSlaveJob ('RAN-DockerHub-Push', 'DockerHub-Push') - } - } - post { - failure { - script { - echo "Push to Docker-Hub KO" - currentBuild.result = 'FAILURE' - failingStages += '\n * RAN-DockerHub-Push' - } - } - } - } } post { success { diff --git a/ci-scripts/Jenkinsfile-push-registry b/ci-scripts/Jenkinsfile-push-registry index 8f54d352b1..ccd91e28ff 100644 --- a/ci-scripts/Jenkinsfile-push-registry +++ b/ci-scripts/Jenkinsfile-push-registry @@ -84,12 +84,9 @@ pipeline { sh "docker login -u ${DH_Username} -p ${DH_Password} > /dev/null 2>&1" sh "docker login -u oaicicd -p oaicicd ${OAI_Registry} > /dev/null 2>&1" listOfImages.eachWithIndex { item, iindex -> - sh "docker pull --quiet ${OAI_Registry}/${item}:develop-${WEEK_SHA}" - sh "docker image tag ${OAI_Registry}/${item}:develop-${WEEK_SHA} ${DH_Account}/${item}:develop" - sh "docker image tag ${OAI_Registry}/${item}:develop-${WEEK_SHA} ${DH_Account}/${item}:${WEEK_TAG}" - sh "docker push --quiet ${DH_Account}/${item}:${WEEK_TAG}" - sh "docker push --quiet ${DH_Account}/${item}:develop" - sh "docker rmi ${DH_Account}/${item}:${WEEK_TAG} ${DH_Account}/${item}:develop ${OAI_Registry}/${item}:develop-${WEEK_SHA}" + sh "docker rmi ${DH_Account}/${item}:${WEEK_TAG} ${DH_Account}/${item}:develop || true" + sh "docker buildx imagetools create --tag ${DH_Account}/${item}:${WEEK_TAG} ${OAI_Registry}/${item}:armv8_develop-${WEEK_SHA} ${OAI_Registry}/${item}:develop-${WEEK_SHA}" + sh "docker buildx imagetools create --tag ${DH_Account}/${item}:develop ${OAI_Registry}/${item}:armv8_develop-${WEEK_SHA} ${OAI_Registry}/${item}:develop-${WEEK_SHA}" } // Proxy is not following the same pattern. sh "docker image tag proxy:develop ${DH_Account}/proxy:develop"