mirror of
https://github.com/SAP/jenkins-library.git
synced 2024-12-12 10:55:20 +02:00
fd98d6279f
This change adds the end to end test execution capabilities of the SAP Cloud SDK pipeline, i.e., the consumer can define a npm script which is then executed using the npmExecuteScripts step. The handling of generated results will be provided in a follow up PR. Co-authored-by: Daniel Kurzynski <daniel.kurzynski@sap.com>
16 lines
586 B
Groovy
16 lines
586 B
Groovy
void call(script, Map closures, Boolean parallelExecution, String label = "closures") {
|
|
handlePipelineStepErrors(stepName: 'runClosures', stepParameters: [script: script]) {
|
|
echo "Executing $label"
|
|
if (parallelExecution) {
|
|
echo "Executing $label in parallel"
|
|
parallel closures
|
|
} else {
|
|
echo "Executing $label in sequence"
|
|
def closuresToRun = closures.values().asList()
|
|
for (int i = 0; i < closuresToRun.size(); i++) {
|
|
(closuresToRun[i] as Closure)()
|
|
}
|
|
}
|
|
}
|
|
}
|