CircleCi 工作中不会忽略分支
Branches not being ignored on CircleCi jobs
我正在尝试忽略所有分支,并且仅在标记包含正确值的情况下才在标记构建上启动作业。
我正在使用
workflows:
version: 2
deploy_staging:
jobs:
- ios_deploy_staging:
filters:
tags:
only: /^staging-[0-9]+(\.[0-9]+)*$/
branches:
ignore: /.*/
- android_deploy_staging:
filters:
tags:
only: /^staging-[0-9]+(\.[0-9]+)*$/
branches:
ignore: /.*/
- ios_deploy_prod:
filters:
tags:
only: /^prod-[0-9]+(\.[0-9]+)*$/
branches:
ignore: /.*/
- android_deploy_prod:
filters:
tags:
only: /^prod-[0-9]+(\.[0-9]+)*$/
branches:
ignore: /.*/
奇怪的是只有
android_deploy_prod
正在被忽略,所有分支上的所有剩余作业 运行。
有人以前看过这个吗?
原来这是格式问题。应该是:
workflows:
version: 2
deploy_staging:
jobs:
- ios_deploy_staging:
filters:
tags:
only: /^staging-[0-9]+(\.[0-9]+)*$/
branches:
ignore: /.*/
- android_deploy_staging:
filters:
tags:
only: /^staging-[0-9]+(\.[0-9]+)*$/
branches:
ignore: /.*/
- ios_deploy_prod:
filters:
tags:
only: /^prod-[0-9]+(\.[0-9]+)*$/
branches:
ignore: /.*/
- android_deploy_prod:
filters:
tags:
only: /^prod-[0-9]+(\.[0-9]+)*$/
branches:
ignore: /.*/
我正在尝试忽略所有分支,并且仅在标记包含正确值的情况下才在标记构建上启动作业。
我正在使用
workflows:
version: 2
deploy_staging:
jobs:
- ios_deploy_staging:
filters:
tags:
only: /^staging-[0-9]+(\.[0-9]+)*$/
branches:
ignore: /.*/
- android_deploy_staging:
filters:
tags:
only: /^staging-[0-9]+(\.[0-9]+)*$/
branches:
ignore: /.*/
- ios_deploy_prod:
filters:
tags:
only: /^prod-[0-9]+(\.[0-9]+)*$/
branches:
ignore: /.*/
- android_deploy_prod:
filters:
tags:
only: /^prod-[0-9]+(\.[0-9]+)*$/
branches:
ignore: /.*/
奇怪的是只有
android_deploy_prod
正在被忽略,所有分支上的所有剩余作业 运行。
有人以前看过这个吗?
原来这是格式问题。应该是:
workflows:
version: 2
deploy_staging:
jobs:
- ios_deploy_staging:
filters:
tags:
only: /^staging-[0-9]+(\.[0-9]+)*$/
branches:
ignore: /.*/
- android_deploy_staging:
filters:
tags:
only: /^staging-[0-9]+(\.[0-9]+)*$/
branches:
ignore: /.*/
- ios_deploy_prod:
filters:
tags:
only: /^prod-[0-9]+(\.[0-9]+)*$/
branches:
ignore: /.*/
- android_deploy_prod:
filters:
tags:
only: /^prod-[0-9]+(\.[0-9]+)*$/
branches:
ignore: /.*/