【问题标题】:How do I ignore fail so that it can proceed to next step for using pipe. (Bitbucket Pipeline)我如何忽略失败,以便它可以继续使用管道的下一步。 (比特桶管道)
【发布时间】:2023-01-28 04:57:50
【问题描述】:

如何忽略该错误以便它可以继续下一步。

为什么我想忽略:

  • 此管道用于开发环境。

  • 几乎没有其他问题需要首先修复,因此需要先部署一些代码,而无需等待安全修复。

  • 安全修复计划在约定的时间修复(因此几乎没有其他代码需要首先部署)。

正如您在上面看到的那样,它没有进入压缩构建步骤。:

- step: 
name: Atlassian Security Scan
clone:
  enabled: true
script:
  - pipe: atlassian/git-secrets-scan:0.6.0

【问题讨论】:

    标签: pipe bitbucket pipeline bitbucket-pipelines


    【解决方案1】:

    您可以为此使用after-script。无论script 是否失败,它都会运行。

    - step: 
      name: Atlassian Security Scan
      clone:
        enabled: true
      script:
        - pipe: atlassian/git-secrets-scan:0.6.0
      after-script:
        - echo "clean up"
    
    

    来源:https://bitbucket.org/blog/after-scripts-now-available-for-bitbucket-pipelines

    【讨论】:

      猜你喜欢
      • 2020-01-26
      • 2014-11-21
      • 1970-01-01
      • 1970-01-01
      • 2017-08-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-07-31
      相关资源
      最近更新 更多