Hi, I’ve upgraded the pact cli we are using to lat...
# pact-broker
j
Hi, I’ve upgraded the pact cli we are using to latest and then started seeing different behaviour than the previous version of the cli we were on (nearly a year old). When running can-i-deploy for a service to our main branch, we now have multiple pacts which have an environment flag as main when previously it was just the current deployed. Is there any way of maintaining that behaviour?
The “wrong contract” states currently released and supported in main. Looking at the docs on recording deployment and recording release. I assumed if I used record deployment then it doesnt use that lifecycle so there wouldnt be a “released” version different to the “deployed” version
m
Yes, recording deployments replaces the previously deployed version. Could you please share the CLI command you're using to record deployments/releases and the input/ output for can I deploy?
j
Copy code
pact-broker create-version-tag --pacticipant "service1" --version "6fc2103" --tag "main"
Tagging service1 version 6fc2103 as main

pact-broker record-deployment --environment "main" --pacticipant "service1" --version "6fc2103"

Recorded deployment of service1 version 6fc2103 to main environment in the Pact Broker
At the end of this, the previous version (62a65ed) was still tagged with env: main but so was the new version (6fc2103)
m
tags don’t overwrite previous versions, each version you give a tag will have that tag forever (unless you remove it). Are you sure the previous version was still deployed to
main
, and not just tagged
main
?
what are you using tags for, given you use the
record-deployment
command?