Can I Deploy¶ ↑
Allowed methods: GET
A simplified resource that accepts the same parameters as the basic usage of the can-i-deploy
CLI command.
Parameters:
-
pacticipant: The name of the pacticipant (application) you want to deploy (required).
-
version: The version of the pacticipant (application) you want to deploy (required).
-
environment: The name of the environment into which the pacticipant (application) is to be deployed.
-
to: The tag used to identify the environment into which you wish to deploy the application (eg.
test
orprod
). Deprecated - use theenvironment=ENVIRONMENT
parameter in preference to theto=TAG
parameter as deployments and environments are now explictly supported. -
ignore[]: The name of the pacticipant to ignore when determining if it is safe to deploy (optional). May be used multiple times. eg
ignore[]=foo&ignore[]=bar
-
ignore[][pacticipant] and ignore[][version]: When ignoring a specific pacticipant version, the name and version of the application to ignore may be specified using “nested” param names syntax. eg.
ignore[][pacticipant]=foo&ignore[][version]=2ac5a946&ignore[][pacticipant]=bar
If you have an environment that you identify with the name prod
, and each time you deployed an application to the prod environment you recorded the deployment of relevant application version in the Pact
Broker using record-deployment
, then calling /can-i-deploy?pacticipant=Foo&version=734137278d&environment=prod
will check that version 734137278d of Foo has a successful verification result with each of the integrated application versions that are currently in prod. That is, it is safe to deploy.