【发布时间】:2018-09-23 19:43:32
【问题描述】:
我正在使用 gitlab-runner exec 测试 GitLab CI 管道。在执行脚本期间,Boost 遇到了一个错误,它创建了一个日志文件。我想查看此日志文件,但不知道如何查看。
.gitlab-ci.yml在项目目录中:
image: alpine
variables:
GIT_SUBMODULE_STRATEGY: recursive
build:
script:
- apk add cmake
- cd include/boost
- sh bootstrap.sh
我在我的机器上测试了这个:
sudo gitlab-runner exec docker build --timeout 3600
输出的最后几行:
Building Boost.Build engine with toolset ...
Failed to build Boost.Build build engine
Consult 'bootstrap.log' for more details
ERROR: Job failed: exit code 1
FATAL: exit code 1
bootstrap.log 是我想查看的内容。
将- cat bootstrap.log 附加到.gitlab-ci.yml 不会输出文件内容,因为运行程序在此行之前退出。我尝试使用 sudo docker ps -a 查看过去的容器,但这并没有显示 GitLab Runner 使用的容器。如何打开bootstrap.log?
【问题讨论】:
-
目前,我只是在我在 GitLab Runner 之外创建的 Docker 容器上测试了这些命令。
标签: docker gitlab gitlab-ci-runner