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

Lack of --retry-while-unknown capability to gradle PactCanIDeployTask #1241

Open
AliaksandrValadzko opened this issue Nov 5, 2020 · 7 comments

Comments

@AliaksandrValadzko
Copy link

CanIDeploy can be used with --retry-while-unknown parameter to poll Pact Broker until verification result be published
https://docs.pact.io/pact_broker/client_cli/readme#can-i-deploy

gradle PactCanIDeployTask has no such capability
au.com.dius.pact.provider.gradle.PactCanIDeployTask

@uglyog
Copy link
Member

uglyog commented Nov 15, 2020

4.1.11 has been released

@rarora-trip
Copy link

Hi @uglyog
Thank you for adding retry mechanism. can you please share one example how values will be passed in case of gradle?
I tried below and it seem to not care about retry.
./gradlew canIDeploy -Ppacticipant=ProductService -PpacticipantVersion=-Ppact.provider.version -DretryCountWhileUnknown=12 -DretryWhileUnknownInterval=10 -PtoTag=develop --info

Also, If possible can you create gradle task for createTag which can be useful in case service is not on ci-cd

@uglyog
Copy link
Member

uglyog commented Nov 28, 2020

Can you create a separate issue for the createTag task?

@rarora-trip
Copy link

rarora-trip commented Dec 2, 2020

@uglyog Thank you for your reply. I checked and used correct variable(i think)
./gradlew canIDeploy -Ppacticipant=ProductService -DretryCountWhileUnknown=12 -DretryWhileUnknownInterval=10 -PtoTag=develop-SNAPSHOT
but when updated pact is published by consumer(ContentService) it triggers build through webhook and instead of waiting for build result, it says no.

Computer says no ?_(?)_/?
18:11:02
18:11:02 There is no verified pact between version 7bbc762b578f9338c7865608d9f991e3c9195902 of ProductService and the latest version of ContentService with tag develop-SNAPSHOT (e9bf877249b9558865a18ca643a48aef65e74b07)

@uglyog
Copy link
Member

uglyog commented Dec 12, 2020

@rarora-trip you need to use -P with Gradle, not -D

@uglyog
Copy link
Member

uglyog commented Dec 12, 2020

Also, checking the link I posted above, you need to configure it in your Gradle build file. You can't pass the values on the command line.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants