I would like to have preliminary checks on my Jenkins pipeline that check if any plugin is installed or not. I found this post Check if a plugin exists in the Jenkins (Groovy) pipeline , which asks the same question, but the provided answers are not suitable for me, because they check whether the DSL method provided by the plugin is available and not, whether the plugin is available at all or not .
What I would like to have is something like this (in my Jenkinsfile ):
pluginAvailable('plugin-name', '0.0.1')
where 0.0.1 may be the (optional) minimum version.
Is there anything similar in a DSL channel or another Jenkins class?
source share