Usage of credentials plugin in SonarQube Plugin for Jenkins

775 views
Skip to first unread message

zufal...@gmail.com

unread,
Jun 7, 2016, 4:25:24 AM6/7/16
to SonarQube
Hi list,

Right now I have to configure the Sonarqube login data in the Jenkins configuration by hand.



However I'd like to be able to use the Credentials plugin so the credentials are stored globally and secure in Jenkins and I only have to tell the plugin which user to use.

Is there support planned for this or is there another way to use the jenkins credentials?

Regards
Sebastian
Auto Generated Inline Image 1

Julien HENRY

unread,
Jun 7, 2016, 8:02:24 AM6/7/16
to SonarQube, zufal...@gmail.com
Hi Sebastian,

Nothing is planned. It looks like an interesting feature, but we try to avoid adding more dependencies to external plugins. Do you know if there is a way to make this optional?

Also note that we are already storing the passwords as hudson.util.Secret.

++

Julien

zufal...@gmail.com

unread,
Jun 8, 2016, 9:29:56 AM6/8/16
to SonarQube, zufal...@gmail.com
Hi Julien,

thanks for your answer. I'm not an expert on jenkins plugins, but I found this: https://wiki.jenkins-ci.org/display/JENKINS/Dependencies+among+plugins
This documentation says that it's indeed possible to mark a dependency as optional (though the error case has then to be handled accordingly).

So right now I'm looking for other possibilities (background: I only want to provide credentials to several plugins in one way: via the credentials plugin).

As I've read here, it's not possible to specify name and password with maven settings.
They cannot be read from the credentials plugin either (yet).

However I can use the credentials binding plugin, in which you can add a credential, assign a global environment variable to it and then use the variable in the build job:
"Now in a freestyle job, check the box Use secret text(s) or file(s) and add some variable bindings which will use your credentials. The resulting environment variables can be accessed from shell script build steps and so on. (You probably want to start any shell script with set +x, or batch script with @echo off. JENKINS-14731)."

Nonetheless I'd be nice to have the credentials-feature.

Thanks Julien!

Regards
Sebastian

Andreas Mandel

unread,
Jun 8, 2016, 9:43:41 AM6/8/16
to SonarQube, zufal...@gmail.com
Hi Julien,

I'd also like to see this change. The credentials plugin is a way to store credential data securely inside Jenkins. It also makes sure that the data is handled correctly in the UI etc. Since this is also used by the SCM plugins like Subversion or GIT it is very likely if not set that this plugin is already installed on every Jenkins installation.

Kind Regards,
Andreas.

Julien HENRY

unread,
Jun 8, 2016, 11:05:07 AM6/8/16
to SonarQube, zufal...@gmail.com
Hi guys,

This is not a promise it will be implemented in short term but I have created a ticket you can watch/vote for:

++

Julien

Andreas Mandel

unread,
Jun 8, 2016, 11:34:58 AM6/8/16
to SonarQube, zufal...@gmail.com
Voted ;-)

Kind Regards,
Andreas.
Reply all
Reply to author
Forward
0 new messages