Continuous integration 构建过程完成后,如何排除Gitlab运行程序Gitlab-ci.yml文件作业失败的故障?

Continuous integration 构建过程完成后,如何排除Gitlab运行程序Gitlab-ci.yml文件作业失败的故障?,continuous-integration,gitlab,gitlab-ci,gitlab-ci-runner,Continuous Integration,Gitlab,Gitlab Ci,Gitlab Ci Runner,我在Gitlab CI/CD构建阶段遇到问题。由于某种原因,这项工作正在失败。 我的Gitlab Runner yaml文件结构如下: stages: - build - deploy job 1: stage: build script: - 'bash lint.sh' - "echo test" allow_failure: true job 2: stage: deploy script: "bash deploy.sh" 问题是,在执行

我在Gitlab CI/CD构建阶段遇到问题。由于某种原因,这项工作正在失败。 我的Gitlab Runner yaml文件结构如下:

stages:
  - build
  - deploy

job 1:
  stage: build
  script:
    - 'bash lint.sh'
    - "echo test"
  allow_failure: true

job 2:
  stage: deploy
  script: "bash deploy.sh"
问题是,在执行lint.sh后,它返回正的pylint分数,但作业在作业状态下未成功,并在退出状态下失败:1,如下图所示:

在检查
gitlab runner
日志后,我发现以下错误:

pam_systemd(su:会话):无法创建会话:为单元启动作业 user@0.service以“failed”表示失败

日志图像:


由于您使用pylint来检查所生成代码的分数,因此请始终记住,pylint每次都将返回退出状态1,即使它检测到一个警告。因此,尝试解决每个警告/警告/错误并重新运行管道。

请将日志添加为文本而不是图像,这样可以提高可读性,