mirror of
https://github.com/SAP/jenkins-library.git
synced 2025-01-30 05:59:39 +02:00
add @NonCPS annotations
This commit is contained in:
parent
790f2b7ea3
commit
8710495e17
@ -96,6 +96,7 @@ def reportTasks(settings, defaultPattern){
|
||||
}
|
||||
}
|
||||
|
||||
@NonCPS
|
||||
def ensureMap(parameters, name){
|
||||
def value = parameters.get(name, [:])
|
||||
if(!isMap(value))
|
||||
@ -103,12 +104,14 @@ def ensureMap(parameters, name){
|
||||
return value
|
||||
}
|
||||
|
||||
@NonCPS
|
||||
def asMap(parameter){
|
||||
if(Boolean.TRUE.equals(parameter))
|
||||
return [:]
|
||||
return parameter
|
||||
}
|
||||
|
||||
@NonCPS
|
||||
def isMap(object){
|
||||
return object in Map
|
||||
}
|
||||
@ -120,8 +123,9 @@ def archiveResults(archive, pattern, allowEmpty){
|
||||
}
|
||||
}
|
||||
|
||||
@NonCPS
|
||||
def createCommonOptionsMap(publisherName, settings){
|
||||
def result = [:]
|
||||
Map result = [:]
|
||||
def thresholds = ensureMap(settings, 'thresholds')
|
||||
def fail = ensureMap(thresholds, 'fail')
|
||||
def unstable = ensureMap(thresholds, 'unstable')
|
||||
|
Loading…
x
Reference in New Issue
Block a user