I got what I wanted. Perhaps it's not an elegant solution: 1) The build begins by first running a Groovy script. It checks if a Git tag exists. It then puts the property TAGGED=true/false into a properties file. 2) Then I use "Inject Environment Variables" from this properties file. 3) I use this environment property in Conditional BuildStep:
Conditional Step (single) -> Not -> Boolean -> Token = ${ENV,TAGGED} Would be much better if the Git Parameter Plugin could be used instead. tirsdag 24. februar 2015 10.02.31 UTC+1 skrev Sverre Moe følgende: > > I have defined a conditional build step that should check for a given git > tag before executing a shell script. > Using the Conditional BuildStep Plugin > <https://wiki.jenkins-ci.org/display/JENKINS/Conditional+BuildStep+Plugin> > > Exception caught evaluating condition: > [org.jenkinsci.plugins.tokenmacro.MacroEvaluationException: Undefined > parameter tag in token GIT_REVISION], action = [Fail the build] > Build step 'Conditional step (single)' changed build result to FAILURE > Build step 'Conditional step (single)' marked build as failure > > > My Configuration: > > Conditional Step (single) -> Boolean -> Token = ${GIT_REVISION, tag="v1.0.0"} > > > I have checked the tag v1.0.0 does exist in the repository. > > > I have installed the necessary Git Parameter Plugin > <https://wiki.jenkins-ci.org/display/JENKINS/Git+Parameter+Plugin> needed to > access this Token Macro in Conditional BuildStep. > > -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/51082351-1c0f-486b-abf1-d46948030874%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.