Step 1: List existing plugins in a Jenkins installation
- cli with option jplugins list-installed [--jenkins-home path]
- loop on files *.[hj]pi to determine plugin name
- read version in MANIFEST file
- print out the list
Step 2: Read public json file and compare
- Read source ie https://updates.jenkins.io/current/update-center.actual.json https://updates.jenkins.io/pluginCount.txt provides the actual count of plugins. can be used to check if load is ok.
- list installed plugins and loop on each of them
- if version change, identify the change and add missing dependency (new one)
- display what changed
Step 3: Read a features.yaml, and pre-installed list pre-install.lst (if exists) and build a features.lock
- write
jplugins-preinstalled.lst
from an existing installation - read
jplugins-preinstalled.lst
and check_updates from this. - read
jplugins-preinstalled.lst
and write a simple lock filejplugins.lock
- read
jplugins.lst
, apply rules and write the lock file.
Step 4: Read jplugins.lst, from pre-installed plugins and treat features to add groovy and plugin in the list Process objective:
- Apply rules identified in `jplugins.lst` and `*.desc`, and identify latest version to use
- Display result as list (plugins + groovies)
- Apply dependencies minimum version required on version identified.
It can breaks when an identified version is not compatible with the rule. `jplugins` must report the module with version which requiring a newer version.
To fix this issue, the `jplugins.lst` can:
- accept a newer version of the plugin that break the dependency rules.
- or downgrade the dependency with an older version.
What it won't do:
- If the dependency requires an identified newer version, search for an older dependency which accept the identified version (extra step)
- read
jplugins.lst
, do git clone/update of install-inits, read each desc files requested, add plugins in the list, - list plugins & groovy files
Step 5: Read the lock file, download plugins/groovy files and install them in Jenkins home
- read
jplugins.lock
and list plugins and groovy files. - download plugins is series and install them in Jenkins home (must exist)
- git clone install-inits and copy files.
Step 6: jplugins
read lock file and update to latest version and write new version in Lock file
- read
jplugins.lock
and run updates and display result - Test
jplugins.lock
existence calling init command to suggest running update instead.
step 7: If the dependency requires an identified version newer, search for an older dependency which accept the identified version.
- enhance the determineVersion with this logic
step 8: Fix feature version on commit ID
- take feature version as commit ID.
Step 9: Parallelize plugins download to accelerate download (POC)
- Parallelize the download with GO channel
Step 10: Be able to update partially the Lock file
- Display update proposal from lock files
- choose which one to update