Multiple continuation pipelines
closed
A
Adrien Cabarbaye
In my use-case, I have a monorepo with several modules and use the path filtering to run workflows on each module individually and this works really well. Nonetheless, the modules list is dynamic (new module can be added or removed from a commit to another) and I want the
mapping
section to be dynamically determined and hence, be automatically generated based on some module identification rules. For that purpose, I tried to create a setup workflow to generate the configuration containing the path filtering but I am facing one limitation of the system (which I did not know existed from just reading the documentation but which I found out later here https://github.com/CircleCI-Public/api-preview-docs/blob/master/docs/setup-workflows.md#limitations) which states that "a pipeline cannot be continued with another setup configuration" and which may explain the error I am getting : "Continuation config contains setup stanza whilst not in setup anymore". I was wondering whether it would be possible in the future to have multiple continuation pipelines or if not, if there was a way to achieve my usecase with a dynamic mapping
section.JD Fagan
The use case where this would be useful is when you want different mapping rules applied for different base-revision values for the path-filtering orb. In my use case, I want to use base-revision of HEAD~1 in first setup workflow to see if any files change warranting a new docker images build/push to docker registry and then have the continuation be another setup workflow to handle path-filtering mapping for base-revision of main so we can run entire suite of tests depending on rules set from prior setup workflow pipeline as well as reviewing entire git diff changes for this feature branch (thus why we use main for base-revision). I don't want to use main as base-revision for building docker images cause that would cause redundant rebuilding of docker images for any later commits in a branch that don't warrant the need for docker image builds.
Salil Subbakrishna
closed
We won't be adding multiple continuations, but there is a solution to this use case. The path-filtering orb is really just running a git diff to determine what files are changed, running a python script that determines which parameters should be set based on those changes, writing those parameters to a file and running the continuation orb with that parameters file. If you already have a script that can determine what parameters should be set, you should be able to create the parameters file and continue with this file.
Benjamin Poile
I'm also trying to do the same thing. Did you have any luck getting this working or finding an alternative?