From 474ef6c743e4a81496d36583ec7dc73cf3dc8aaf Mon Sep 17 00:00:00 2001 From: Ralph Bean Date: Jan 18 2018 17:05:09 +0000 Subject: Tag successful builds with "master". We were looking at deploying the "latest" tag to open.paas/waiverdb-stg, but we didn't want to conflate "latest" usable with "latest" passed CI. The attempt here is to create an automatic tracking tag for everything that has merged into master and passed CI, called `master`. We could have our openshift staging environments pull from here while we instead have our openshift prod environments pull from a manually curated `latest` tag. How does that sound? :) --- diff --git a/Jenkinsfile b/Jenkinsfile index a992791..d4d7bb5 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -155,6 +155,19 @@ node('fedora') { } } } +node('docker') { + checkout scm + stage('Tag container with "master"') { + 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/waiverdb:${appversion}") + image.push('master') + } + } +} } catch (e) { if (ownership.job.ownershipEnabled) {