'Carsten' via Jenkins Users
2018-12-07 13:34:37 UTC
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
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
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/a2181b6e-96cc-4182-abca-a8ae0a0e195f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/a2181b6e-96cc-4182-abca-a8ae0a0e195f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.