Skip to content

Commit

Permalink
added the isCompatibleWithInstalledVersion (#9)
Browse files Browse the repository at this point in the history
* added the isCompatibleWithInstalledVersion field from updateInfo to the map
* Update gather_jenkins_facts.groovy

Co-authored-by: scsn <[email protected]>
  • Loading branch information
MalfuncEddie and scsn authored Mar 1, 2022
1 parent fa3dc69 commit db32df6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion scripts/groovy/gather_jenkins_facts.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,15 @@ Map getPluginInfo(List<PluginWrapper> plugins) {
Map ret = [:]
for (PluginWrapper plugin in plugins) {
UpdateSite.Plugin updateInfo = plugin.getUpdateInfo()
Boolean isCompatibleWithInstalledVersion = false
if (updateInfo != null) {
isCompatibleWithInstalledVersion = updateInfo.isCompatibleWithInstalledVersion()
}
Map tmpPlugin = [
version: plugin.getVersion(),
enabled: plugin.isEnabled(),
active: plugin.isActive(),
isCompatibleWithInstalledVersion: isCompatibleWithInstalledVersion,
hasUpdate: updateInfo != null
]
ret[plugin.getShortName()] = tmpPlugin
Expand Down Expand Up @@ -105,4 +110,4 @@ def json = JsonOutput.toJson([

return json.bytes.encodeBase64().toString()
//for test execution only
//return json.toString()
//return json.toString()

0 comments on commit db32df6

Please sign in to comment.