【发布时间】:2019-06-27 13:22:57
【问题描述】:
在 Isolate 构建 Docker 容器中执行 Bamboo 脚本任务时出现以下错误:
simple 27-Jun-2019 Starting task 'XYZ' of type 'com.atlassian.bamboo.plugins.scripttask:task.builder.script'
command 27-Jun-2019 Beginning to execute external process for build 'XYZ'\n ... running command line: \n/tmp/runInDocker3301468521768702357.sh /home/bamboo/bamboo-agent-home/temp/XYZ-8591248614821374698.sh\n ... in: /tmp\n
error 27-Jun-2019 flag provided but not defined: -e
error 27-Jun-2019 See 'docker exec --help'.
simple 27-Jun-2019 Failing task since return code of [/tmp/runInDocker3301468521768702357.sh /home/bamboo/bamboo-agent-home/temp/XYZ-8591248614821374698.sh] was 125 while expected 0
simple 27-Jun-2019 Finished task 'list buckets' with result: Failed
配置类似于此链接Docker Runner 如下所示:
Isolate build -> Docker container -> Docker image: `ubuntu:16.04`
脚本任务是:
Shell -> Inline
内容简单如下:
echo "Hallo AWS"
#!/bin/bash
Bamboo 版本是6.5.1。
【问题讨论】:
-
你添加了
-e没有值吗? -
你的脚本应该以
#!/bin/bash开头 -
@LinSel 我可以在哪里添加没有值的 -e?
-
删除
#!/bin/bash返回相同的错误
标签: docker continuous-integration bamboo