Revamp stages and restructure project #1
@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env groovy
|
||||
|
||||
void call(Map config = [:], Closure body) {
|
||||
void call(Map config = [:], Closure body = { }) {
|
||||
Map defaults = [
|
||||
saveArtifaces: false,
|
||||
buildTest: 'Makefile',
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env groovy
|
||||
|
||||
void call(Map config = [:], Closure body) {
|
||||
void call(Map config = [:], Closure body = { }) {
|
||||
Map defaults = [
|
||||
stepName: 'Checkout',
|
||||
useJobSCM: true
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env groovy
|
||||
|
||||
void call(Map config = [:], Closure body) {
|
||||
void call(Map config = [:], Closure body = { }) {
|
||||
Map defaults = [
|
||||
name: env.BUILD_TAG,
|
||||
archiveCmd: 'tar',
|
||||
@ -16,15 +16,16 @@ void call(Map config = [:], Closure body) {
|
||||
if (runConfig.artifacts.size() < 1) {
|
||||
assert runConfig.artifacts : 'Error: No named artifacts to package!'
|
||||
}
|
||||
archiveName = runConfig.name + separator + runConfig.tag + separator + runConfig.extension
|
||||
archiveName = runConfig.name + runConfig.separator + runConfig.tag + runConfig.separator + runConfig.extension
|
||||
echo "Will tag result as: ${archiveName}"
|
||||
|
||||
sh """
|
||||
if command -v "${runconfig.archiveCmd}"; then
|
||||
${runConfig.archiveCmd} ${archiveName} ${runConfig.artifacts.join(' ')}
|
||||
if command -v "${runConfig.archiveCmd}"; then
|
||||
${runConfig.archiveCmd} ${runConfig.archiveParams} ${archiveName} ${runConfig.artifacts.join(' ')}
|
||||
else
|
||||
echo "Error: ${runConfig.archiveCmd} is not a valid executable!"
|
||||
exit 2
|
||||
fi
|
||||
"""
|
||||
archiveArtifacts artifacts: archiveName, followSymlinks: false
|
||||
body()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user