1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2024-12-14 11:03:09 +02:00
sap-jenkins-library/vars/readPipelineEnv.groovy
Kevin Stiehl d1c8abc6b3
refactor: move common pipeline environment handling to golang (#2823)
* make use of new read,writePipelineEnv Steps in groovy

* remove unused cat

Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
2021-06-15 14:34:56 +02:00

14 lines
484 B
Groovy

import static com.sap.piper.Prerequisites.checkScript
import groovy.transform.Field
@Field def STEP_NAME = getClass().getName()
void call(Map parameters = [:]) {
final script = checkScript(this, parameters) ?: this
String piperGoPath = parameters.piperGoPath ?: './piper'
def output = script.sh(returnStdout: true, script: "${piperGoPath} readPipelineEnv")
Map cpeMap = script.readJSON(text: output)
script.commonPipelineEnvironment.setCPEMap(script, cpeMap)
}