Bitbucket Pipelines - 具有相同步骤的多个分支 [英] Bitbucket Pipelines - multiple branches with same steps

查看:22
本文介绍了Bitbucket Pipelines - 具有相同步骤的多个分支的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在 bitbucket 管道中组合具有相同步骤的多个分支?

Is it possible to combine multiple branches that have the same steps within bitbucket pipelines?

例如:我工作的团队使用rev"或staging"两个名称之一作为他们的审查分支.无论哪种方式,都使用相同的步骤发布到我们的评论服务器.现在分支是单独调用的.

ex: The teams I work on use one of two names for their review branches, either "rev" or "staging". Either way the same steps are used to publish to our review server. Right now the branches are called out separately.

pipelines:
     branches:
          rev:
               steps:
                    - echo 'step'
          staging:
               steps:
                    - echo 'step'

但是会不会是这样的

pipelines:
     branches:
          rev|staging:
               steps:
                    - echo 'step'

推荐答案

大括号内的逗号分隔列表似乎有效:

A comma-separated list inside braces appears to work:

pipelines:
  branches:
    '{rev,staging}':
      - step:
        script:
          - echo 'step'

这篇关于Bitbucket Pipelines - 具有相同步骤的多个分支的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆