forked from nordic-institute/X-Road
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
49 lines (49 loc) · 1.46 KB
/
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
41
42
43
44
45
46
47
48
49
pipeline {
agent any
stages {
stage("SCM") {
steps {
echo 'SCM'
checkout scm
}
}
stage('Compile Code') {
agent {
dockerfile {
dir 'src/packages/docker-compile'
additionalBuildArgs '--build-arg uid=$(id -u) --build-arg gid=$(id -g)'
args '-itv cache-gradle:/mnt/gradle-cache -v cache-rvm:/home/builder/.rvm'
reuseNode true
}
}
steps {
sh 'cd src && ./update_ruby_dependencies.sh'
sh 'cd src && ./compile_code.sh'
}
}
stage('Debian build') {
agent {
dockerfile {
dir 'src/packages/docker-debbuild'
args '-v /etc/passwd:/etc/passwd:ro -v /etc/group:/etc/group:ro -e HOME=/tmp'
reuseNode true
}
}
steps {
sh './src/deb-docker.sh'
}
}
stage('RedHat build') {
agent {
dockerfile {
dir 'src/packages/docker-rpmbuild'
args '-v /etc/passwd:/etc/passwd:ro -v /etc/group:/etc/group:ro -e HOME=/workspace/src/packages'
reuseNode true
}
}
steps {
sh './src/rpm-docker.sh'
}
}
}
}