Reputation: 452
Having access to a Jenkins job configuration via the UI, how can I view the configuration as XML in the browser?
Upvotes: 7
Views: 14778
Reputation: 1
Use the cli much more efficient and faster!
> java -jar jenkins-cli.jar -s http://jenkinsserver get-job nameofJob >
> myjob.xml
Then simply view myjob.xml in browser
Upvotes: 0
Reputation: 452
One can view a Jenkins job configuration as XML in the browser by appending config.xml
to the end of the URL. For example, if you have the following URL to a Jenkins job https://jenkins.mycompany.com/job/myjob
, append config.xml
: https://jenkins.mycompany.com/job/myjob/config.xml
. This also works for users who do not have write access to the job.
This solution was tested with Jenkins 2.138.
Credit for this answer goes to Terraform user taiidani
, who mentioned this in the Jenkins provider documentation: https://registry.terraform.io/providers/taiidani/jenkins/latest/docs/resources/job#template
Upvotes: 12