forked from fabric8-ui/fabric8-recommender
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
41 lines (36 loc) · 917 Bytes
/
Jenkinsfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/usr/bin/groovy
@Library('github.com/fabric8io/fabric8-pipeline-library@master')
def utils = new io.fabric8.Utils()
def org = 'fabric8-ui'
def repo = 'fabric8-recommender'
fabric8UINode{
ws {
checkout scm
readTrusted 'release.groovy'
def pipeline = load 'release.groovy'
if (utils.isCI()){
container('ui'){
pipeline.ci()
}
} else if (utils.isCD()){
sh "git checkout master"
sh "git pull"
sh "git remote set-url origin [email protected]:${org}/${repo}.git"
def branch
container('ui'){
branch = utils.getBranch()
}
def published
container('ui'){
published = pipeline.cd(branch)
}
def releaseVersion
container('ui'){
releaseVersion = utils.getLatestVersionFromTag()
}
if (published){
pipeline.updateDownstreamProjects(releaseVersion)
}
}
}
}