【问题标题】:How to stop a Bitbucket Pipeline from building?如何阻止 Bitbucket 管道构建?
【发布时间】:2018-03-03 23:31:20
【问题描述】:

有什么方法可以阻止 Bitbucket Pipeline 的构建?

这个过程需要超过 25 分钟?

.yml 文件内容为:-

image: node:8.9.4
pipelines:
  default:
    - step:
        caches:
          - node
        script: # Modify the commands below to build your repository.
          - if [ $BITBUCKET_BRANCH == 'master' ]; then
          - npm install -g @angular/cli
          - npm install -g firebase-tools
          - npm install
          - ng build
          - firebase deploy --only hosting --token "$FIREBASE_TOKEN" --public dist
          - fi

【问题讨论】:

  • 您找到解决方案了吗?如果是,请发布。谢谢。

标签: angular firebase firebase-hosting bitbucket-pipelines


【解决方案1】:

右边的那个按钮呢: ?

【讨论】:

  • 感谢您的解决方案。实际上,我先禁用了管道,然后试图停止它。所以它不起作用。半小时后弄清楚了。 :-)
  • 停止按钮被禁用,构建似乎被冻结。如何强制停止?
【解决方案2】:

您在每次运行时都从 npm 安装所有库,使用已经安装了 npm 和 firebase 工具的 docker 映像,如下所示:https://hub.docker.com/r/devillex/docker-firebase/,这将显着缩短构建时间

【讨论】:

    【解决方案3】:

    您可以为 bitbucket 管道设置最大时间:

    options:
      max-time: 15
    pipelines:
      branches:
         .........
    

    通过添加上述属性,您的 bitbucket 管道将在 15 分钟后自动中止。

    【讨论】:

    【解决方案4】:

    看起来您已经找到了答案,但请注意,当您推送到您的存储库时,您还可以在提交消息中包含 [skip ci]。除非这会更新链接到构建的现有拉取请求,否则它不应触发您的管道。

    【讨论】:

      【解决方案5】:

      如果您的意思是停止工作。 试试看。

      项目名称 -> 设置 -> 管道设置 -> 设置 -> 启用管道

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2020-11-21
        • 2018-03-12
        • 2021-08-09
        • 1970-01-01
        • 1970-01-01
        • 2022-12-19
        • 1970-01-01
        • 2021-06-13
        相关资源
        最近更新 更多