mirror of
https://github.com/SAP/jenkins-library.git
synced 2024-12-12 10:55:20 +02:00
Parse values to json with groovy methods (#1266)
Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
This commit is contained in:
parent
6feb0cf9e9
commit
5616ac2ab0
@ -2,7 +2,7 @@ import com.sap.piper.ConfigurationLoader
|
||||
import com.sap.piper.ConfigurationMerger
|
||||
import com.sap.piper.DefaultValueCache
|
||||
import com.sap.piper.analytics.InfluxData
|
||||
import com.sap.piper.JsonUtils
|
||||
import groovy.json.JsonOutput
|
||||
|
||||
class commonPipelineEnvironment implements Serializable {
|
||||
|
||||
@ -180,7 +180,7 @@ class commonPipelineEnvironment implements Serializable {
|
||||
if(value instanceof String) {
|
||||
script.writeFile file: fileName, text: value
|
||||
} else {
|
||||
script.writeFile file: fileName, text: JsonUtils.groovyObjectToJsonString(value)
|
||||
script.writeFile file: fileName, text: groovy.json.JsonOutput.toJson(value)
|
||||
}
|
||||
}
|
||||
})
|
||||
@ -191,7 +191,7 @@ class commonPipelineEnvironment implements Serializable {
|
||||
if(value instanceof String) {
|
||||
script.writeFile file: fileName, text: value
|
||||
} else {
|
||||
script.writeFile file: fileName, text: JsonUtils.groovyObjectToJsonString(value)
|
||||
script.writeFile file: fileName, text: groovy.json.JsonOutput.toJson(value)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user