We recently started using pactflow tool for contra...
# pactflow
r
We recently started using pactflow tool for contract testing. I see in pactflow we can create different teams. But while publishing pacts to pactflow how to set the 'team name' or use team uuid ? we are using pact CLI to publish pacts. we are using the below pact CLI cmd to publish pacts. I see there is no supported arguments for in 'publish' command to set team-uuid. We use --team-uuid when using 'create-webhook' command, looking for something similar for 'publish' command
Copy code
docker run --rm -v ${PWD}:${PWD}
pactfoundation/pact-cli publish ${{ pact_folder_path }}
--consumer-app-version ${{ git_commit_version }}
--tag ${{ git_branch }}
--broker-base-url ${{ pact_broker_url }}
--broker-token ${{ pact_broker_token }}
m
You need to assign the consumer application to the team first, either through the UI or via APIs
You can do that from the team edit UI
r
@Matt (pactflow.io / pact-js / pact-go) where can I find the api documentation for this ? I tried to find it on https://docs.pact.io/pact_broker/advanced_topics/api_docs page but didn't find the right endpoint to do this ? can you please provide the link for API documentation (to assign customer app to a team) thanks in advance
m
We currently don’t have published docs for those Pactflow APIs, but we could probably point you at the ones needed. The simplest path is to navigate to the UI (see https://docs.pactflow.io/docs/user-interface/settings/teams) or you could also use the terraform provider
You could probably look at the network requests from the users page to see how they update the team membership, and then use that
r
Thanks @Matt (pactflow.io / pact-js / pact-go) I will check it out
👍 1
Hey @Matt (pactflow.io / pact-js / pact-go) one more followup question - we are using docker run --rm pactfoundation/pact-cli:latest broker create-webhook to create webhooks in pactflow. we are using
--team-uuid
tag in the command to assign webhook to a particular team. When we use both --consumer and --provider arguments in the command the webhook is not getting assigned to the team. But if are not passing both, the webhook is assigned to the team. Is this intentional function ? or bug ?
--consumer ${consumer}
--team-uuid ${team_uuid}
This works
--provider ${provider}
--team-uuid ${team_uuid}
This works
--consumer ${consumer}
--provider ${provider}
--team-uuid ${team_uuid}
This is not working. webhook is created by not assigned to team Sorry, I know this can be done through pactflow UI, but our team wants to use less UI and do everything as part of pipeline