Skip to content

Instantly share code, notes, and snippets.

@juleedev
Created August 15, 2018 18:48
Show Gist options
  • Save juleedev/22b5cb67b2bc77442c7b08e2f76a9232 to your computer and use it in GitHub Desktop.
Save juleedev/22b5cb67b2bc77442c7b08e2f76a9232 to your computer and use it in GitHub Desktop.
node {
sshagent(['root']) {
stage('Get User input') {
if (params.location) {
println "Property: ${location}"
}
else {
error "You must choose a location"
}
}
stage("Download inventory file for specified location") {
def inventory = "git archive --remote [email protected]:testrepo.git HEAD ${location}".execute()
inventory.waitForOrKill(1000)
println(inventory.text)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment