2014-11-16 59 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,我不應該在管道配置中重寫它。