-
Notifications
You must be signed in to change notification settings - Fork 3
/
Jenkinsfile
37 lines (33 loc) · 897 Bytes
/
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
#!/usr/bin/env groovy
pipeline {
agent any
environment {
VALUE_ONE = '1'
VALUE_TWO = '2'
VALUE_THREE = '3'
}
stages {
stage("Script Execution") {
when {
branch 'master'
}
steps {
echo 'Script Execution Started'
sh 'docker run -it --rm --name downloader -v "$PWD":/usr/src/app -w /usr/src/app python:2 python downloader.py'
}
}
stage("Script Ended") {
steps {
echo 'Script Completed'
}
}
}
post {
failure {
// notify users when the Pipeline fails
mail to: '[email protected]',
subject: "Failed Pipeline: ${currentBuild.fullDisplayName}",
body: "Something is wrong with ${env.BUILD_URL}"
}
}
}