Skip to content

Conversation

@olivierdagenais
Copy link
Member

Summary

In order to be able to quickly compare the list of plugins across our Jenkins instances, I added sorting to the YamlPluginOutputConverter.

Please let me know if you would like me to also add sorting capabilities elsewhere.

Manual testing

Given

My local development Jenkins instance, I installed some plugins to test with.

When

I ran the last released version (2.12.11):

java -jar path/to/jenkins-plugin-manager-2.12.11.jar --war "${JENKINS_HOME}/jenkins.war" --plugin-download-directory "${JENKINS_HOME}/plugins" --list --output yaml > plugins-2.12.11.yaml

Then

I obtained the baseline output in a plugins-2.12.11.yaml file.

When

I ran the version with these changes:

java -jar path/to/jenkins-plugin-manager-2.12.12-SNAPSHOT.jar --war "${JENKINS_HOME}/jenkins.war" --plugin-download-directory "${JENKINS_HOME}/plugins" --list --output yaml > plugins-2.12.12-SNAPSHOT.yaml

Then

I obtained the new and improved output in a plugins-2.12.12-SNAPSHOT.yaml file.

Comparing the baseline to it with a graphical diff tool (Meld), we see the old-and-busted version on the left and the new hotness on the right, where we clearly have an alphabetically-sorted list on the right:

comparing_unsorted_with_sorted_yaml

Mission accomplished!

@timja timja added the enhancement New feature or request label Jul 10, 2023
@timja timja merged commit fff28c7 into jenkinsci:master Jul 10, 2023
@timja
Copy link
Member

timja commented Jul 10, 2023

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants