forked from sonata-nfv/tng-devops
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
45 lines (45 loc) · 1.55 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
#!/usr/bin/env groovy
pipeline {
agent any
stages {
stage('test sp role') {
steps {
timestamps {
sh 'ansible-playbook roles/sp.yml --check --diff -i environments -e "target=localhost"'
}
}
}
stage('test sdk role') {
steps {
timestamps {
sh 'ansible-playbook roles/sdk.yml --check --diff -i environments -e "target=localhost"'
}
}
}
stage('test vnv role') {
steps {
timestamps {
sh 'ansible-playbook roles/vnv.yml --check --diff -i environments -e "target=localhost"'
}
}
}
}
post {
success {
emailext (
subject: "SUCCESS: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]'",
body: """<p>SUCCESS: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]':</p>
<p>Check console output at "<a href='${env.BUILD_URL}'>${env.JOB_NAME} [${env.BUILD_NUMBER}]</a>"</p>""",
recipientProviders: [[$class: 'DevelopersRecipientProvider']]
)
}
failure {
emailext (
subject: "FAILED: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]'",
body: """<p>FAILED: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]':</p>
<p>Check console output at "<a href='${env.BUILD_URL}'>${env.JOB_NAME} [${env.BUILD_NUMBER}]</a>"</p>""",
recipientProviders: [[$class: 'DevelopersRecipientProvider']]
)
}
}
}