Update buildStep
This commit is contained in:
parent
6992c88fb9
commit
9f2eed96a9
@ -3,7 +3,7 @@
|
||||
void call(Map config = [:], Closure body = { }) {
|
||||
Map defaults = [
|
||||
saveArtifaces: false,
|
||||
buildTest: 'Makefile',
|
||||
buildRequires: 'Makefile',
|
||||
buildCmd: 'make all',
|
||||
stepName: 'Build'
|
||||
]
|
||||
@ -13,12 +13,12 @@ void call(Map config = [:], Closure body = { }) {
|
||||
if (runConfig.saveArtifacts) {
|
||||
assert runConfig.artifacts : 'Error: saveArtifacts is set to true; must specify artifacts!'
|
||||
}
|
||||
if ( fileExists(runConfig.buildTest)) {
|
||||
if ( fileExists(runConfig.buildRequires)) {
|
||||
sh """
|
||||
${runConfig.buildCmd}
|
||||
"""
|
||||
} else {
|
||||
error("ERROR: File ${runConfig.buildTest} does not exist in workspace.")
|
||||
error("ERROR: File ${runConfig.buildRequires} does not exist in workspace.")
|
||||
}
|
||||
if (runConfig.saveArtifacts) {
|
||||
artifactsList = runConfig.artifacts.join(',')
|
||||
|
||||
Loading…
Reference in New Issue
Block a user