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