1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2024-12-14 11:03:09 +02:00
sap-jenkins-library/vars/commonPipelineEnvironment.groovy

68 lines
1.8 KiB
Groovy
Raw Normal View History

2017-07-11 15:12:03 +02:00
class commonPipelineEnvironment implements Serializable {
private Map configProperties = [:]
//stores version of the artifact which is build during pipeline run
def artifactVersion
Map configuration = [:]
Map defaultConfiguration = [:]
//each Map in influxCustomDataMap represents a measurement in Influx. Additional measurements can be added as a new Map entry of influxCustomDataMap
private Map influxCustomDataMap = [pipeline_data: [:]]
//influxCustomData represents measurement jenkins_custom_data in Influx. Metrics can be written into this map
private Map influxCustomData = [:]
2017-07-11 15:12:03 +02:00
private String mtarFilePath
def setArtifactVersion(version) {
artifactVersion = version
}
def getArtifactVersion() {
return artifactVersion
}
2017-07-11 15:12:03 +02:00
def setConfigProperties(map) {
configProperties = map
}
2017-07-11 15:12:03 +02:00
def getConfigProperties() {
return configProperties
}
2017-07-11 15:12:03 +02:00
def setConfigProperty(property, value) {
configProperties[property] = value
}
2017-07-11 15:12:03 +02:00
def getConfigProperty(property) {
if (configProperties[property] != null)
return configProperties[property].trim()
else
return configProperties[property]
}
def getInfluxCustomData() {
return influxCustomData
}
def getInfluxCustomDataMap() {
return influxCustomDataMap
}
2017-07-11 15:12:03 +02:00
def getMtarFilePath() {
return mtarFilePath
}
2017-07-11 15:12:03 +02:00
void setMtarFilePath(mtarFilePath) {
this.mtarFilePath = mtarFilePath
}
def setPipelineMeasurement (measurementName, value) {
influxCustomDataMap.pipeline_data[measurementName] = value
}
def getPipelineMeasurement (measurementName) {
return influxCustomDataMap.pipeline_data[measurementName]
}
2017-07-11 15:12:03 +02:00
}