From d8e1bd0947a922e54c75841b6e4632b9427c85c7 Mon Sep 17 00:00:00 2001 From: Ralph Bean Date: Feb 07 2018 18:49:59 +0000 Subject: Tag commits that pass CI as "latest". Elsewhere, we want to use the latest tag as the deployment stream for dev and staging. We'll manage prod manually with a "prod" tag. Will do functional tests here in a separate change. --- diff --git a/Jenkinsfile b/Jenkinsfile index f1a87b9..edbc041 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -80,7 +80,6 @@ node('fedora') { }, ) } - /* XXX: run functional tests in OpenShift when UpShift is ready */ } node('docker') { checkout scm @@ -110,6 +109,22 @@ node('docker') { archiveArtifacts artifacts: 'appversion' } } + +/* XXX: run functional tests in OpenShift when UpShift is ready */ + +node('docker') { + checkout scm + stage('Tag container with "latest", for dev and stage.') { + unarchive mapping: ['appversion': 'appversion'] + def appversion = readFile('appversion').trim() + docker.withRegistry( + 'https://docker-registry.engineering.redhat.com/', + 'docker-registry-factory2-builder-sa-credentials') { + def image = docker.image("factory2/greenwave:${appversion}") + image.push('latest') + } + } +} } catch (e) { if (ownership.job.ownershipEnabled) { mail to: ownership.job.primaryOwnerEmail,