From 8772dda3a583408ac00dc284ef40114b5e1d5aa5 Mon Sep 17 00:00:00 2001 From: Ralph Bean Date: Apr 18 2018 03:14:46 +0000 Subject: Try pushing images also to quay.io. I hear it's a thing. --- diff --git a/Jenkinsfile b/Jenkinsfile index 2750520..8e87743 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -74,6 +74,13 @@ node('docker') { def image = docker.build "factory2/freshmaker:${appversion}", "--build-arg freshmaker_rpm=$f26_rpm --build-arg cacert_url=https://password.corp.redhat.com/RH-IT-Root-CA.crt ." image.push() } + /* Build and push the same image with the same tag to quay.io, but without the cacert. */ + docker.withRegistry( + 'https://quay.io/', + 'quay-io-factory2-builder-sa-credentials') { + def image = docker.build "factory2/freshmaker:${appversion}", "--build-arg freshmaker_rpm=$f26_rpm ." + image.push() + } /* Save container version for later steps (this is ugly but I can't find anything better...) */ writeFile file: 'appversion', text: appversion archiveArtifacts artifacts: 'appversion' @@ -93,6 +100,12 @@ node('docker') { def image = docker.image("factory2/freshmaker:${appversion}") image.push('latest') } + docker.withRegistry( + 'https://quay.io/', + 'quay-io-factory2-builder-sa-credentials') { + def image = docker.image("factory2/freshmaker:${appversion}") + image.push('latest') + } } } }