Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
add push to i2incommon repo
  • Loading branch information
pcaskey committed Nov 3, 2022
1 parent 587f3a6 commit e493d94
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Expand Up @@ -3,8 +3,8 @@ FROM centos:centos7
# Define args and set a default value
ARG maintainer=tier
ARG imagename=shibboleth_sp
ARG version=3.3.0
ARG TIERVERSION=20211202
ARG version=3.4.0
ARG TIERVERSION=20221103

MAINTAINER $maintainer
LABEL Vendor="Internet2"
Expand Down
14 changes: 13 additions & 1 deletion Jenkinsfile
Expand Up @@ -17,6 +17,7 @@ node('docker') {
stage 'Setting build context'

def maintainer = maintainer()
def previous_maintainer = previous_maintainer()
def imagename = imagename()
def tag

Expand Down Expand Up @@ -64,10 +65,16 @@ node('docker') {
sh 'bin/ci-stop.sh'

stage 'Push'
docker.withRegistry('https://registry.hub.docker.com/', "dockerhub-$maintainer") {
docker.withRegistry('https://registry.hub.docker.com/', "dockerhub-$previous_maintainer") {
def baseImg = docker.build("$maintainer/$imagename", "--no-cache .")
baseImg.push("$tag")
}

docker.withRegistry('https://registry.hub.docker.com/', "dockerhub-$previous_maintainer") {
def altImg = docker.build("$previous_maintainer/$imagename", "--no-cache .")
altImg.push("$tag")
}


stage 'Notify'

Expand All @@ -79,6 +86,11 @@ def maintainer() {
matcher ? matcher[0][1] : 'tier'
}

def previous_maintainer() {
def matcher = readFile('common.bash') =~ 'previous_maintainer="(.+)"'
matcher ? matcher[0][1] : 'tier'
}

def imagename() {
def matcher = readFile('common.bash') =~ 'imagename="(.+)"'
matcher ? matcher[0][1] : null
Expand Down
5 changes: 3 additions & 2 deletions common.bash
@@ -1,3 +1,4 @@
maintainer="tier"
maintainer="i2incommon"
previous_maintainer="tier"
imagename="shibboleth_sp"
version="3.2.3"
version="3.4.0"

0 comments on commit e493d94

Please sign in to comment.