Skip to content

Instantly share code, notes, and snippets.

@Brunty
Created September 30, 2016 15:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Brunty/fd77224689a015a4e559bddf710a98a2 to your computer and use it in GitHub Desktop.
Save Brunty/fd77224689a015a4e559bddf710a98a2 to your computer and use it in GitHub Desktop.
UAT deployments
stage("Deploy to UAT" ) {
node {
def gitCommit = gitCommit()
ansiblePlaybook extraVars: [release_version: "$gitCommit"],
inventory: 'ansible/inventories/uat',
playbook: 'ansible/deploy-uat.yml'
}
}
def gitCommit() {
sh(returnStdout: true, script: 'git rev-parse HEAD').trim()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment