forked from spring-projects/spring-petclinic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
28 lines (26 loc) · 836 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
pipeline {
agent { docker { image 'maven:3.3.3' } }
stages {
stage('build and test') {
steps {
echo 'Building..'
}
steps {
sh 'mvn package'
}
}
stage('docker image build') {
steps {
echo 'Docker compose..'
}
steps {
sh 'docker-compose down && docker-compose up --build -d'
}
}
}
post {
failure {
mail bcc: '', body: "<b>Example</b><br>\n\<br>Project: ${env.JOB_NAME} <br>Build Number: ${env.BUILD_NUMBER} <br> URL de build: ${env.BUILD_URL}", cc: '', charset: 'UTF-8', from: '', mimeType: 'text/html', replyTo: '', subject: "ERROR CI: Project name -> ${env.JOB_NAME}", to: "[email protected]";
}
}
}