-
-
Notifications
You must be signed in to change notification settings - Fork 481
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
Create can-i-deploy maven plugin #994
Comments
Hi @bethesque , |
Awesome! You're very welcome to do this one, but there is one that's of a higher importance and urgency if you're interested. I don't think it will be too hard to do, but you'll need to do a bit of digging to understand how the code is currently working. I can give you some pointers, but I'm not one of the pact-jvm maintainers, so I'll only be a slight bit ahead of you anyway. #942 (follow the link through to the master issue) |
Sorry for the delay. |
Basic version working: $ mvn pact:can-i-deploy -Dpacticipant='Foo Web Client' -DpacticipantVersion=1.0.2 -DtoTag=prod
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building pact-gradle-test 1.0.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- pact-jvm-provider-maven:4.0.5:can-i-deploy (default-cli) @ pact-gradle-test ---
Computer says no ¯\_(ツ)_/¯
There is no verified pact between version 1.0.2 of Foo Web Client and the latest version of Activity Service with tag prod (no such version exists)
There is no verified pact between version 1.0.2 of Foo Web Client and the latest version of Activity Service with tag prod (no such version exists)
There is no verified pact between version 1.0.2 of Foo Web Client and the latest version of Activity Service with tag prod (no such version exists)
There is no verified pact between version 1.0.2 of Foo Web Client and the latest version of Activity Service with tag prod (no such version exists)
There is no verified pact between version 1.0.2 of Foo Web Client and the latest version of Activity Service with tag prod (no such version exists)
There is no verified pact between version 1.0.2 of Foo Web Client and the latest version of Activity Service with tag prod (no such version exists)
There is no verified pact between version 1.0.2 of Foo Web Client and the latest version of Activity Service with tag prod (no such version exists)
There is no verified pact between version 1.0.2 of Foo Web Client and the latest version of Activity Service with tag prod (no such version exists)
There is no verified pact between version 1.0.2 of Foo Web Client and the latest version of Activity Service with tag prod (no such version exists)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.863 s
[INFO] Finished at: 2020-01-26T16:57:10+11:00
[INFO] Final Memory: 17M/74M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal au.com.dius:pact-jvm-provider-maven:4.0.5:can-i-deploy (default-cli) on project pact-gradle-test: Can you deploy? Computer says no ¯\_(ツ)_/¯ -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException |
Version 4.0.5 has been released with this change |
I checked the code, and there is an extra parameter that needs adding - it won't work in its current form. The matrix endpoint started as a generalised "show me these versions and these versions together" and then later had the "and can they be deployed together safely" added, so the parameters are a little obscure. I wrote some docs on the matrix "selectors" here: https://docs.pact.io/pact_broker/advanced_topics/selectors You'll need to add the top level parameter If the user doesn't specify a The pacts for the matrix endpoint are here: https://github.com/pact-foundation/pact_broker-client/blob/master/spec/pacts/pact_broker_client-pact_broker.json The other option is to use the simplified Note that this does not support the --latest for the pacticipant you're about to deploy, which personally, I don't think should be needed. Someone should know which version they're deploying, and relying on the broker to know which the latest one seems dicey. |
You can see the effect of the 'latestby' by viewing the matrix for a integration, and changing the |
4.0.6 has been released with the updated fix (latestby query parameter) |
LGTM. Is the pact being published anywhere? |
Don't think so |
Great first issue for a beginner! @ me if you're reading this and are interested in an easy little OSS contribution.
The text was updated successfully, but these errors were encountered: