Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.8
-
Fix Version/s: 2.0
-
Labels:None
-
Environment:Using Jenkins ver. 1.458, Hudson Sonar Plugin 1.8, Sonar 2.9 & maven 3
-
Number of attachments :
Description
Hello everyone,
A regression seemed to have been introduced by http://jira.codehaus.org/browse/SONARPLUGINS-1309 regarding the handling of environment variables in the "Additional properties" field of the Sonar Jenkins plugin.
For instance, when I was able to set in this field something like "-Dsonar.branch=$
{P_SONAR_BRANCH}" where P_SONAR_BRANCH is one of the parameter of the job, it was well handled and in the jenkins logs we could see that the variables have been expanded.
This is not the case anymore with the plugin in version 1.8 leading to several issues in our jobs execution.
As far as I could understand from the changes introduced by SONARPLUGINS-1309, the handling of the additional properties has been moved from the main Maven class inherited by SonarMaven to handle it in the overridden wrapUpArguments method this way :
args.addTokenized(additionalProperties);
This allows to fix the issue, but is not functionally equivalent since the following lines are not applied anymore to the additionalProperties (from Maven#perform(...)):
String targets = Util.replaceMacro(this.targets,vr);
targets = env.expand(targets);
Regards,
Guillaume
Issue Links
- is duplicated by
-
SONARJNKNS-158
expand Hudson environent variables
-
- is related to
-
SONARJNKNS-79
"Skip if environment variable is defined" doesn't work for environment variable
-
- relates to
-
SONARJNKNS-50
Jenkins Sonar Plugin incompatible with latest Jenkins version 1.467
-
I've got a fix in https://github.com/SonarSource/jenkins-sonar-plugin/pull/7