emmeowzing / dynamic-continuation-orb

CircleCI orb for directory-targeted dynamically continued pipelines
https://circleci.com/developer/orbs/orb/bjd2385/dynamic-continuation
BSD 3-Clause "New" or "Revised" License
21 stars 11 forks source link

[Feature Request] implement common config for lib jobs and commands #97

Closed emmeowzing closed 1 week ago

emmeowzing commented 1 year ago

If we have a scenario where we have several similar submodules or packages that require the same job definition (that can't be imported in an orb - that's a lot of work, e.g.), it should be possible to specify a file that's a library of commands and jobs that isn't checked by itself, but is merged with the other configs. This gives us a centralized location to stash reused jobs and allows the user to cut down on code duplication.

sylvain-blot-sp commented 2 weeks ago

If anyone needs a quick workaround:

      - dynamic/continue:
          base-revision: main
          pre-script: yq --inplace '.jobs *= (load(".circleci/config.yml").jobs) | .' .circleci/YOUR_MODULE.yml && yq --inplace '.orbs *= (load(".circleci/YOUR_MODULE.yml").orbs) | .' .circleci/YOUR_MODULE.yml
emmeowzing commented 1 week ago

Thanks @sylvain-blot-sp , I'll cut a release in the next few days that encompasses this change. I need to perform some regular updates here, anyway.