How to upload a View configuration to Jenkins

7 views
Skip to first unread message

Martin Jost

unread,
Mar 9, 2020, 12:24:26 PM3/9/20
to Jenkins Users
Hello,

I'm using Jenkins 2.204.2 currently.
I'm trying to download a view configuration, modify it and upload again.

If I look at the API for a view,
I get at the the bottom:

"Fetch/Update config.xml

To programmatically obtain config.xml, hit this URL. You can also POST an updated config.xml to the same URL to programmatically update the configuration of a view."


Ok, so I do,

"/usr/bin/wget --auth-no-challenge --no-proxy --http-user="me" --http-password="XXXX" http://ull105.net:9998/view/PHY_DevD-L/config.xml -O viewPHY_DevD-L.xml": ok

=> And get viewPHY_DevD-L.xml, which contains my view configuration.


Now I want to upload the same file, as "new" view configuration (as a test):

"/usr/bin/wget --auth-no-challenge --no-proxy -nv --http-user="me" --http-password="XXXX" http://ull105.net:9998/view/PHY_DevD-L/config.xml --post-file="viewPHY_DevD-L.xml" --header='Content-type:application/xml;charset=ISO-8859-1'"

=> But I get an "Error code: 500"

[I have seen '500' as reaction to malformed xml passed to Jenkins; but I try to upload the file, I've just downloaded, so it should be fine)


What do I do incorrectly ? Or is the documentation incorrect ?

(I can download and upload the configuration of jobs, and tried to model the command according to this)


Regards


Martin


Reply all
Reply to author
Forward
0 new messages