1
0
mirror of https://github.com/firstBitMarksistskaya/jenkins-lib.git synced 2024-12-11 11:19:08 +02:00
jenkins-lib/vars/jobConfiguration.groovy

15 lines
477 B
Groovy

import ru.pulsar.jenkins.library.configuration.ConfigurationReader
import ru.pulsar.jenkins.library.configuration.JobConfiguration
import ru.pulsar.jenkins.library.ioc.ContextRegistry
JobConfiguration call(String path = "jobConfiguration.json") {
ContextRegistry.registerDefaultContext(this)
if (fileExists(path)) {
def config = readFile(path)
return ConfigurationReader.create(config)
} else {
return ConfigurationReader.create()
}
}