public static String getArtifactoryPluginVersion ( ) { String pluginsSortName = "artifactory" ; //Validates Jenkins existence because in some jobs the Jenkins instance is unreachable if ( Jenkins . getInstance ( ) != null && Jenkins . getInstance ( ) . getPlugin ( pluginsSortName ) != null && Jenkins . getInstance ( ) . getPlugin ( pluginsSortName ) . getWrapper ( ) != null ) { return Jenkins . getInstance ( ) . getPlugin ( pluginsSortName ) . getWrapper ( ) . getVersion ( ) ; } return "" ; }
Returns the version of Jenkins Artifactory Plugin or empty string if not found