Hi list,
in a jenkinsfile I trigger a bash script like so:
"...
myresult=sh(script: 'deploy.sh', returnStdout: true)
..."
the script starts but returns errors like these:
"command not found: pushd"
"command not found: source"
And for some reasons it is not able to do such things:
"...
targetmachine=(
'host1'
'host2'
'host3'
)
..."
it replies: Syntax error: "(" unexpected.
Other commands like "if", "for", "echo", a.s.o are working.
The script itself is tested on the machine, where jenkins is running,
and it works.
Jenkins is installed as docker image "docker pull jenkins:jenkins".
The Image is started as "root" using "sudo docker run...."
Does anybody have an idea why these commands and the array creation fails?
br
Carsten