Skip to content

Instantly share code, notes, and snippets.

@quangthe
Forked from bcomnes/Jenkinsfile
Last active April 3, 2022 14:40
Show Gist options
  • Save quangthe/fca4f83a41919ad0eb12cb8a75556a17 to your computer and use it in GitHub Desktop.
Save quangthe/fca4f83a41919ad0eb12cb8a75556a17 to your computer and use it in GitHub Desktop.
Jenkinsfile stuff, Jenkins 101
/*
Git env vars you might need in jenkins
Jenkins ENV Reference:
env.GIT_COMMIT: the commit sha of the current build
env.BRANCH_NAME: the branch name OR tag name of the current build, when it exists
env.GIT_BRANCH: same as BRANCH_NAME
env.TAG_NAME: the tag name of the current build, when it exists
*/
// stash and unstash
stash includes: 'base-demo-webapp/target/*.war', name: 'magnolia-webapp'
dir('where') {
unstash 'magnolia-webapp'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment