Thomas Kanne
01/28/2025, 2:22 PMcontract_requiring_verification_published in the Pact-Broker's webhooks as I am working on multiple environments (main branch, integration, stage, prod). I am using Gitlab trigger tokens which trigger a pipeline only running the pactVerify job (which is a Gradle talk of my project executing the Java PactProviderTest).
As Gitlab only accepts branches and tags as reference (ref), I don't know how I can pass the right revision to the ref as my pactbroker.providerVersionNumber returns a combination of my Gradle project version + the respective Git short SHA (e.g. 1.0.0-a6d33b7a). My tags in Gitlab are named in format v1.0.0. I was thinking about parsing the version and do string manipulation to reach my desired format, but this seems not be possible within a webhook. Alternatively I thought about setting the providerVersionsTags and use them to pass to the ref . But this seems to be a complex (and probably dirty) workaround which I am not even sure about if it would work as expected.
Do you have any idea?Adrien DEVILLERS
01/28/2025, 2:52 PMThomas Kanne
01/28/2025, 10:02 PMAdrien DEVILLERS
01/29/2025, 9:25 AMThomas Kanne
02/04/2025, 10:47 AMcan-i-merge function before we are merging the feature branches into the main pipeline. This we could not use anymore since we don't have main branches tagged, which the can-i-merge would check against, but only tags.
But as we are directly deploying to integration environment after the tag has been published, we wouldn't really need that functionality anyways. Or what do you think? Checking can-i-deploy three times (integration, stage, prod) should be good enough?
As an alternative we thought about creating a second tag in Gitlab which equals the pact pacticipant version so that instead of the branch variable, we could just send the pactbroker.providerVersionNumber to the Gitlab trigger token ref ...