-
Notifications
You must be signed in to change notification settings - Fork 31
/
Copy pathJenkinsfile
54 lines (46 loc) · 1.39 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
pipeline {
agent any
stages {
stage('Installing dependencies...') {
steps {
sh 'yarn install'
}
}
stage('Running tests...') {
steps {
sh 'yarn test'
}
}
stage('Uploading to CDN...') {
steps {
sh 'yarn upload'
}
}
}
post {
// Always runs. And it runs before any of the other post conditions.
always {
// Let's wipe out the workspace before we finish!
deleteDir()
}
success {
slackSend channel: '#crew-brucke-feed',
color: 'good',
message: "Upload of ${currentBuild.fullDisplayName} completed successfully."
}
failure {
slackSend channel: '#crew-brucke-feed',
color: 'error',
message: "Upload of ${currentBuild.fullDisplayName} has failed."
}
}
// The options directive is for configuration that applies to the whole job.
options {
// For example, we'd like to make sure we only keep 10 builds at a time, so
// we don't fill up our storage!
buildDiscarder(logRotator(numToKeepStr:'10'))
// And we'd really like to be sure that this build doesn't hang forever, so
// let's time it out after an hour.
timeout(time: 60, unit: 'MINUTES')
}
}