-
Notifications
You must be signed in to change notification settings - Fork 81
change token to credentials for sonarqube #152
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
base: development
Are you sure you want to change the base?
change token to credentials for sonarqube #152
Conversation
src/main/java/jenkinsci/plugins/influxdb/generators/SonarQubePointGenerator.java
Outdated
Show resolved
Hide resolved
src/main/java/jenkinsci/plugins/influxdb/generators/SonarQubePointGenerator.java
Outdated
Show resolved
Hide resolved
src/main/java/jenkinsci/plugins/influxdb/generators/SonarQubePointGenerator.java
Outdated
Show resolved
Hide resolved
src/main/java/jenkinsci/plugins/influxdb/generators/SonarQubePointGenerator.java
Outdated
Show resolved
Hide resolved
it finds the token and uses that. I'd assume this PR allows me to not have to use the |
The benefit is to use credentials wich is more secure than use directly a token setted as environment variable. Now |
I feel like this works a little unintuitively. Consider the following scenario
In This being said, I do believe that using the credentials ID is better than having to wrap the plugin in an unnecessary
Apologies for nitpicking on this change, which I think is an improvement, but almost every single time there's a PR targeting |
There is somes improvement to do to this PR. I used the already defined variable SONAR_AUTH_TOKEN to not modify the behavior too much. But I continu to think it is not a good practice to use an environment variable for an authentication token. The best way is to use I will provide an other behavior. |
Link to #150
This PR change Sonarqube token to Jenkins credentials.
The environnement variable doesn't change but must refers to a valid credentailsId.
The credentials type is a StringCredentials and it must be set in the context of the Job and contains the token to connect to Sonarqube.