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}"]) {
if ( fileExists(runConfig.buildRequires)) {
sh """
${runConfig.buildCmd}
"""
sh runConfig.buildCmd
} else {
error("ERROR: File ${runConfig.buildRequires} does not exist in workspace.")
}