我有ubuntu和go-agent / server,我已经定义了任务:
<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 '13b313a2ed32f260ebfecfb18e34ac10123353bf'
[go] setting environment variable 'GO_TO_REVISION_POLL_APP_GIT' to value '13b313a2ed32f260ebfecfb18e34ac10123353bf'
[go] setting environment variable 'GO_FROM_REVISION_POLL_APP_GIT' to value '13b313a2ed32f260ebfecfb18e34ac10123353bf'
[go] overriding environment variable 'PATH' with value '$PATH:/var/lib/go-agent/pipelines/poll-app'
/bin/sh: 1: sbt: not found
可能有什么问题?
答案 0 :(得分:0)
问题是关于PATH,我不应该在管道配置中覆盖它。