-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathJenkinsfile
71 lines (71 loc) · 2.03 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
// Author: Sebastian Warnholz
pipeline {
agent { label 'limit-s' }
options { disableConcurrentBuilds() }
triggers {
cron('H 0 * * 0')
}
environment {
LABEL = sh(script: '''
if [ $BRANCH_NAME = "master" ]; then
echo "latest"
else
echo $BRANCH_NAME
fi
''', , returnStdout: true).trim()
NWORKERS = 2
MEMORY = "10g"
}
stages {
stage('r-base') {
steps {
withDockerRegistry([ credentialsId: "jenkins-docker-hub", url: "" ]) {
sh '''
docker build -t inwt/r-base:$LABEL r-base
docker push inwt/r-base:$LABEL
'''
}
}
}
stage('r-batch') {
steps {
withDockerRegistry([ credentialsId: "jenkins-docker-hub", url: "" ]) {
sh '''
docker build -t inwt/r-batch:$LABEL r-batch
docker push inwt/r-batch:$LABEL
'''
}
}
}
stage('r-shiny') {
steps {
withDockerRegistry([ credentialsId: "jenkins-docker-hub", url: "" ]) {
sh '''
docker build -t inwt/r-shiny:$LABEL r-shiny
docker push inwt/r-shiny:$LABEL
'''
}
}
}
stage('r-model') {
steps {
withDockerRegistry([ credentialsId: "jenkins-docker-hub", url: "" ]) {
sh '''
docker build -t inwt/r-model:$LABEL r-model
docker push inwt/r-model:$LABEL
'''
}
}
}
stage('r-geos') {
steps {
withDockerRegistry([ credentialsId: "jenkins-docker-hub", url: "" ]) {
sh '''
docker build -t inwt/r-geos:$LABEL r-geos
docker push inwt/r-geos:$LABEL
'''
}
}
}
}
}