首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Gitlab CI没有在终端中显示完全输出

Gitlab CI没有在终端中显示完全输出
EN

Stack Overflow用户
提问于 2022-01-24 01:23:23
回答 1查看 532关注 0票数 0

我已经创建了一个在$CI_PROJECT_DIR上执行ansible-lint的管道。问题是,与在本地机器上运行相比,UI中没有显示完整的输出。

您可以注意到两者在输出上的差异。

下面是我的本地机器的输出(Ubuntu安装了ansible-lint )

代码语言:javascript
复制
**ansible-lint create-dir.yaml -v**
WARNING  Overriding detected file kind 'yaml' with 'playbook' for given positional argument: create-dir.yaml
INFO     Executing syntax check on create-dir.yaml (0.31s)
WARNING  Listing 1 violation(s) that are fatal
syntax-check: 'file' is not a valid attribute for a Play
create-dir.yaml:4:3 [WARNING]: No inventory was parsed, only implicit localhost is available
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'
ERROR! 'file' is not a valid attribute for a Play

The error appears to be in '/tmp/create-dir.yaml': line 4, column 3, but may be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

---
- name: Create a directory if it does not exist
  ^ here
Finished with 1 failure(s), 0 warning(s) on 1 files.

以下是Gitlab CI的输出:

代码语言:javascript
复制
$ find ./ -not  \( -name "*.ansible-lint" -o -name ".gitlab-ci.yml" \) \( -name "*yml" -o -name "*yaml" \)  | xargs ansible-lint -v
WARNING  Overriding detected file kind 'yaml' with 'playbook' for given positional argument: ./ansible/create-dir.yaml
INFO     Executing syntax check on ansible/create-dir.yaml (0.39s)
Cleaning up project directory and file based variables 00:01
Job succeeded

我想知道为什么输出有差异,以及如何在Gitlab CI上打印完整的消息。

EN

回答 1

Stack Overflow用户

发布于 2022-01-24 07:37:55

GitLab CI/CD中的作业日志长度有限。它是出于操作上的原因而设计的,因为作业可以产生任意的输出,因此一个人可以错误地或有目的地输出甚至是千兆字节或兆字节的文本。

但是,如果在输出中向上滚动,就有能力通过按下“完整的原始数据”来查看完整的日志。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/70828050

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档