Skip to content

Instantly share code, notes, and snippets.

@mroger
Created May 13, 2019 00:58
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 mroger/ccecc98e8c9dcae04fc7b2c6541a5799 to your computer and use it in GitHub Desktop.
Save mroger/ccecc98e8c9dcae04fc7b2c6541a5799 to your computer and use it in GitHub Desktop.
Jenkinsfile snippet #1
env.headTag = sh(returnStdout: true, script: 'git describe --all --exact-match `git rev-parse HEAD`').trim()
echo env.headTag
if (headTag =~ /^tags\/v\d+.\d+.\d+/) {
currentBuild.result = 'ABORTED'
error 'Ignoring build because there are no new changes'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment