Interview Prep/Jenkins/Best practices & rapid-fire commands

Rapid-fire: how do you list installed plugins and their versions?

BeginnerConceptBest practices & rapid-fire commands
Answer
curl -s -u admin:$TOKEN "https://jenkins/pluginManager/api/json?depth=1&tree=plugins[shortName,version]" \
  | jq -r '.plugins[] | "\(.shortName):\(.version)"' | sort
java -jar jenkins-cli.jar -s https://jenkins/ -auth admin:$TOKEN list-plugins

The first command's output is a valid plugins.txt.

All Jenkins questions Roadmap: Jenkins

More on Best practices & rapid-fire commands