-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathJenkinsfile
62 lines (54 loc) · 1.15 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
pipeline {
// TODO: Make this cleaner: https://issues.jenkins-ci.org/browse/JENKINS-42643
triggers {
upstream(
upstreamProjects: (env.BRANCH_NAME == 'master' ? 'ocf/utils/master' : ''),
threshold: hudson.model.Result.SUCCESS,
)
// Build fresh base images every day at 9 PM.
// The time of day doesn't really matter on this, but when it builds
// successfully it triggers other builds which could have failures, so this
// should probably be during a time when people are awake.
cron('0 21 * * *')
}
agent {
label 'slave'
}
options {
ansiColor('xterm')
timeout(time: 1, unit: 'HOURS')
timestamps()
}
stages {
stage('check-gh-trust') {
steps {
checkGitHubAccess()
}
}
stage('attempt-build-images') {
steps {
sh 'make build'
}
}
stage('build-without-cache-and-push-images') {
when {
branch 'master'
}
agent {
label 'deploy'
}
steps {
sh 'make push'
}
}
}
post {
failure {
emailNotification()
}
always {
ircNotification()
}
}
}
// vim: ft=groovy