Skip to content
Permalink
Newer
Older
100644 67 lines (49 sloc) 1.38 KB
3
stage 'Checkout'
4
5
checkout scm
6
7
stage 'Acquire util'
8
9
sh 'mkdir -p bin'
10
dir('bin'){
11
git([ url: "https://github.internet2.edu/docker/util.git",
12
credentialsId: "jenkins-github-access-token" ])
13
sh 'ls'
14
sh 'mv bin/* .'
15
}
17
stage 'Acquire conftree'
18
19
sh 'mkdir -p root'
20
dir('root'){
21
git([ url: "https://github.internet2.edu/docker/shib-idp-conftree.git",
22
branch: "test", credentialsId: "jenkins-github-access-token" ])
23
}
24
25
stage 'Build'
26
27
def maintainer = maintainer()
28
def imagename = imagename()
29
def tag = env.BRANCH_NAME
30
if(!imagename){
31
echo "You must define an imagename in common.bash"
32
currentBuild.result = 'FAILURE'
33
}
34
if(maintainer){
35
echo "Building ${maintainer}:${tag} for ${maintainer}"
36
}
37
38
sh 'bin/rebuild.sh'
39
40
stage 'Start container'
41
42
sh 'bin/ci-run.sh'
44
stage 'Tests'
45
46
sh 'bin/test.sh'
47
// should build a finally construct here
48
stage 'Stop container'
49
50
sh 'bin/ci-stop.sh'
51
52
}
53
54
def maintainer() {
55
def matcher = readFile('common.bash') =~ 'maintainer="(.+)"'
56
matcher ? matcher[0][1] : 'tier'
57
}
58
59
def imagename() {
60
def matcher = readFile('common.bash') =~ 'imagename="(.+)"'
61
matcher ? matcher[0][1] : null
62
}
64
def version() {
65
def matcher = readFile('common.bash') =~ 'version="(.+)"'
66
matcher ? matcher[0][1] : null
You can’t perform that action at this time.