contract content changed triggered even if no changes to contract

159 Views Asked by At

I have set up pact broker with docker image dius/pact-broker:2.40.0-1, my pacticipants are tagged as 'master' and versioned by commit SHA. Webhook 'contract content changed' established on broker. The event is triggered on every jenkins build, even if pact was not changed. consumer jenkins file:

sh '../mvnw pact:publish -Dpact.consumer.version=${GIT_COMMIT} -Dpact.tag=master'

consumer maven plugin:

 <groupId>au.com.dius</groupId>
    <artifactId>pact-jvm-provider-maven_2.12</artifactId>
    <version>3.5.24</version>
    <configuration>
      <pactBrokerUrl>http://pact_broker</pactBrokerUrl>
      <projectVersion>${pact.consumer.version}</projectVersion>
     <tags>
        <tag>${pact.tag}</tag>
      </tags>
    </configuration>

It does not happen when no tag added. How could I fix it? Thank you in advance

1

There are 1 best solutions below

0
On

Could you please share your Pact consumer test?

If you are using matchers that generate dynamic values (e.g. a date matcher without specifying an example) that could explain the contract changing each time.