Skip to content

Instantly share code, notes, and snippets.

@tknerr
Created July 17, 2017 16:22
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tknerr/ff5394d9ba6f56ec00a4e880d06abbb0 to your computer and use it in GitHub Desktop.
Save tknerr/ff5394d9ba6f56ec00a4e880d06abbb0 to your computer and use it in GitHub Desktop.
Get Jenkins Plugins + Versions via Jenkins XML API (and convert to copy/pasteable YAML format for Ansible ;-))
curl 'http://admin:admin@localhost:8080/pluginManager/api/xml?depth=1&xpath=/*/*/shortName|/*/*/version&wrapper=plugins' \
| perl -pe 's/.*?<shortName>([\w-]+).*?<version>([^<]+)()(<\/\w+>)+/- { name: \1, version: \2 }\n/g' \
| sort
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment