This repository has been archived by the owner on May 7, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update the tag of the docker image in the targeted repos (#15)
Related to #14
- Loading branch information
1 parent
706deb1
commit d83b3a1
Showing
1 changed file
with
22 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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') { | ||
|
@@ -19,6 +19,7 @@ dockerNode{ | |
sh "docker push ${imageName}:${tempVersion}" | ||
} | ||
} | ||
|
||
stage('notify'){ | ||
def changeAuthor = env.CHANGE_AUTHOR | ||
if (!changeAuthor){ | ||
|
@@ -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" | ||
|
@@ -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' | ||
} | ||
} |