Skip to content
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

Cannot update Jenkins config.xml via POST #37

Open
jperkin opened this issue Nov 1, 2019 · 3 comments
Open

Cannot update Jenkins config.xml via POST #37

jperkin opened this issue Nov 1, 2019 · 3 comments
Labels

Comments

@jperkin
Copy link

jperkin commented Nov 1, 2019

Hi!

Thanks for this plugin. It works great for me, except that I manage my Jenkins job configurations by POSTing config.xml for each job that I have configured. This allows me to easily manage many jobs and update them with new settings, however something in this plugin does not like this procedure.

If I configure the post-build action via the web interface it works fine, but as soon as I POST config.xml it disappears, even if I use exactly the same config.xml that I retrieve from the job (using the encrypted endpoint value).

It appears to be something to do with the encryption used for the endpoint. I tried configuring the endpoint as a global setting and leaving the <endpoint> value blank, as well as removing it entirely, but whatever I do, as soon as config.xml is POSTed, the whole mattermost post-build action disappears.

I normally update config.xml using curl, and so tried using jenkins-cli.jar instead to see if that made any difference, but no change.

The only thing relevant that I can see in the log is this:

Nov 01, 2019 10:41:07 AM WARNING hudson.util.Secret toString
Use of toString() on hudson.util.Secret from hudson.util.Secret$1.convert(Secret.java:306). Prefer getPlainText() or getEncryptedValue() depending your needs. see https://jenkins.io/redirect/hudson.util.Secret/

Let me know if you need any further information.

Thanks.

@jovandeginste
Copy link
Collaborator

Did you use this before the update to encrypted endpoint, and if so, did it work then?

@jperkin
Copy link
Author

jperkin commented Nov 2, 2019

No, sorry, I've only just started using this plugin.

@jovandeginste
Copy link
Collaborator

Could you provide me with a minimal, trivial, anonymized example? I'm no longer using per-job configs myself (all-in on Jenkinsfiles), so having an example to start from might help. Also, you could try to downgrade the plugin (manually probably) to the previous version, which does not use secret endpoints yet. Just to be sure it's related to those changes.

@covert8 covert8 added the stale label Nov 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants