We are using Jenkins for building our products, but we have more then 90 .NET projects.
We like to use as many as possible variables in the build scripts to keep them more generic.
In the ‘old’ scanner (the non msbuild one) we could use all environment variables
We use stuff like %JOB_NAME% and %GIT_VERSION% environment variables
Our analysis properties looked like this:
sonar.projectKey=myProject:%JOB_NAME:~0,-10%
sonar.projectName=%JOB_NAME:~0,-10%
sonar.projectVersion=%GIT_COMMIT%
But since we need to move to the new style of running sonarscanner (the msbuild version) we have the 3 fields (key, name and version) we need to set in a separate field. Those fields don’t expand environment variables.
So, the question is simple: can we expand the environment variables for alle fields?