-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathJenkinsfile
37 lines (32 loc) · 964 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
#!groovy
pipeline {
agent {
docker {
image 'braintwister/ubuntu-18.04-docker-18.09'
args '-u root -v /var/run/docker.sock:/var/run/docker.sock -e DOCKER_CONFIG=/tmp -e USER_ID=1000'
alwaysPull true
}
}
options {
timeout(time: 24, unit: 'HOURS')
disableConcurrentBuilds()
}
stages {
stage('Build') {
steps {
withCredentials([[$class: 'UsernamePasswordMultiBinding', credentialsId: 'dockerhub',
usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD']]) {
sh './build.py --latest -vv -u $USERNAME -p $PASSWORD'
}
}
}
}
post {
success {
mail to: 'bernd.doser@braintwister.eu', subject: "SUCCESS: ${currentBuild.fullDisplayName}", body: "Success: ${env.BUILD_URL}"
}
failure {
mail to: 'bernd.doser@braintwister.eu', subject: "FAILURE: ${currentBuild.fullDisplayName}", body: "Failure: ${env.BUILD_URL}"
}
}
}