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
20 stars 11 forks source link

on-tag dynamic continuations should compare against the last tag #83

Open emmeowzing opened 1 year ago

emmeowzing commented 1 year ago

I tend to keep tag-specific jobs in my main config, but the functionality could be the same for tags as well, but instead of comparing two commits, we compare two tags (the current, and the last).

Another argument I could add is to optionally run all workflows on tag, say, and not just rely on changes between tags to kick off workflows. E.g., say you want a new docker image and helm chart (with corresponding image tag) on tag, but you've only changed src/ (granted this could also be accomplished with ignore-includes).

Benjythebee commented 10 months ago

How do you even currently make it work with tags? I get the following: image

with the following config:


version: 2.1
# See https://github.com/emmeowzing/dynamic-continuation-orb
setup: true

orbs:
  dynamic: bjd2385/dynamic-continuation@3.7.0

workflows:
  on-commit:
    jobs:
      - dynamic/continue:
          context: circleci
          auto-detect: false
          modules: |
            apps/myProject
emmeowzing commented 10 months ago

This warrants more discussion @Benjythebee.

As I mentioned above, how I presently organize my configs, including this project's , is to keep tag-specific jobs separate from branch-specific jobs, by placing the former in my main config, .circleci/config.yml, and the rest of the jobs in other configs. This guarantees required jobs on tag will all run, every time.

But it does increase code duplication as well, which is why I've spun off yet another orb, a general orb, with all the typical jobs I'll use in my pipelines.

Any ideas for how we could organize this differently? I've been thinking about it for a while and haven't come up with a better solution.

Benjythebee commented 10 months ago

Thank you for your response and for dealing with my ignorant ass.... I added filters and it just worked... The reason for my comment was I originally thought the issue was with the orb not "passing on" the tag, but I was just dumb


version: 2.1
# See https://github.com/emmeowzing/dynamic-continuation-orb
setup: true

orbs:
  dynamic: bjd2385/dynamic-continuation@3.7.0

workflows:
  on-commit:
    jobs:
      - dynamic/continue:
          context: circleci
          auto-detect: false
          modules: |
            apps/myProject
          filters:
            tags:
              only: /.*/
            branches:
              only: /.*/

Thank you for your time!

emmeowzing commented 10 months ago

No problem at all! Enjoy :+1: