Hello,
I have a monorepo consisting two projects, server and client, as the following -
.
├── .circleci
│ ├── config.yml
│ └── continue_config.yml
├── server
├── client
├── tests
In the config.yaml I use the path-filtering orb in order to determine whether the CI needs to run the server or client tests in the continue_config.yml based on the changed files.
After running the tests, if all passed successfully or skipped because the project files haven’t changed, I want to run a build and deploy step that creates a docker image and push to Artifactory.
Before I used the path-filtering feature it was easy enough to do these steps as different jobs and use ‘requires’ clause as the following -
workflows:
management-build:
jobs:
- test-server
- build-and-test-client
- build-and-test-integration
- build-and-upload-docker:
filters:
branches:
only: develop
requires:
- test-server
- build-and-test-client
- build-and-test-integration
Now as I’m using the path-filtering I need to separate these jobs in to different workflows to be able to use the ‘when’ clause with a different parameters, one for the server tests job (test-server and build-and-test-integration) and the client job (build-and-test-client).
The issue is when I’m using different workflows, the method that I used to ensure that all the tests have passed successfully with the ‘requires’ clause before building and deploying the docker image is not available from what I read on workflow level.
The question is how could I do both, use the path-filtering on different workflows and then trigger a third workflow that will only run when the first two passed before hand.
I will appreciate any solution or suggestion,
Omer.