We’re having a hard time figuring out how to leverage workflows for our projects. Here’s what we’re hoping to do:
-
We want to define a “dev/test” workflow that executes a number of jobs
-
These jobs build “snapshots” of our code, which we’ll then deploy to our various non-production environments
-
We’d expect the above workflow to get invoked any time someone commits to our “develop” branch
-
We also want to have a second workflow defined that executes the same jobs as the “dev/test” workflow, but also a number of other jobs related to cutting a production release (e.g. documentation build, deployment of artifacts to Maven, tagging, etc.)
-
The above workflow wouldn’t be automatically triggered by anything. Because it’s a production release, we’d only execute this manually (either through the CircleCI UI or, hopefully, via the API)
So, we went ahead and defined both workflows without any branch filters. What we didn’t realize when we did this was that both workflows would get executed serially. We were thinking that we could somehow define the release workflow to only run manually but this doesn’t seem to be possible.
An option that we know we have is to set a branch (“master”, in this case) filter on the release workflow so that it only gets triggered on a commit but we don’t really want to dirty the master branch with these types of commits.
One of our primary drivers behind using workflows is that we’d get to take advantage of contexts in Circle CI 2.0 and use global environment variables.
I’m curious to know how others are using workflows to achieve something similar to the above.
Thanks!
- Terence