Affects Version/s: None
Fix Version/s: 2.0
Jenkins Sonar Plugin 1.8
Number of attachments :
As reported at http://sonar.15.n6.nabble.com/sonar-dev-Jenkins-Plugin-V1-8-Issue-Environment-Variable-Skip-Sonar-Trigger-td4943409.html it seems the skip only works for variables defined as build parameters but not for environment variables.
We're using the Sonar Jenkins plugin (V1.8 on Jenkins 1.462), and would like to skip Sonar when performing a maven release using the "Skip if environment variable is defined" mechanism.
To do so a variable called "IS_M2RELEASEBUILD" is defined in "Release environment variable" for the sonar configuration and we use that same variable name in the job config within the Sonar advanced field "Skip if environment variable is defined". Even though we're setting the variables Sonar is still being run even when creating a release.
For info, we've used a pre-build shell task with an echo of the IS_M2RELEASEBUILD variable, as well as a post-build shell task; both print "true" for the variable value when doing a release. This behaviour has been observed on both Solaris and Win 7 Jenkins environments.
I experienced the same issue. Are we using it the wrong way? Is there a workaround?