Hide quoted text
[Pipeline] sh
[Rel _pipeline] Running shell script
def pipelineUtil=null
fileLoader.withGit('ssh://git@test:7999/test/test.git',
test,
'..,
'groovy')
{
pUtil = fileLoader.load('src/pipeline/test-utils')
}
pUtil.getTest("TEST")
test-utils.groovy
void getTest(String test) {
stage "Test"
node ('groovy')
{
sh "set +x"
mysh "curl call some api"
mysh 'echo "***********TEST************"'
mysh 'echo "Overall : "'
}
}
def mysh(cmd) {
sh('#!/bin/sh -e\n' + cmd)
}
return this;
Output :
[Pipeline] sh
[Rel _pipeline] Running shell script
***********TEST ************
[Pipeline] sh
[Rel_ pipeline] Running shell script
Overall :
String
, rather than being printed to the build log. (Standard error, if any, will still be printed to the log.) You will often want to call .trim()
on the result to strip off a trailing newline.