Revamp stages and restructure project #1

Merged
jim merged 32 commits from newstage into master 2024-02-08 02:22:21 +00:00
3 changed files with 7 additions and 6 deletions
Showing only changes of commit 107d2c6d69 - Show all commits

View File

@ -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',

View File

@ -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

View File

@ -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()