2014-11-16 25 views
0

我有Ubuntu和去代理/服务器就可以了,我已经定义任务:去-CD管道不能执行自定义命令

<exec command="/bin/sh" > 
<arg>-c</arg> 
<arg>sbt test</arg> 
</exec> 

SBT可从终端,所以我可以轻松地运行从终端这个命令:

sbt test 

/bin/sh -c 'sbt test' 

但是当我运行的管道,我得到了一个错误:

[go] Start to execute task: <exec command="/bin/sh" > 
<arg>-c</arg> 
<arg>sbt test</arg> 
</exec>. 
[go] setting environment variable 'GO_SERVER_URL' to value 'https://127.0.0.1:8154/go/' 
[go] setting environment variable 'GO_TRIGGER_USER' to value 'anonymous' 
[go] setting environment variable 'GO_PIPELINE_NAME' to value 'poll-app' 
[go] setting environment variable 'GO_PIPELINE_COUNTER' to value '60' 
[go] setting environment variable 'GO_PIPELINE_LABEL' to value 'poll-app.1.0.60' 
[go] setting environment variable 'GO_STAGE_NAME' to value 'build-test-stage' 
[go] setting environment variable 'GO_STAGE_COUNTER' to value '1' 
[go] setting environment variable 'GO_JOB_NAME' to value 'build-test-job' 
[go] setting environment variable 'GO_REVISION_POLL_APP_GIT' to value '13b313a2ed32f260ebfecfb18e34ac1bf' 
[go] setting environment variable 'GO_TO_REVISION_POLL_APP_GIT' to value '13b313a2ed32f260ebfecfb18e34ac1bf' 
[go] setting environment variable 'GO_FROM_REVISION_POLL_APP_GIT' to value '13b313a2ed32f260ebfecfb18e34ac1bf' 
[go] overriding environment variable 'PATH' with value '$PATH:/var/lib/go-agent/pipelines/poll-app' 
/bin/sh: 1: sbt: not found 

什么可能是问题?

+0

是'sbt'在你的$ PATH? - 以测试它: -l -c SBT测试

+0

结账的差异,当你与 '回声$ PATH' –

+0

或者你把替换 'SBT测试'参数中的绝对sbt路径/path/to/sbt

回答

0

问题是关于PATH,我不应该在管道配置中重写它。