Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
emmeowzing opened this issue Jul 2, 2023 · 4 comments
Open
Assignees
Labels
bug An issue with the system 🐛.

Comments

@emmeowzing
Copy link
Owner

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 emmeowzing added the bug An issue with the system 🐛. label Jul 2, 2023
@emmeowzing emmeowzing self-assigned this Jul 2, 2023
@Benjythebee
Copy link

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
Copy link
Owner Author

emmeowzing commented Sep 13, 2023

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
Copy link

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
Copy link
Owner Author

No problem at all! Enjoy 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An issue with the system 🐛.
Projects
None yet
Development

No branches or pull requests

2 participants