LeM*_*ike 13 gitlab docker gitlab-ci gitlab-ci-runner
我最近使用docker image gitlab/gitlab-runner:9.1.0与gitlab容器一起使用了一些CI.发生错误并使用不同的版本推荐类似的支持请求,所以我尝试了:latest
一些:1.11
也是.不幸的是它一直告诉我这个错误:
Running with gitlab-ci-multi-runner 1.11.4 (5e7ba4a)
on foo (02cdacdc)
Using Docker executor with image pretzlaw/php:7.1-apache ...
Starting service mariadb:latest ...
Pulling docker image mariadb:latest ...
Waiting for services to be up and running...
Pulling docker image pretzlaw/php:7.1-apache ...
Running on runner-02cdacdc-project-7-concurrent-0 via 9d1d33dc9212...
Fetching changes...
HEAD is now at 7580815 QA: CI Lint
From http://idgaf.example.org/foo/bar
7580815..affeede develop -> origin/develop
Checking out affeede as develop...
Skipping Git submodules setup
[: 1: [: Syntax error: end of file unexpected
[: 1: [: Syntax error: end of file unexpected
ERROR: Job failed: exit code 2
Run Code Online (Sandbox Code Playgroud)
我也不知道如何调试这个,也没有在容器或测试脚本中看到任何问题.这是.gitlab-ci.yml
:
before_script:
- composer install
test_7_1:
image: pretzlaw/php:7.1-apache
script: ls
Run Code Online (Sandbox Code Playgroud)
这可能是某个地方的容器问题,但我不明白.手动执行此操作(使用最近失败的docker容器)一切正常:
docker container exec 68c7b5448a56 ls
bin
builds
...
Run Code Online (Sandbox Code Playgroud)
如何追溯问题?这是什么一回事呢?
它适用于GitLab 9.1.1-ce.0.
正如#1550所指出的,问题似乎来自于bash.go
文件第 16-31 行之间进行的 shell 检测,该检测是在没有换行符的情况下注入的,从而产生了您自己遇到的语法错误。
由于您有一个自定义入口点,Dockerfile
并且看起来您没有在此处将引号传递给 exec 的参数,所以我认为这是失败的,应该进行修改。
将其更改为
exec "${*}"
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
835 次 |
最近记录: |