pact-foundation / pact_broker-client

A Ruby and CLI client for the Pact Broker. Publish and retrieve pacts and verification results.
MIT License
69 stars 45 forks source link

Get latest provider version for a specific environment #165

Open canny[bot] opened 3 months ago

canny[bot] commented 3 months ago

Currently there is no way using the new environments approach to get/describe version within a specific environment. As a workaround I have had to use legacy tagging and create a version tag immediately after we record-deployment into an environment. I can then use this version tag when I describe version with the specific tag passed in. Seems there is a gap here between what you can do with legacy tags and the new environments approach. My reason for needing to do this is because I reached pact nirvana for one service, and now when I add new services, pact can-i-deploy fails on the new services as they are not fully setup with recording deployments/releases etc yet, so I was advised in Pact Foundation slack workspace as a temporary workaround to instead run can-i-deploy against specific pacticipants and versions until the other newly added services are ready too.

For example, with a version tag I can do

pact-broker describe-version -a ProviderService -l $TAG -o json | jq '.number'

But there is no similar approach using environments approach instead of legacy tags.

https://pact.canny.io/admin/board/feature-requests/p/get-latest-provider-version-for-a-specific-environment

canny[bot] commented 3 months ago

This issue has been linked to a Canny post: Get latest provider version for a specific environment :tada: