Tatiana
05/16/2023, 4:42 PMThis version of Pactflow does not support recording deployments, or you do not have the required permission to read environments. Please upgrade to the latest version if using Pactflow On-Premises, and ensure the user has the environment read permission.
Record deployment works perfectly fine for my other repos but for one repo I have this error.Tatiana
05/16/2023, 6:24 PMTatiana
05/16/2023, 8:54 PMPROVIDER_VERSION
in variables and then I pass this variable to the record deployment job:
verify contracts:
stage: validate
extends: .pact-aws-cli-v1
variables:
PROVIDER_VERSION: $CI_COMMIT_SHA
script:
- >-
pact-verifier
--hostname="app"
--broker-url="$PACT_FLOW_BASE_URL"
--token="$PACT_FLOW_KEY"
--loglevel="info"
--provider-branch="$CI_COMMIT_REF_SLUG"
--provider-version="$PROVIDER_VERSION"
--provider-tags="$CI_COMMIT_REF_NAME"
--consumer-version-tags="main"
--provider-name=dummy-microservice-provider
--publish
record deployment in pact:
stage: record deployment
extends: .pact-aws-cli-v1
variables:
ENVIRONMENT: $ENVIRONMENT
script:
- >-
pact-broker record-deployment
--pacticipant=dummy-microservice-provider
--version="$PROVIDER_VERSION"
--environment="$ENVIRONMENT"
--broker-base-url="$PACT_FLOW_BASE_URL"
--broker-token="$PACT_FLOW_KEY"
--verbose
and in this case record deployment fails with the error above. If I provide --version=$CI_COMMIT_SHA
in the record deployment
job everything works. Why I can’t use PROVIDER_VERSION
defined in variables?
And an interesting thing, it works for can-i-deploy
Tatiana
05/16/2023, 10:00 PMvariables:
PROVIDER_VERSION: $CI_COMMIT_SHA
Matt (pactflow.io / pact-js / pact-go)
Tatiana
05/16/2023, 10:23 PMMatt (pactflow.io / pact-js / pact-go)