mirror of
https://github.com/SAP/jenkins-library.git
synced 2024-12-12 10:55:20 +02:00
Annotate docker plugin check as non cps (#134)
This commit is contained in:
parent
48b816e028
commit
3d5a97ab71
@ -13,7 +13,7 @@ def call(Map parameters = [:], body) {
|
||||
|
||||
if(dockerImage) {
|
||||
|
||||
if (! Jenkins.instance.pluginManager.plugins.find { p -> p.isActive() && p.getShortName() == PLUGIN_ID_DOCKER_WORKFLOW } ) {
|
||||
if (! isPluginActive(PLUGIN_ID_DOCKER_WORKFLOW) ) {
|
||||
echo "[WARNING][${STEP_NAME}] Docker not supported. Plugin '${PLUGIN_ID_DOCKER_WORKFLOW}' is not installed or not active. Configured docker image '${dockerImage}' will not be used."
|
||||
dockerImage = null
|
||||
}
|
||||
@ -44,6 +44,11 @@ def call(Map parameters = [:], body) {
|
||||
}
|
||||
}
|
||||
|
||||
@NonCPS
|
||||
private isPluginActive(String pluginId){
|
||||
return Jenkins.instance.pluginManager.plugins.find { p -> p.isActive() && p.getShortName() == pluginId }
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a string with docker options containing
|
||||
* environment variables (if set).
|
||||
|
Loading…
Reference in New Issue
Block a user