Skip to content

Instantly share code, notes, and snippets.

@martiell
martiell / plugins.py
Created November 19, 2018 17:07
Find transitive dependencies of a set of Jenkins plugins using update centre metadata
#!/usr/bin/env python3
# Finds the transitive closure of dependencies for a set of jenkins plugins.
# The jenkins puppet module does not resolve transitive dependencies, so all
# the transitive dependencies need to be listed in the yaml of plugins to
# install.
#
# This script reads JSON from the update centre for the relevant version of
# Jenkins. For Jenkins 2.60, run the following before this script:
# curl -sLO http://updates.jenkins-ci.org/2.60/update-center.actual.json
#