bitbucket-pipelines - 替换 bitbucket 管道中的单步
问题描述
我正在尝试在遵循干原则的同时构建相当复杂的 Bitbucket 管道。
到目前为止,我在definitions
部分定义了多个自定义步骤:
definitions:
steps:
- step: &foo
name: foo
script:
...
- step: &bar
name: bar
script:
...
现在,除了一个工件/变量外,我有两个几乎相同的自定义管道。
pipelines:
custom:
action-a:
- step:
name: action a
script:
- echo "1" > .value
artifacts:
- .value
- step: *bar
- step: *foo
action-b:
- step:
name: action b
script:
- echo "2" > .value
artifacts:
- .value
- step: *bar
- step: *foo
步骤生成.value
工件之后的所有内容都是相同的(并且比仅 2 个步骤更复杂)。是否可以定义一个管道并以某种方式用锚注入这个工件?
解决方案
推荐阅读
- php - prepeared statments 中的 php bind_param 使程序停止而没有错误或警告
- typescript - 枚举的打字稿子集
- vba - 如果未设置为启用填充,则无法设置 FormField.Result 的值
- java - TabLayout 片段问题
- node.js - 将来自 NodeJS 的 FormData() 请求转发到另一个服务
- python - Python:定义后未找到类属性
- laravel - 完整性约束违规:1452 无法添加或更新子行:从 Laravel 中的 csv 导入时外键约束失败
- database - 将 API 数据从第 1 页传递到 Flutter 上的另一个 dart 页面
- python - Python list.append 不起作用。我正在使用 discord.py 和 replit 数据库来制作一个赌博机器人,我想要一个参与者列表
- oracle - 如何改进我的 plsql 代码以使其正常工作?