@ VisibleForTesting protected static boolean notAllowedStrategy ( DockerSlaveTemplate template ) { if ( isNull ( template ) ) { LOG . debug ( "Skipping DockerProvisioningStrategy because: template is null" ) ; return true ; } final RetentionStrategy retentionStrategy = template . getRetentionStrategy ( ) ; if ( isNull ( retentionStrategy ) ) { LOG . debug ( "Skipping DockerProvisioningStrategy because: strategy is null for {}" , template ) ; } if ( retentionStrategy instanceof DockerOnceRetentionStrategy ) { if ( template . getNumExecutors ( ) == 1 ) { LOG . debug ( "Applying faster provisioning for single executor template {}" , template ) ; return false ; } else { LOG . debug ( "Skipping DockerProvisioningStrategy because: numExecutors is {} for {}" , template . getNumExecutors ( ) , template ) ; return true ; } } if ( retentionStrategy instanceof RetentionStrategy . Demand ) { LOG . debug ( "Applying faster provisioning for Demand strategy for template {}" , template ) ; return false ; } // forbid by default LOG . trace ( "Skipping YAD provisioning for unknown mix of configuration for {}" , template ) ; return true ; }
Exclude unknown mix of configuration .