homelab/Jenkinsfile

25 lines
684 B
Plaintext
Raw Normal View History

pipeline {
agent any
2020-09-17 05:19:45 +00:00
stages {
stage('Build') {
steps {
dir ('environments') {
2020-09-16 00:13:08 +00:00
git branch: "${env.BRANCH}",
credentialsId: "${env.AUTHID}",
url: "${env.URL}"
}
2020-09-16 00:13:08 +00:00
ansiblePlaybook playbook: "${env.PLAYBOOK}",
inventory: "${env.INVENTORY}"
}
}
}
2020-09-17 05:01:15 +00:00
post {
failure {
mail to: "${env.EMAIL}",
subject: "$JOB_NAME - Build # $BUILD_NUMBER - ${currentBuild.result}!",
body: "Check console output at $BUILD_URL to view the results."
}
}
}