pocomon
09/18/2022, 7:16 PM@TestTarget
public final Target target = new HttpTarget("https", "127.0.0.1", 443, "api", true);
2. I have a job in the pipeline which build the application by running the "mvn clean install" command . The provider test also runs in this scenario and as the environment is not ready it will fail the test and build will not succeed. I want to control the running of pact provider test only when invoked individually in a job for pact provider testing. In all the other cases if anyone invoke the command "mvn clean install" pact provider test cases should not run. How to handle this situation.
Thanks in advance for the help and guidance (edited)Édouard Lopez
09/19/2022, 10:43 AM2.104.0.0
I got this error:
> [linux/arm64 stage-2 2/5] RUN apk add --no-cache bash=5.1.16-r0:
#22 0.193 .buildkit_qemu_emulator: /bin/sh: Invalid ELF image for this architecture
Does it ring a bell?Purushotham V
09/19/2022, 2:53 PMVERIFIED AT - never
.. Is there anything I am missing here to show the latest results.Thomas K
09/22/2022, 3:32 PMÉdouard Lopez
09/27/2022, 9:47 AMinitializationError
and <http://au.com|au.com>.dius.pact.provider.junitsupport.loader.NoPactsFoundException: No Pact files were found to verify
when there are no contracts available? I was expecting a non-blocking behaviour in this kind of case.
To it's simplest form, my consumer version selectors is:
@PactBrokerConsumerVersionSelectors
public static SelectorBuilder consumerVersionSelectors() {
return new SelectorBuilder()
.mainBranch();
// .branch("abmm-5295"); // work fine
}
Édouard Lopez
09/29/2022, 12:58 PMproviderBranch
settings when working on merge request pipeline? Should it be the branch name of that MR?Marek Czerwiński
10/05/2022, 10:47 PMShan
10/06/2022, 9:35 PMpactbroker.providerBranch
and pactbroker.providerTags
?Shan
10/06/2022, 9:36 PMMitchell Cooper
10/11/2022, 1:48 PMLee Olsen
10/11/2022, 6:28 PMGustavs
10/13/2022, 11:28 AMKsawery Karwacki
10/18/2022, 1:16 PMJack Wheatley
10/18/2022, 3:19 PMDockerfile
for running pactfoundation/pact-broker
in Kubernetes? I’m a massive noob at this stuffAnkit Jain
10/19/2022, 10:43 AM~/Contract-Testing-POC/pact-consumer:~ $ npm run pact:publish
> pact-consumer@1.0.0 pact:publish
> pact-broker publish ./pacts --consumer-app-version='1.0.0' --auto-detect-version-properties --broker-base-url=<http://localhost:8000> --broker-username pact_workshop --broker-password pact_workshop
node:internal/modules/cjs/loader:988
throw err;
^
Error: Cannot find module '../src/pact-standalone'
Require stack:
- /Users/ankitjain/Contract-Testing-POC/pact-consumer/node_modules/.bin/pact-broker
at Module._resolveFilename (node:internal/modules/cjs/loader:985:15)
at Module._load (node:internal/modules/cjs/loader:833:27)
at Module.require (node:internal/modules/cjs/loader:1051:19)
at require (node:internal/modules/cjs/helpers:103:18)
at Object.<anonymous> (/Users/ankitjain/Contract-Testing-POC/pact-consumer/node_modules/.bin/pact-broker:7:43)
at Module._compile (node:internal/modules/cjs/loader:1149:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1203:10)
at Module.load (node:internal/modules/cjs/loader:1027:32)
at Module._load (node:internal/modules/cjs/loader:868:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/Users/ankitjain/Contract-Testing-POC/pact-consumer/node_modules/.bin/pact-broker'
]
}
Node.js v18.10.0
Ankit Jain
10/19/2022, 10:44 AMAnkit Jain
10/19/2022, 10:48 AMMatt (pactflow.io / pact-js / pact-go)
Basu Silviu
10/20/2022, 10:37 AM2022-10-20 10:02:31.347940 I [7:4360] pact-broker -- webhook_host_whitelist=["<http://jenkins.secretcompanyname.com|jenkins.secretcompanyname.com>", "<http://github.com|github.com>", "<http://secretcompanyname.slack.com|secretcompanyname.slack.com>"] source={:type=>:env, :key=>"PACT_BROKER_WEBHOOK_HOST_WHITELIST"}
Issue:
• Consumer:
◦ if I run it from Local machine (IntelliJ) -> Contract gets published to the broker ✅
◦ If I run it from Jenkins -> Contract also gets published to the broker ✅
• Provider
◦ if I run it from Local machine (IntelliJ) -> Result gets published to the broker ✅
◦ If I run it from Jenkins -> Result does NOT get published to the broker as the connection can't be established ❌
org.apache.http.conn.ConnectTimeoutException: Connect to my.secret.ip:9292 [/my.secret.ip] failed: Connection timed out
at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:157)
Any ideas as why only the provider can't connect to the Broker from Jenkins but the consumer can (from the same Jenkins) ?Tatiana
10/24/2022, 6:47 PMdocker run --rm \
-e PACT_BROKER_BASE_URL=<http://localhost:9292> \
pactfoundation/pact-cli:latest \
publish \
/Users/tatiana/projects/project_name/contract-tests/pacts \
--consumer-app-version fake-git-sha-for-demo-$(date +%s)
and I am getting the error:
Specified pact file '/Users/tatiana/projects/project_name/contract-tests/pacts' does not exist. This sometimes indicates one of the arguments has been specified with the wrong name and has been incorrectly identified as a file path.
So, my questions:
1. Where should I run the docker command from?
2. PACT_BROKER_USERNAME
and PACT_BROKER_PASSWORD
are mandatory or they can be ignored? I didn’t set up these env variables when I was running pactfoundation/pact-broker
image.
Please point a right direction for me 🙏matt few
11/02/2022, 6:07 PMJames P
11/07/2022, 11:31 AMTomasz
11/07/2022, 2:10 PM"[{\"max_age\": 15}, {\"max_age\": 30, \"branch\": \"main\"}]"
but as a result in broker logs I got: ERROR: each UNION query must have the same number of columns.
I used tags before and this selector worked fine, it looks like it stopped after changing to branches, any ideas what to do with it?James P
11/08/2022, 4:04 PMJames P
11/14/2022, 2:05 PM${pactbroker.consumerLabels}
, what is it referring to? There are details about tags but can’t see what the usecase is?Slackbot
11/14/2022, 11:44 PMRobert
11/15/2022, 1:21 PM200 parseerror
and in the response body there is the line that something changed, but underneath it's just empty lines
The following changes were made about 2 hours ago (Tue 15 Nov 2022, 11:15am +00:00)
Beth (pactflow.io/Pact Broker/pact-ruby)
Werner Lauterfeld
11/23/2022, 1:38 PMJoe Pullifrone
11/23/2022, 4:33 PMcan-i-deploy --pacticipant $(pactClientGatewayConsumerName) --version $(Build.SourceVersion) --ignore ClientSpendAuthority --broker-base-url $(pact-broker-url) --broker-token $(pact-publish-token) --to=prod