-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose SonarQube server URL as a build parameter #70
Comments
Yes, sonarServer is UUID of a connection used in a certain build step. When build is started a number of additional parameters are resolved basing on this UUID, including Could you please describe how do you get access to runner parameters - where |
When I was testing my script earlier, I was using SonarQube plugin 2017.1-28. I used a Python build step. I started typing It does not matter to me how the parameter is exposed as long as I can use it either in a build step or to define another build parameter. Ideally, auto-complete works, but this is not a requirement. |
So I cannot easily provide such parameter from the plugin - eg there can be 2 different Sonar Runner usages with different servers during one build. MSBuild Scanner seems to be easier here since usually there is only one simultaneous Start task (there can be subsequent 2 start-finish tasks during the build but I really doubt anyone will ever intersect them) and server is used in the Start task. So probably I can set parameter value between start and finish. I'll try to find some way to provide SonarQube server urls. If you can describe how you'll use such parameter it could help me. |
I'm now unsure about how I discovered I need the URL for SonarQube Runner and SonarScanner for MSBuild. After those build steps, I have a command-line step that calls a script, which accepts %PARAMS% build parameter. PARAMS is defined on Parameters tab as a string, which contains the hard-coded Sonar URL like this |
There is already %runParam.sonarServer%, but it's some kind of unique identifier. Please provide something like %runParam.sonarServerUrl%. This way I could pass it as a parameter within a build step to my custom script.
The text was updated successfully, but these errors were encountered: