How to deal with Pact Broker's branch feature and Git's annotated tags? #629
-
I'd like to ask for some advice or support on some possibly weird topic. As you may know, Git supports two kinds of tags: Lightweight Tags and Annotated Tags, see https://git-scm.com/book/en/v2/Git-Basics-Tagging:
For our Pacts, we are using the Now, if someone creates an Annotated Tag, there is no branch information available. Github Desktop creates Annotated Tags by default, without an option to disable them. How do you deal with that situation? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
What do you need to use the annotated tag for in regards to Pact? |
Beta Was this translation helpful? Give feedback.
I think record deployment or release will be your best bet (depending on what you're doing with your artifact you will want one or the other, or maybe even both).
I take it that the annotated tag is not for a commit that has previously had a pact published for it (because otherwise you wouldn't have a problem).
If you don't set a branch or record deployment/release, then, as you say, your pacts will be orphaned, and there will be no way of verifying them.
While I recommend using that deployment/release approach, note that pact broker tags are still supported. You could published with a tag like "annotated" and then verify all/latest pacts with the annotated tag, depending on your use case…