This is part of my config related to the problem:
version: 2.0
# ...
# jobs definitions
# ...
workflows:
version: 2
build_test:
jobs:
- check:
filters: {tags: {ignore: "/.*/"}}
- build_dev_debug:
requires: [check]
- build_prod_release:
requires: [check, build_dev_debug]
filters: {branches: {only: develop}}
- approve_version_patch_bump:
type: approval
requires: [build_prod_release]
filters: {branches: {only: develop}}
- approve_version_minor_bump:
type: approval
requires: [build_prod_release]
filters: {branches: {only: develop}}
- approve_version_major_bump:
type: approval
requires: [build_prod_release]
filters: {branches: {only: develop}}
- bump_version_patch:
requires: [approve_version_patch_bump]
- bump_version_minor:
requires: [approve_version_minor_bump]
- bump_version_major:
requires: [approve_version_major_bump]
deploy:
jobs:
- check:
filters: {branches: {ignore: "/.*/"}, tags: {only: "/^v[0-9]+\\.[0-9]+\\.[0-9]+$/"}}
- build_dev_debug:
requires: [check]
- build_prod_release:
requires: [check, build_dev_debug]
There are two workflows: ‘build_test’ and ‘deploy’.
The overall procedure is:
- When merge (or new commit) comes to develop, start ‘build_test’.
- In ‘build_test’ optionally I can unhold bump version job.
- When the tag is added (pushed to develop) trigger ‘deploy’ workflow.
The problem I have is that in the workflow ‘deploy’ only first job (‘check’) is run. And I don’t know the reason why. Is the sharing of jobs between workflows correct practice? Or am I doing something else wrong?
(There is also one more issue with this config: ‘build_test’ doesn’t filter out tags effectively, and once a tag is pushed, both ‘build_test’ and ‘deploy’ start, not only ‘deploy’ as I wanted. )
Any suggestions very welcomed.