Hi,
Thanks a lot for your suggestions. The combinations [1] and [2] failed for me.
Using bash -c works (see [3]), CouchDB starts, but the job is marked as “building” and never completes. I was hoping it would complete as soon as CouchDB is started in the background (which is what the Jenkins job does).
I’ve added the go user to the sudoers list like so:
go ALL=(ALL) NOPASSWD: ALL
Defaults:go !requiretty
As I’ve said before, I can run the commands fine directly via the shell.
Many thanks once again for your help, but for the time being, I think I am going to get back to Jenkins and maybe revisit Go when I have more time.
Guillaume.
[1]
[go] Start to execute task: <exec command="sudo " >
<arg>service</arg>
<arg>couchdb</arg>
<arg>start</arg>
</exec>.
[go] setting environment variable 'GO_SERVER_URL' to value 'https://localhost:8154/go/'
[go] setting environment variable 'GO_TRIGGER_USER' to value 'anonymous'
[go] setting environment variable 'GO_PIPELINE_NAME' to value 'Couchdb'
[go] setting environment variable 'GO_PIPELINE_COUNTER' to value '9'
[go] setting environment variable 'GO_PIPELINE_LABEL' to value '9'
[go] setting environment variable 'GO_STAGE_NAME' to value 'defaultStage'
[go] setting environment variable 'GO_STAGE_COUNTER' to value '1'
[go] setting environment variable 'GO_JOB_NAME' to value 'defaultJob'
[go] setting environment variable 'GO_REVISION' to value '3a401846a21c8a56ec0c23b6a411e74b6fd2dab0'
[go] setting environment variable 'GO_TO_REVISION' to value '3a401846a21c8a56ec0c23b6a411e74b6fd2dab0'
[go] setting environment variable 'GO_FROM_REVISION' to value '3a401846a21c8a56ec0c23b6a411e74b6fd2dab0'
Error happened while attempting to execute 'sudo service couchdb start'.
Please make sure [sudo ] can be executed on this agent.
[2]
[go] Start to execute task: <exec command="sudo " >
<arg>/etc/init.d/couchdb</arg>
<arg>start</arg>
</exec>.
[go] setting environment variable 'GO_SERVER_URL' to value 'https://localhost:8154/go/'
[go] setting environment variable 'GO_TRIGGER_USER' to value 'anonymous'
[go] setting environment variable 'GO_PIPELINE_NAME' to value 'Couchdb'
[go] setting environment variable 'GO_PIPELINE_COUNTER' to value '10'
[go] setting environment variable 'GO_PIPELINE_LABEL' to value '10'
[go] setting environment variable 'GO_STAGE_NAME' to value 'defaultStage'
[go] setting environment variable 'GO_STAGE_COUNTER' to value '1'
[go] setting environment variable 'GO_JOB_NAME' to value 'defaultJob'
[go] setting environment variable 'GO_REVISION' to value '3a401846a21c8a56ec0c23b6a411e74b6fd2dab0'
[go] setting environment variable 'GO_TO_REVISION' to value '3a401846a21c8a56ec0c23b6a411e74b6fd2dab0'
[go] setting environment variable 'GO_FROM_REVISION' to value '3a401846a21c8a56ec0c23b6a411e74b6fd2dab0'
Error happened while attempting to execute 'sudo /etc/init.d/couchdb start'.
Please make sure [sudo ] can be executed on this agent.
[3]
[go] Start to execute task: <exec command="bash" >
<arg>-c</arg>
<arg>sudo /etc/init.d/couchdb start</arg>
</exec>.
[go] setting environment variable 'GO_SERVER_URL' to value 'https://localhost:8154/go/'
[go] setting environment variable 'GO_TRIGGER_USER' to value 'anonymous'
[go] setting environment variable 'GO_PIPELINE_NAME' to value 'Couchdb'
[go] setting environment variable 'GO_PIPELINE_COUNTER' to value '12'
[go] setting environment variable 'GO_PIPELINE_LABEL' to value '12'
[go] setting environment variable 'GO_STAGE_NAME' to value 'defaultStage'
[go] setting environment variable 'GO_STAGE_COUNTER' to value '1'
[go] setting environment variable 'GO_JOB_NAME' to value 'defaultJob'
[go] setting environment variable 'GO_REVISION' to value '3a401846a21c8a56ec0c23b6a411e74b6fd2dab0'
[go] setting environment variable 'GO_TO_REVISION' to value '3a401846a21c8a56ec0c23b6a411e74b6fd2dab0'
[go] setting environment variable 'GO_FROM_REVISION' to value '3a401846a21c8a56ec0c23b6a411e74b6fd2dab0'
Starting couchdb: [ OK ]
--
Guillaume Belrose
Sent with Airmail