Skip to content
This repository has been archived by the owner on May 7, 2021. It is now read-only.

Commit

Permalink
Update the tag of the docker image in the targeted repos (#15)
Browse files Browse the repository at this point in the history
Related to #14
  • Loading branch information
Hector Fernandez authored and aslakknutsen committed Aug 18, 2017
1 parent 706deb1 commit d83b3a1
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ def flow = new io.fabric8.Fabric8Commands()
def project = 'fabric8-ui/fabric8-ui-openshift-nginx'
def tempVersion
def imageName = 'fabric8/fabric8-openshift-nginx'

dockerNode{
clientsTemplate{
dockerNode{
if (utils.isCI()){
checkout scm
container(name: 'docker') {
Expand All @@ -19,6 +19,7 @@ dockerNode{
sh "docker push ${imageName}:${tempVersion}"
}
}

stage('notify'){
def changeAuthor = env.CHANGE_AUTHOR
if (!changeAuthor){
Expand All @@ -33,6 +34,8 @@ dockerNode{
flow.addCommentToPullRequest(message, pr, "fabric8-ui/fabric8-ui-openshift-nginx")
}
}


} else if (utils.isCD()){
git "https://github.com/${project}.git"
sh "git remote set-url origin [email protected]:${project}.git"
Expand All @@ -50,5 +53,22 @@ dockerNode{
sh "docker push ${imageName}:latest"
}
}

updateDownstreamRepoDependencies(version)
}
}
}

def updateDownstreamRepoDependencies(v) {
pushNewDockerImageTagChangePR {
propertyName = 'fabric8\\/fabric8-openshift-nginx'
parentDockerfileLocation = 'Dockerfile.deploy'
projects = [
'fabric8-ui/fabric8-ui',
'openshiftio/openshift.io'
]
version = v
autoMerge = false
containerName = 'clients'
}
}

0 comments on commit d83b3a1

Please sign in to comment.