diff --git a/vars/testStage.groovy b/vars/testStage.groovy new file mode 100644 index 0000000..f338c4c --- /dev/null +++ b/vars/testStage.groovy @@ -0,0 +1,14 @@ +#!/usr/bin/env groovy + +void call(Map config = [:], Closure body = { }) { + Map defaults = [ + testRequires: 'Makefile', + testCmd: 'make all', + stepName: 'Test' + ] + runConfig = defaults + config + stage(runConfig.stepName) { + printBanner(runConfig.stepName) + body() + } +}