Open jarmy opened 3 years ago
Released 4.1.26 with the fix
I just tried this with 4.1.26 and still could not get a tag published using providerTags
@uglyog I don't think this is specifically related to Gradle. I also have this same problem with maven using version 4.1.28. Unfortunately, this is the latest version I can use due to my project being a java 8 project. Other projects within my company that are using the latest version do not have this issue, but like I say given I have to use a Java 8 supported version the issue persists.
yeah, the issue doesn't appear to be gradle specific. I am using pact jvm 4.2.14. Tried publishing provider tag with PendingPacts enabled but no luck.
@PactBroker(url = "${pactbroker.url}",
authentication = @PactBrokerAuth(username = "${pactbroker.auth.username}", "${pactbroker.auth.password}"
providerTags = "master",
enablePendingPacts = "true"
)
As a work around I was able to add tags through create-version-tag
from cli tool or pact.provider.tag
system property but it would be good to get providerTags working.
This issue is due to:
The providerTags
value is used to fetch Pacts from the pact broker. It is passed on to the broker and not used anywhere else.
The pact.provider.tag
system property is used when publishing verification results. If set, the tags will be published first before the verification results.
Thanks for the clarification @uglyog. So, the providerTags
is working the way it is intended to be from what you are saying? I misinterpreted the line "You also need to provide the tags that will be published with your provider's verification results."
from the documentation to think providerTags
would be used while publishing verification results. Maybe worth rephrasing that line in the documentation or adding the additional info you mentioned above would help I think.
I'm just stating the reason for the current behaviour, but it is not ideal and needs to be fixed.
According to the documentation you can publish tags when verifying a contract via
providerTags
. I've found that specifyingproviderTags
in thepact
Gradle task does not workWhen I run
./gradlew pactVerify -i -PdevDB -Ppact.verifier.publishResults=true -d
the request withproviderTags
is null and the pact verification result is not tagged in the pact-broker:When I run
./gradlew pactVerify -i -Ppact.verifier.publishResults=true -Dpact.provider.tag=foo -PdevDB -d
, I see the following entry in the gradle output and the pact verification result is tagged in the pact-broker:The project I'm using is configured with the following: