mcmillian.dev/Jenkinsfile
Morgan McMillian 226e732db5
Some checks failed
thrrgilag/mcmillian.dev/pipeline/head There was a failure building this commit
git.dreamfall.space/mcmillian.dev/pipeline/head This commit looks good
move deployment
2024-09-08 11:56:47 -07:00

27 lines
1.1 KiB
Groovy

pipeline {
agent none
environment {
CHAT = "spacenerdmo@clacks.network"
MAIL = "morgan@mcmillian.dev"
ANSIBLE_HOST_KEY_CHECKING = "False"
}
stages {
stage('Execute playbook') {
agent { label 'ansible' }
steps {
ansiblePlaybook(playbook: "main.yaml", inventory: "hosts.ini", credentialsId: "website-deploy")
}
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}"
}
}
}
}
}