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

Commit

Permalink
fix(release): add downstream repo
Browse files Browse the repository at this point in the history
  • Loading branch information
rawlingsj committed Apr 3, 2017
1 parent ae5d4da commit 99332d3
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 37 deletions.
54 changes: 26 additions & 28 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,38 +4,36 @@ def utils = new io.fabric8.Utils()
def org = 'fabric8-ui'
def repo = 'npm-pipeline-test-project'
fabric8UINode{
//clientsNode{
ws {
git "https://github.com/${org}/${repo}.git"
readTrusted 'release.groovy'
sh "git remote set-url origin git@github.com:${org}/${repo}.git"
def pipeline = load 'release.groovy'
ws {
git "https://github.com/${org}/${repo}.git"
readTrusted 'release.groovy'
sh "git remote set-url origin git@github.com:${org}/${repo}.git"
def pipeline = load 'release.groovy'

if (utils.isCI()){
container('ui'){
pipeline.ci()
}
} else if (utils.isCD()){
def branch
container('ui'){
branch = utils.getBranch()
}
def published
container('ui'){
published = pipeline.cd(branch)
}
if (utils.isCI()){
container('ui'){
pipeline.ci()
}
} else if (utils.isCD()){
def branch
container('ui'){
branch = utils.getBranch()
}

def published
container('ui'){
published = pipeline.cd(branch)
}

def releaseVersion
container('ui'){
releaseVersion = utils.getLatestVersionFromTag()
}
def releaseVersion
container('ui'){
releaseVersion = utils.getLatestVersionFromTag()
}

if (published){
pipeline.updateDownstreamProjects(releaseVersion)
}
if (published){
pipeline.updateDownstreamProjects(releaseVersion)
}
}
//}
}
}

18 changes: 9 additions & 9 deletions release.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ def cd (b){
}

def updateDownstreamProjects(v){
echo 'we would Update Downstream Projects'
// pushPackageJSONChangePR{
// propertyName = 'ngx-login-client'
// projects = [
// 'fabric8-ui/ngx-fabric8-wit',
// 'fabric8io/fabric8-ui'
// ]
// version = v
// }
pushPackageJSONChangePR{
propertyName = 'fabric8-npm-pipeline-test-prj'
projects = [
'fabric8-ui/fabric8-npm-dependencies'
]
version = v
containerName = 'ui'
autoMerge = true
}
}
return this

0 comments on commit 99332d3

Please sign in to comment.