Open bethesque opened 3 years ago
I think I have the same issue
And my tag should be branch name 'dev' or 'master', but I got :
build_41ofunga01amk6uvqsfp2h9hs$_run_closure14$_closure28$_closure29$_closure31@f13450a
The broker isn't making up that text! I'd have a look at the code that is setting your tag in the provider configuration.
pact {
broker {
pactBrokerUrl = System.getenv("PACT_BROKER_URL")
pactBrokerUsername = System.getenv("PACT_BROKER_USERNAME")
pactBrokerPassword = System.getenv("PACT_BROKER_PASSWORD")
}
reports {
defaultReports()
markdown
}
serviceProviders {
NeuronPublic {
providerVersion = { System.getenv("CIRCLE_SHA1") }
providerTag = { System.getenv("CIRCLE_BRANCH") }
protocol = 'http'
host = 'xx-api-qa.xx-xx.com'
port = 80
path = '/'
requestFilter = { req ->
req.addHeader('testmode', 'true')
req.addHeader('X-Authorization', 'Bearer ' + System.getenv("PACT_REQUEST_TOKEN"))
}
fromPactBroker {
selectors = latestTags('dev')
stateChangeUrl = url('http://xx-api-qa.xx-xx.com/api/pact/providerState')
stateChangeUsesBody = true
stateChangeRequestFilter = { req ->
req.addHeader('testmode', 'true')
req.addHeader('X-Authorization', 'Bearer ' + System.getenv("PACT_REQUEST_TOKEN"))
}
}
}
}
}
And my current provider branch is 'dev', so I think the tag should be 'dev', it worked fine before
JDK11
$ ./gradlew -d pactverify -Ppact.verifier.publishResults=true **-Dpact.provider.tag=Test2**
I used 'pact.provider.tag' instead . My issue was fixed! Thanks