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

Include verification results url output from can i deploy task #1527

Merged
merged 3 commits into from
Mar 16, 2022

Conversation

kellychen103
Copy link

Fixes #1525

From looking at the can i deploy code that is called from the client, it calls the /matrix api with parameters from the can i deploy parameters. After playing around with the matrix api, it appears that the verification results url is returned inside of the first entry in the matrix field in format

"verificationResult": {
        "success": false,
        "verifiedAt": "2022-03-16T18:13:56+00:00",
        "_links": {
          "self": {
            "href": "https://workday.pactflow.io/pacts/provider/admiral/consumer/tuocs/pact-version/4f1c177b57868a3bc7e5eac39e45b8f4c3713039/metadata/Y3ZuPTAuMC4xJTJCMzgyMTdhYQ/verification-results/3227"
          }
        }
      }

(href being the verification results url above)

This PR adds this url inside of of the Can I Deploy result data class (defaulted to null) that the client returns from calling can i deploy, and only adds it if it is able to find this field with many null safety checks. If it finds it, then the task (both in gradle and maven), will print it out in the same format that the Ruby version does, i.e.

VERIFICATION RESULTS
--------------------
1. https://pact-broker/pacts/provider/Bar/consumer/Foo/pact-version/cc4e5ae3c12482c6ffd87c4018090a7a1524c634/metadata/Y3ZuPTMzNzFmN2Y5MQ/verification-results/375 (success)

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

Successfully merging this pull request may close these issues.

Verification results url is not included from can-i-deploy task
2 participants