From 288ddce9dbf2e93a3b81ba46c1234c278d161dd2 Mon Sep 17 00:00:00 2001 From: Ralph Bean Date: Apr 18 2018 01:42:10 +0000 Subject: Try pushing images also to quay.io. I hear it's a thing. --- diff --git a/Jenkinsfile b/Jenkinsfile index 259a382..b48e26d 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -105,6 +105,13 @@ node('docker') { def image = docker.build "factory2/greenwave:${appversion}", "--build-arg greenwave_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/greenwave:${appversion}", "--build-arg greenwave_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' @@ -127,6 +134,12 @@ node('docker') { def image = docker.image("factory2/greenwave:${appversion}") image.push('latest') } + docker.withRegistry( + 'https://quay.io/', + 'quay-io-factory2-builder-sa-credentials') { + def image = docker.image("factory2/greenwave:${appversion}") + image.push('latest') + } } } }