dynamic-continuation-orb icon indicating copy to clipboard operation
dynamic-continuation-orb copied to clipboard

on-tag dynamic continuations should compare against the last tag

Open emmeowzing opened this issue 2 years ago • 4 comments

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).

emmeowzing avatar Jul 02 '23 14:07 emmeowzing

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/[email protected]

workflows:
  on-commit:
    jobs:
      - dynamic/continue:
          context: circleci
          auto-detect: false
          modules: |
            apps/myProject

Benjythebee avatar Sep 13 '23 21:09 Benjythebee

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.

emmeowzing avatar Sep 13 '23 21:09 emmeowzing

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/[email protected]

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

Thank you for your time!

Benjythebee avatar Sep 13 '23 21:09 Benjythebee

No problem at all! Enjoy :+1:

emmeowzing avatar Sep 13 '23 22:09 emmeowzing