Fix passing envvars to closure in build

This commit is contained in:
Jim Nicholson 2024-02-13 03:01:57 -08:00
parent 1b2b99c2ea
commit 8251c7b7bb

View File

@ -15,9 +15,7 @@ void call(Map config = [:], Closure body = { }) {
} }
withEnv(["TAG=${runConfig.tag}", "HASH=${runConfig.hash}", "VERSION=${runConfig.version}"]) { withEnv(["TAG=${runConfig.tag}", "HASH=${runConfig.hash}", "VERSION=${runConfig.version}"]) {
if ( fileExists(runConfig.buildRequires)) { if ( fileExists(runConfig.buildRequires)) {
sh """ sh runConfig.buildCmd
${runConfig.buildCmd}
"""
} else { } else {
error("ERROR: File ${runConfig.buildRequires} does not exist in workspace.") error("ERROR: File ${runConfig.buildRequires} does not exist in workspace.")
} }