【发布时间】:2021-03-18 11:06:57
【问题描述】:
我有以下用于 CircleCI 构建的工作流定义
workflows:
version: 2
default:
jobs:
- verify
- tests_3_1:
requires:
- verify
- tests_5_0:
requires:
- verify
- pack:
requires:
- tests_3_1
- tests_5_0
- push:
requires:
- pack
context:
- GitHub
filters:
tags:
only: /^v(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/
branches:
ignore: /.*/
这个想法是:
- 在所有提交上运行
verify、test_3_1、test_5_0、pack - 在上面的作业之上,在 master 上运行作业
push,并且使用与前面有v的 semver 版本匹配的标签
由于某种原因,标记提交时不会触发构建。我不确定问题是在过滤器中还是在与构建标签不匹配的正则表达式中。
现在我尝试了在 RegexPal 上匹配的 v0.1.0-preview-0001。
您能提出任何改进建议吗?我看到 this question 非常相似,但我在实施建议的解决方案时遇到了问题
【问题讨论】:
标签: circleci circleci-workflows