【问题标题】:Is there a way to make gitlab runnder produce a verbose output on deploy有没有办法让 gitlab runner 在部署时产生详细的输出
【发布时间】:2020-05-21 03:50:00
【问题描述】:

这是我在 .gitlab-ci.yml 中的工作

deploy:
  variables:
    CI_DEBUG_TRACE: "true"
  stage: deploy
  image: registry.gitlab.com/gitlab-org/cloud-deploy aws-base:latest # see the note below
  script:
    - aws s3 ...
    - aws create-deployment ...
  only:
    - master

部署过程失败 错误:准备失败:参考格式无效(docker.go:198:0s)

trace 变量对输出没有影响。

【问题讨论】:

    标签: amazon-web-services gitlab-ci


    【解决方案1】:

    存储库 URL 和图像标记之间有一个空格。

    deploy:
      variables:
        CI_DEBUG_TRACE: "true"
      stage: deploy
      image: registry.gitlab.com/gitlab-org/cloud-deploy/aws-base:latest # see the note below
      script:
        - aws s3 ...
        - aws create-deployment ...
      only:
        - master
    

    【讨论】:

    • 非常感谢,它有帮助,但构建过程仍然失败。有关日志,请参见我上面的答案。
    【解决方案2】:

    非常感谢。但是构建过程仍然失败。以下是新日志:

     ++ export CI_DEBUG_TRACE=true
     ++ CI_DEBUG_TRACE=true
     ++ export CI_DISPOSABLE_ENVIRONMENT=true
     ++ CI_DISPOSABLE_ENVIRONMENT=true
     ++ export CI_RUNNER_VERSION=13.0.0
     ++ CI_RUNNER_VERSION=13.0.0
     ++ export CI_RUNNER_REVISION=c127439c
     ++ CI_RUNNER_REVISION=c127439c
     ++ export CI_RUNNER_EXECUTABLE_ARCH=linux/amd64
     ++ CI_RUNNER_EXECUTABLE_ARCH=linux/amd64
     ++ cd /builds/Zyubenko/humans
     + exit 0
     ERROR: Job failed: exit code 1
    

    【讨论】:

    • 我没有具体看到任何特定的错误详细信息或失败的命令,因为脚本部分的退出代码是 0。日志中是否还有其他部分您已编辑?
    • 确实如此。输出显示,我对 aws 命令的使用不正确:aws s3 需要不同的参数,并且不再有 asws create-deployment 命令。有人知道 gitlab aws 有更新的手册吗?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2013-09-03
    • 1970-01-01
    • 1970-01-01
    • 2022-01-01
    • 2016-01-12
    • 2012-06-25
    • 1970-01-01
    相关资源
    最近更新 更多