Skip to content

Instantly share code, notes, and snippets.

@tankhuu
Created May 6, 2020 03:16
Show Gist options
  • Save tankhuu/c537a3fff4b3512ddfb24f34d1efbcff to your computer and use it in GitHub Desktop.
Save tankhuu/c537a3fff4b3512ddfb24f34d1efbcff to your computer and use it in GitHub Desktop.
Jenkins Notes
environment {
FULL_PATH_BRANCH = "${sh(script:'git name-rev --name-only HEAD', returnStdout: true)}"
GIT_BRANCH = FULL_PATH_BRANCH.substring(FULL_PATH_BRANCH.lastIndexOf('/') + 1, FULL_PATH_BRANCH.length())
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment