File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -33,3 +33,22 @@ pact-broker create-version-tag \
3333 --tag " $PACT_ENV " \
3434 --broker-base-url " $PACT_BROKER_URL " \
3535 --broker-token " $PACT_BROKER_TOKEN "
36+
37+ # Can-I-Deploy check
38+ echo " Running can-i-deploy check for provider compatibility..."
39+ pact-broker can-i-deploy \
40+ --pacticipant " VPCourtScheduleProvider" \
41+ --version " $GIT_COMMIT " \
42+ --to-environment " $PACT_ENV " \
43+ --broker-base-url " $PACT_BROKER_URL " \
44+ --broker-token " $PACT_BROKER_TOKEN " \
45+ --output table
46+
47+ CAN_I_DEPLOY_STATUS=$?
48+
49+ if [ " $CAN_I_DEPLOY_STATUS " -ne 0 ]; then
50+ echo " ❌ Can-I-Deploy failed — this version is NOT safe to deploy to $PACT_ENV ."
51+ exit 1
52+ else
53+ echo " ✅ Can-I-Deploy succeeded — this version is safe to deploy to $PACT_ENV ."
54+ fi
You can’t perform that action at this time.
0 commit comments