switching to deploy from jenkins
Some checks failed
thrrgilag/mcmillian.us/pipeline/head There was a failure building this commit
Some checks failed
thrrgilag/mcmillian.us/pipeline/head There was a failure building this commit
This commit is contained in:
parent
2cffd47ce6
commit
2db8ac0287
1 changed files with 26 additions and 0 deletions
26
Jenkinsfile
vendored
Normal file
26
Jenkinsfile
vendored
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
pipeline {
|
||||||
|
agent none
|
||||||
|
environment {
|
||||||
|
CHAT = "morgan@mcmillian.dev"
|
||||||
|
MAIL = "morgan@mcmillian.dev"
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
stage('Execute playbook') {
|
||||||
|
agent { label 'ansible' }
|
||||||
|
steps {
|
||||||
|
ansiblePlaybook(playbook: "main.yml", inventory: "hosts.ini", credentialsId: "igor")
|
||||||
|
}
|
||||||
|
post {
|
||||||
|
success {
|
||||||
|
jabberNotify buildToChatNotifier: [$class: 'ExtraMessageOnlyBuildToChatNotifier'], extraMessage: 'Deploy Succeeded', notifySuspects: true, targets: "${CHAT}"
|
||||||
|
}
|
||||||
|
failure {
|
||||||
|
jabberNotify buildToChatNotifier: [$class: 'ExtraMessageOnlyBuildToChatNotifier'], extraMessage: 'Deploy Failed', notifySuspects: true, targets: "${CHAT}"
|
||||||
|
mail to: "${MAIL}",
|
||||||
|
subject: "Deploy Failed: ${currentBuild.fullDisplayName}",
|
||||||
|
body: "Something is wrong with ${env.BUILD_URL}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue