2020-04-03 00:03:40 +00:00
|
|
|
pipeline {
|
|
|
|
agent any
|
2020-09-17 05:19:45 +00:00
|
|
|
|
2020-04-03 00:03:40 +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-04-03 00:03:40 +00:00
|
|
|
}
|
2020-09-16 00:13:08 +00:00
|
|
|
ansiblePlaybook playbook: "${env.PLAYBOOK}",
|
2021-04-23 01:47:40 +00:00
|
|
|
inventory: "${env.INVENTORY}",
|
|
|
|
limit: params.getOrDefault('LIMIT', 'all'),
|
|
|
|
tags: params.getOrDefault('TAGS', 'all')
|
2020-04-03 00:03:40 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
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."
|
|
|
|
}
|
|
|
|
}
|
2020-04-03 00:03:40 +00:00
|
|
|
}
|