Skip to content

Instantly share code, notes, and snippets.

@pmauduit
Last active July 11, 2016 09:38
Show Gist options
  • Select an option

  • Save pmauduit/297407b9c8f5b72627c0 to your computer and use it in GitHub Desktop.

Select an option

Save pmauduit/297407b9c8f5b72627c0 to your computer and use it in GitHub Desktop.
Jenkins - save/restore projects as XML

Jenkins save/restore projects one-liner

Save:

curl -s http://jenkins/job/JOBNAME/config.xml

restore

curl -X POST 'http://jenkins/createItem?name=JOBNAME' --header "Content-Type: application/xml" -d @-

Get installed plugins:

curl 'http://jenkins/pluginManager/api/json?depth=1' | jq -M -r '.plugins[].shortName' 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment