@@ -4,37 +4,37 @@ import com.cloudbees.groovy.cps.NonCPS
4
4
5
5
class ConfigurationLoader implements Serializable {
6
6
@NonCPS
7
- def static stepConfiguration (script , String stepName ) {
7
+ static Map stepConfiguration (script , String stepName ) {
8
8
return loadConfiguration(script, ' steps' , stepName, ConfigurationType . CUSTOM_CONFIGURATION )
9
9
}
10
10
11
11
@NonCPS
12
- def static stageConfiguration (script , String stageName ) {
12
+ static Map stageConfiguration (script , String stageName ) {
13
13
return loadConfiguration(script, ' stages' , stageName, ConfigurationType . CUSTOM_CONFIGURATION )
14
14
}
15
15
16
16
@NonCPS
17
- def static defaultStepConfiguration (script , String stepName ) {
17
+ static Map defaultStepConfiguration (script , String stepName ) {
18
18
return loadConfiguration(script, ' steps' , stepName, ConfigurationType . DEFAULT_CONFIGURATION )
19
19
}
20
20
21
21
@NonCPS
22
- def static defaultStageConfiguration (script , String stageName ) {
22
+ static Map defaultStageConfiguration (script , String stageName ) {
23
23
return loadConfiguration(script, ' stages' , stageName, ConfigurationType . DEFAULT_CONFIGURATION )
24
24
}
25
25
26
26
@NonCPS
27
- def static generalConfiguration (script ){
27
+ static Map generalConfiguration (script ){
28
28
return script?. commonPipelineEnvironment?. configuration?. general ?: [:]
29
29
}
30
30
31
31
@NonCPS
32
- def static defaultGeneralConfiguration (script ){
32
+ static Map defaultGeneralConfiguration (script ){
33
33
return DefaultValueCache . getInstance()?. getDefaultValues()?. general ?: [:]
34
34
}
35
35
36
36
@NonCPS
37
- private static loadConfiguration (script , String type , String entryName , ConfigurationType configType ){
37
+ private static Map loadConfiguration (script , String type , String entryName , ConfigurationType configType ){
38
38
switch (configType) {
39
39
case ConfigurationType . CUSTOM_CONFIGURATION :
40
40
return script?. commonPipelineEnvironment?. configuration?. get(type)?. get(entryName) ?: [:]
0 commit comments