Basu Silviu
12/06/2022, 1:24 PMYousaf Nabi (pactflow.io)
--tag-with-git-branch
into the volume mount in docker.Yousaf Nabi (pactflow.io)
${PWD}
your directory with a .git
folder in it?
-v ${PWD}:${PWD}
Basu Silviu
12/06/2022, 1:31 PMYousaf Nabi (pactflow.io)
Basu Silviu
12/06/2022, 1:31 PMYousaf Nabi (pactflow.io)
Basu Silviu
12/06/2022, 1:31 PMYousaf Nabi (pactflow.io)
Basu Silviu
12/06/2022, 1:32 PMBasu Silviu
12/06/2022, 1:33 PMmyuser@myuser-laptop:~/workspace/pact-ruby-cli(master)$ pwd
/home/myuser/workspace/pact-ruby-cli
Yousaf Nabi (pactflow.io)
Basu Silviu
12/06/2022, 1:36 PMYousaf Nabi (pactflow.io)
docker pull pactfoundation/pact-cli:latest
user/pass shouldn't make a diff at allBasu Silviu
12/06/2022, 1:38 PMYousaf Nabi (pactflow.io)
Basu Silviu
12/06/2022, 1:38 PMYousaf Nabi (pactflow.io)
Basu Silviu
12/06/2022, 1:40 PMBasu Silviu
12/06/2022, 1:40 PMBasu Silviu
12/06/2022, 1:41 PMBasu Silviu
12/06/2022, 1:41 PMbundler: failed to load command: /pact/bin/pact (/pact/bin/pact)
/usr/lib/ruby/3.0.0/net/http.rb:987:in `initialize': execution expired (Net::OpenTimeout)
from /usr/lib/ruby/3.0.0/net/http.rb:987:in `open'
from /usr/lib/ruby/3.0.0/net/http.rb:987:in `block in connect'
from /usr/lib/ruby/3.0.0/timeout.rb:107:in `timeout'
from /usr/lib/ruby/3.0.0/net/http.rb:985:in `connect'
from /usr/lib/ruby/3.0.0/net/http.rb:970:in `do_start'
from /usr/lib/ruby/3.0.0/net/http.rb:959:in `start'
from /usr/lib/ruby/gems/3.0.0/gems/pact_broker-client-1.66.0/lib/pact_broker/client/hal/http_client.rb:79:in `block in perform_request'
from /usr/lib/ruby/gems/3.0.0/gems/pact_broker-client-1.66.0/lib/pact_broker/client/hal/http_client.rb:93:in `until_truthy_or_max_times'
from /usr/lib/ruby/gems/3.0.0/gems/pact_broker-client-1.66.0/lib/pact_broker/client/hal/http_client.rb:64:in `perform_request'
from /usr/lib/ruby/gems/3.0.0/gems/pact_broker-client-1.66.0/lib/pact_broker/client/hal/http_client.rb:35:in `post'
from /usr/lib/ruby/gems/3.0.0/gems/pact_broker-client-1.66.0/lib/pact_broker/client/hal/link.rb:57:in `post'
from /usr/lib/ruby/gems/3.0.0/gems/pact_broker-client-1.66.0/lib/pact_broker/client/publish_pacts.rb:61:in `block in publish_pacts'
from /usr/lib/ruby/gems/3.0.0/gems/rake-13.0.6/lib/rake/file_list.rb:70:in `collect'
from /usr/lib/ruby/gems/3.0.0/gems/rake-13.0.6/lib/rake/file_list.rb:70:in `collect'
from /usr/lib/ruby/gems/3.0.0/gems/pact_broker-client-1.66.0/lib/pact_broker/client/publish_pacts.rb:60:in `publish_pacts'
from /usr/lib/ruby/gems/3.0.0/gems/pact_broker-client-1.66.0/lib/pact_broker/client/publish_pacts.rb:33:in `call'
from /usr/lib/ruby/gems/3.0.0/gems/pact_broker-client-1.66.0/lib/pact_broker/client/publish_pacts.rb:15:in `call'
from /usr/lib/ruby/gems/3.0.0/gems/pact_broker-client-1.66.0/lib/pact_broker/client/cli/pact_commands.rb:66:in `publish_pacts'
from /usr/lib/ruby/gems/3.0.0/gems/pact_broker-client-1.66.0/lib/pact_broker/client/cli/pact_commands.rb:29:in `publish'
from /usr/lib/ruby/gems/3.0.0/gems/thor-1.2.1/lib/thor/command.rb:27:in `run'
from /usr/lib/ruby/gems/3.0.0/gems/thor-1.2.1/lib/thor/invocation.rb:127:in `invoke_command'
from /usr/lib/ruby/gems/3.0.0/gems/thor-1.2.1/lib/thor.rb:392:in `dispatch'
from /usr/lib/ruby/gems/3.0.0/gems/thor-1.2.1/lib/thor/base.rb:485:in `start'
from /usr/lib/ruby/gems/3.0.0/gems/pact_broker-client-1.66.0/lib/pact_broker/client/cli/custom_thor.rb:23:in `start'
from /pact/lib/pact/cli.rb:71:in `publish'
from /usr/lib/ruby/gems/3.0.0/gems/thor-1.2.1/lib/thor/command.rb:27:in `run'
from /usr/lib/ruby/gems/3.0.0/gems/thor-1.2.1/lib/thor/invocation.rb:127:in `invoke_command'
from /usr/lib/ruby/gems/3.0.0/gems/thor-1.2.1/lib/thor.rb:392:in `dispatch'
from /usr/lib/ruby/gems/3.0.0/gems/thor-1.2.1/lib/thor/base.rb:485:in `start'
from /pact/bin/pact:15:in `<top (required)>'
from /usr/lib/ruby/gems/3.0.0/gems/bundler-2.3.13/lib/bundler/cli/exec.rb:58:in `load'
from /usr/lib/ruby/gems/3.0.0/gems/bundler-2.3.13/lib/bundler/cli/exec.rb:58:in `kernel_load'
from /usr/lib/ruby/gems/3.0.0/gems/bundler-2.3.13/lib/bundler/cli/exec.rb:23:in `run'
from /usr/lib/ruby/gems/3.0.0/gems/bundler-2.3.13/lib/bundler/cli.rb:483:in `exec'
from /usr/lib/ruby/gems/3.0.0/gems/bundler-2.3.13/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
from /usr/lib/ruby/gems/3.0.0/gems/bundler-2.3.13/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
from /usr/lib/ruby/gems/3.0.0/gems/bundler-2.3.13/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
from /usr/lib/ruby/gems/3.0.0/gems/bundler-2.3.13/lib/bundler/cli.rb:31:in `dispatch'
from /usr/lib/ruby/gems/3.0.0/gems/bundler-2.3.13/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
from /usr/lib/ruby/gems/3.0.0/gems/bundler-2.3.13/lib/bundler/cli.rb:25:in `start'
from /usr/lib/ruby/gems/3.0.0/gems/bundler-2.3.13/exe/bundle:48:in `block in <top (required)>'
from /usr/lib/ruby/gems/3.0.0/gems/bundler-2.3.13/lib/bundler/friendly_errors.rb:103:in `with_friendly_errors'
from /usr/lib/ruby/gems/3.0.0/gems/bundler-2.3.13/exe/bundle:36:in `<top (required)>'
from /usr/bin/bundle:25:in `load'
from /usr/bin/bundle:25:in `<main>'
Yousaf Nabi (pactflow.io)
Slackbot
12/06/2022, 1:44 PMYousaf Nabi (pactflow.io)
Yousaf Nabi (pactflow.io)
Basu Silviu
12/06/2022, 1:45 PMBasu Silviu
12/06/2022, 1:45 PMYousaf Nabi (pactflow.io)
Yousaf Nabi (pactflow.io)
Yousaf Nabi (pactflow.io)
Basu Silviu
12/06/2022, 1:47 PMdocker run --rm -e PACT_BROKER_BASE_URL -e PACT_BROKER_USERNAME=pactuser -e PACT_BROKER_PASSWORD pactfoundation/pact-cli:latest pact-broker can-i-deploy --pacticipant ......
works wellBasu Silviu
12/06/2022, 1:48 PMBasu Silviu
12/06/2022, 4:38 PMcan-i-deploy
works fine against the same broker.Basu Silviu
12/06/2022, 4:39 PMBasu Silviu
12/06/2022, 4:59 PM/home/myuser/workspace/pact-ruby-cli # cat example/pacts/pact.json
so the problem is somhow... sending it from the cli to the brokerBasu Silviu
12/06/2022, 5:22 PMYousaf Nabi (pactflow.io)
Yousaf Nabi (pactflow.io)
Basu Silviu
12/06/2022, 9:26 PMBasu Silviu
12/06/2022, 9:32 PMpact-ruby-cli
project that I cloned a bit earlier) . The only change I did was to replace the following variables
• export PACT_BROKER_BASE_URL=...
• export PACT_BROKER_USERNAME=...
• export PACT_BROKER_PASSWORD=...
with the values that point to our broker.
When I run the publish command, I get the error.
If I set the variables PACT_BROKER_BASE_URL etc. back to your broker's values, the command will be successful again and the contract will be published in your brokerBasu Silviu
12/06/2022, 9:44 PMMatt (pactflow.io / pact-js / pact-go)
--verbose
flag to the command? That should print out additional HTTP level logs, so we can see what is trying to be sent and to whereBasu Silviu
12/07/2022, 10:42 AM--verbose
I do get some extra info:Basu Silviu
12/07/2022, 10:42 AM.................
from /usr/bin/bundle:25:in `<main>'
opening connection to 10.34.133.12:9292...
opened
<- "GET /? HTTP/1.1\r\nAccept-Encoding: gzip;q=1.0,deflate;q=0.6,identity;q=0.3\r\nAccept: application/hal+json\r\nUser-Agent: Ruby\r\nAuthorization: [redacted]\r\n"
-> "HTTP/1.1 200 OK\r\n"
-> "Vary: Accept\r\n"
-> "Content-Type: application/hal+json;charset=utf-8\r\n"
-> "Date: Wed, 07 Dec 2022 10:33:42 GMT\r\n"
-> "Server: Webmachine-Ruby/1.6.0 Rack/1.3\r\n"
-> "X-Pact-Broker-Version: 2.105.0\r\n"
-> "X-Content-Type-Options: nosniff\r\n"
-> "Content-Length: 4384\r\n"
-> "\r\n"
reading 4384 bytes...
-> "{\"_links\":{\"self\":{\"href\":\"<http://10.33.132.13:9292>\",\"title\":\"Index\",\"templated\":false},\"pb:publish-pact\":{\"href\":\"<http://10.33.132.13:9292/pacts/provider/{provider}/consumer/{consumer}/version/{consumerApplicationVersion}>\",\"title\":\"Publish a pact\",\"templated\":true},\"pb:publish-contracts\":{\"href\":\"<http://10.33.132.13:9292/contracts/publish>\",\"title\":\"Publish contracts\",\"templated\":false},\"pb:latest-pact-versions\":{\"href\":\"<http://10.33.132.13:9292/pacts/latest>\",\"title\":\"Latest pact versions\",\"templated\":false},\"pb:tagged-pact-versions\":{\"href\":\"<http://10.33.132.13:9292/pacts/provider/{provider}/consumer/{consumer}/tag/{tag}>\",\"title\":\"All versions of a pact for a given consumer, provider and consumer version tag\",\"templated\":false},\"pb:pacticipants\":{\"href\":\"<http://10.33.132.13:9292/pacticipants>\",\"title\":\"Pacticipants\",\"templated\":false},\"pb:pacticipant\":{\"href\":\"<http://10.33.132.13:9292/pacticipants/{pacticipant}>\",\"title\":\"Fetch pacticipant by name\",\"templated\":true},\"pb:latest-provider-pacts\":{\"href\":\"<http://10.33.132.13:9292/pacts/provider/{provider}/latest>\",\"title\":\"Latest pacts by provider\",\"templated\":true},\"pb:latest-provider-pacts-with-tag\":{\"href\":\"<http://10.33.132.13:9292/pacts/provider/{provider}/latest/{tag}>\",\"title\":\"Latest pacts for provider with the specified tag\",\"templated\":true},\"pb:provider-pacts-with-tag\":{\"href\":\"<http://10.33.132.13:9292/pacts/provider/{provider}/tag/{tag}>\",\"title\":\"All pact versions for the provider with the specified consumer version tag\",\"templated\":true},\"pb:provider-pacts\":{\"href\":\"<http://10.33.132.13:9292/pacts/provider/{provider}>\",\"title\":\"All pact versions for the specified provider\",\"templated\":true},\"pb:latest-version\":{\"href\":\"<http://10.33.132.13:9292/pacticipants/{pacticipant}/latest-version>\",\"title\":\"Latest pacticipant version\",\"templated\":true},\"pb:latest-tagged-version\":{\"href\":\"<http://10.33.132.13:9292/pacticipants/{pacticipant}/latest-version/{tag}>\",\"title\":\"Latest pacticipant version with the specified tag\",\"templated\":true},\"pb:webhooks\":{\"href\":\"<http://10.33.132.13:9292/webhooks>\",\"title\":\"Webhooks\",\"templated\":false},\"pb:webhook\":{\"href\":\"<http://10.33.132.13:9292/webhooks/{uuid}>\",\"title\":\"Webhook\",\"templated\":true},\"pb:integrations\":{\"href\":\"<http://10.33.132.13:9292/integrations>\",\"title\":\"Integrations\",\"templated\":false},\"pb:pacticipant-version-tag\":{\"href\":\"<http://10.33.132.13:9292/pacticipants/{pacticipant}/versions/{version}/tags>"
-> "/{tag}\",\"title\":\"Get, create or delete a tag for a pacticipant version\",\"templated\":true},\"pb:pacticipant-branch-version\":{\"href\":\"<http://10.33.132.13:9292/pacticipants/{pacticipant}/branches/{branch}/versions/{version}>\",\"title\":\"Get or add/create a pacticipant version for a branch\",\"templated\":true},\"pb:pacticipant-version\":{\"href\":\"<http://10.33.132.13:9292/pacticipants/{pacticipant}/versions/{version}>\",\"title\":\"Get, create or delete a pacticipant version\",\"templated\":true},\"pb:metrics\":{\"href\":\"<http://10.33.132.13:9292/metrics>\",\"title\":\"Get Pact Broker metrics\"},\"pb:can-i-deploy-pacticipant-version-to-tag\":{\"href\":\"<http://10.33.132.13:9292/can-i-deploy?pacticipant={pacticipant}&version={version}&to={tag}>\",\"title\":\"Determine if an application version can be safely deployed to an environment identified by the given tag\",\"templated\":true},\"pb:can-i-deploy-pacticipant-version-to-environment\":{\"href\":\"<http://10.33.132.13:9292/can-i-deploy?pacticipant={pacticipant}&version={version}&environment={environment}>\",\"title\":\"Determine if an application version can be safely deployed to an environment\",\"templated\":true},\"pb:provider-pacts-for-verification\":{\"href\":\"<http://10.33.132.13:9292/pacts/provider/{provider}/for-verification>\",\"title\":\"Pact versions to be verified for the specified provider\",\"templated\":true},\"beta:provider-pacts-for-verification\":{\"name\":\"beta\",\"href\":\"<http://10.33.132.13:9292/pacts/provider/{provider}/for-verification>\",\"title\":\"DEPRECATED - please use pb:provider-pacts-for-verification\",\"templated\":true},\"curies\":[{\"name\":\"pb\",\"href\":\"<http://10.33.132.13:9292/doc/{rel}?context=index>\",\"templated\":true},{\"name\":\"beta\",\"href\":\"<http://10.33.132.13:9292/doc/{rel}?context=index>\",\"templated\":true}],\"pb:environments\":{\"title\":\"Environments\",\"href\":\"<http://10.33.132.13:9292/environments>\",\"templated\":false},\"pb:environment\":{\"title\":\"Environment\",\"href\":\"<http://10.33.132.13:9292/environments/{uuid}>\",\"templated\":true}}}"
read 4384 bytes
Conn keep-alive
opening connection to 10.33.132.13:9292...
Matt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Basu Silviu
12/07/2022, 10:58 AMBasu Silviu
12/07/2022, 10:58 AMBasu Silviu
12/07/2022, 10:58 AMBasu Silviu
12/07/2022, 10:59 AMdocker run --rm -w ${PWD} -v ${PWD}:${PWD} -e PACT_BROKER_BASE_URL -e PACT_BROKER_USERNAME -e PACT_BROKER_PASSWORD pactfoundation/pact-cli:latest publish ${PWD}/example/pacts --consumer-app-version fake-git-sha-for-demo-$(date +%s) --tag-with-git-branch --verbose
bundler: failed to load command: /pact/bin/pact (/pact/bin/pact)
/usr/lib/ruby/3.0.0/net/http.rb:987:in `initialize': execution expired (Net::OpenTimeout)
from /usr/lib/ruby/3.0.0/net/http.rb:987:in `open'
from /usr/lib/ruby/3.0.0/net/http.rb:987:in `block in connect'
from /usr/lib/ruby/3.0.0/timeout.rb:107:in `timeout'
from /usr/lib/ruby/3.0.0/net/http.rb:985:in `connect'
from /usr/lib/ruby/3.0.0/net/http.rb:970:in `do_start'
from /usr/lib/ruby/3.0.0/net/http.rb:959:in `start'
from /usr/lib/ruby/gems/3.0.0/gems/pact_broker-client-1.66.0/lib/pact_broker/client/hal/http_client.rb:79:in `block in perform_request'
from /usr/lib/ruby/gems/3.0.0/gems/pact_broker-client-1.66.0/lib/pact_broker/client/hal/http_client.rb:93:in `until_truthy_or_max_times'
from /usr/lib/ruby/gems/3.0.0/gems/pact_broker-client-1.66.0/lib/pact_broker/client/hal/http_client.rb:64:in `perform_request'
from /usr/lib/ruby/gems/3.0.0/gems/pact_broker-client-1.66.0/lib/pact_broker/client/hal/http_client.rb:35:in `post'
from /usr/lib/ruby/gems/3.0.0/gems/pact_broker-client-1.66.0/lib/pact_broker/client/hal/link.rb:57:in `post'
from /usr/lib/ruby/gems/3.0.0/gems/pact_broker-client-1.66.0/lib/pact_broker/client/publish_pacts.rb:61:in `block in publish_pacts'
from /usr/lib/ruby/gems/3.0.0/gems/rake-13.0.6/lib/rake/file_list.rb:70:in `collect'
from /usr/lib/ruby/gems/3.0.0/gems/rake-13.0.6/lib/rake/file_list.rb:70:in `collect'
from /usr/lib/ruby/gems/3.0.0/gems/pact_broker-client-1.66.0/lib/pact_broker/client/publish_pacts.rb:60:in `publish_pacts'
from /usr/lib/ruby/gems/3.0.0/gems/pact_broker-client-1.66.0/lib/pact_broker/client/publish_pacts.rb:33:in `call'
from /usr/lib/ruby/gems/3.0.0/gems/pact_broker-client-1.66.0/lib/pact_broker/client/publish_pacts.rb:15:in `call'
from /usr/lib/ruby/gems/3.0.0/gems/pact_broker-client-1.66.0/lib/pact_broker/client/cli/pact_commands.rb:66:in `publish_pacts'
from /usr/lib/ruby/gems/3.0.0/gems/pact_broker-client-1.66.0/lib/pact_broker/client/cli/pact_commands.rb:29:in `publish'
from /usr/lib/ruby/gems/3.0.0/gems/thor-1.2.1/lib/thor/command.rb:27:in `run'
from /usr/lib/ruby/gems/3.0.0/gems/thor-1.2.1/lib/thor/invocation.rb:127:in `invoke_command'
from /usr/lib/ruby/gems/3.0.0/gems/thor-1.2.1/lib/thor.rb:392:in `dispatch'
from /usr/lib/ruby/gems/3.0.0/gems/thor-1.2.1/lib/thor/base.rb:485:in `start'
from /usr/lib/ruby/gems/3.0.0/gems/pact_broker-client-1.66.0/lib/pact_broker/client/cli/custom_thor.rb:23:in `start'
from /pact/lib/pact/cli.rb:71:in `publish'
from /usr/lib/ruby/gems/3.0.0/gems/thor-1.2.1/lib/thor/command.rb:27:in `run'
from /usr/lib/ruby/gems/3.0.0/gems/thor-1.2.1/lib/thor/invocation.rb:127:in `invoke_command'
from /usr/lib/ruby/gems/3.0.0/gems/thor-1.2.1/lib/thor.rb:392:in `dispatch'
from /usr/lib/ruby/gems/3.0.0/gems/thor-1.2.1/lib/thor/base.rb:485:in `start'
from /pact/bin/pact:15:in `<top (required)>'
from /usr/lib/ruby/gems/3.0.0/gems/bundler-2.3.13/lib/bundler/cli/exec.rb:58:in `load'
from /usr/lib/ruby/gems/3.0.0/gems/bundler-2.3.13/lib/bundler/cli/exec.rb:58:in `kernel_load'
from /usr/lib/ruby/gems/3.0.0/gems/bundler-2.3.13/lib/bundler/cli/exec.rb:23:in `run'
from /usr/lib/ruby/gems/3.0.0/gems/bundler-2.3.13/lib/bundler/cli.rb:483:in `exec'
from /usr/lib/ruby/gems/3.0.0/gems/bundler-2.3.13/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
from /usr/lib/ruby/gems/3.0.0/gems/bundler-2.3.13/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
from /usr/lib/ruby/gems/3.0.0/gems/bundler-2.3.13/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
from /usr/lib/ruby/gems/3.0.0/gems/bundler-2.3.13/lib/bundler/cli.rb:31:in `dispatch'
from /usr/lib/ruby/gems/3.0.0/gems/bundler-2.3.13/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
from /usr/lib/ruby/gems/3.0.0/gems/bundler-2.3.13/lib/bundler/cli.rb:25:in `start'
from /usr/lib/ruby/gems/3.0.0/gems/bundler-2.3.13/exe/bundle:48:in `block in <top (required)>'
from /usr/lib/ruby/gems/3.0.0/gems/bundler-2.3.13/lib/bundler/friendly_errors.rb:103:in `with_friendly_errors'
from /usr/lib/ruby/gems/3.0.0/gems/bundler-2.3.13/exe/bundle:36:in `<top (required)>'
from /usr/bin/bundle:25:in `load'
from /usr/bin/bundle:25:in `<main>'
opening connection to 10.34.133.12:9292...
opened
<- "GET /? HTTP/1.1\r\nAccept-Encoding: gzip;q=1.0,deflate;q=0.6,identity;q=0.3\r\nAccept: application/hal+json\r\nUser-Agent: Ruby\r\nAuthorization: [redacted]\r\n"
-> "HTTP/1.1 200 OK\r\n"
-> "Vary: Accept\r\n"
-> "Content-Type: application/hal+json;charset=utf-8\r\n"
-> "Date: Wed, 07 Dec 2022 10:33:42 GMT\r\n"
-> "Server: Webmachine-Ruby/1.6.0 Rack/1.3\r\n"
-> "X-Pact-Broker-Version: 2.105.0\r\n"
-> "X-Content-Type-Options: nosniff\r\n"
-> "Content-Length: 4384\r\n"
-> "\r\n"
reading 4384 bytes...
-> "{\"_links\":{\"self\":{\"href\":\"<http://10.34.133.12:9292>\",\"title\":\"Index\",\"templated\":false},\"pb:publish-pact\":{\"href\":\"<http://10.34.133.12:9292/pacts/provider/{provider}/consumer/{consumer}/version/{consumerApplicationVersion}>\",\"title\":\"Publish a pact\",\"templated\":true},\"pb:publish-contracts\":{\"href\":\"<http://10.34.133.12:9292/contracts/publish>\",\"title\":\"Publish contracts\",\"templated\":false},\"pb:latest-pact-versions\":{\"href\":\"<http://10.34.133.12:9292/pacts/latest>\",\"title\":\"Latest pact versions\",\"templated\":false},\"pb:tagged-pact-versions\":{\"href\":\"<http://10.34.133.12:9292/pacts/provider/{provider}/consumer/{consumer}/tag/{tag}>\",\"title\":\"All versions of a pact for a given consumer, provider and consumer version tag\",\"templated\":false},\"pb:pacticipants\":{\"href\":\"<http://10.34.133.12:9292/pacticipants>\",\"title\":\"Pacticipants\",\"templated\":false},\"pb:pacticipant\":{\"href\":\"<http://10.34.133.12:9292/pacticipants/{pacticipant}>\",\"title\":\"Fetch pacticipant by name\",\"templated\":true},\"pb:latest-provider-pacts\":{\"href\":\"<http://10.34.133.12:9292/pacts/provider/{provider}/latest>\",\"title\":\"Latest pacts by provider\",\"templated\":true},\"pb:latest-provider-pacts-with-tag\":{\"href\":\"<http://10.34.133.12:9292/pacts/provider/{provider}/latest/{tag}>\",\"title\":\"Latest pacts for provider with the specified tag\",\"templated\":true},\"pb:provider-pacts-with-tag\":{\"href\":\"<http://10.34.133.12:9292/pacts/provider/{provider}/tag/{tag}>\",\"title\":\"All pact versions for the provider with the specified consumer version tag\",\"templated\":true},\"pb:provider-pacts\":{\"href\":\"<http://10.34.133.12:9292/pacts/provider/{provider}>\",\"title\":\"All pact versions for the specified provider\",\"templated\":true},\"pb:latest-version\":{\"href\":\"<http://10.34.133.12:9292/pacticipants/{pacticipant}/latest-version>\",\"title\":\"Latest pacticipant version\",\"templated\":true},\"pb:latest-tagged-version\":{\"href\":\"<http://10.34.133.12:9292/pacticipants/{pacticipant}/latest-version/{tag}>\",\"title\":\"Latest pacticipant version with the specified tag\",\"templated\":true},\"pb:webhooks\":{\"href\":\"<http://10.34.133.12:9292/webhooks>\",\"title\":\"Webhooks\",\"templated\":false},\"pb:webhook\":{\"href\":\"<http://10.34.133.12:9292/webhooks/{uuid}>\",\"title\":\"Webhook\",\"templated\":true},\"pb:integrations\":{\"href\":\"<http://10.34.133.12:9292/integrations>\",\"title\":\"Integrations\",\"templated\":false},\"pb:pacticipant-version-tag\":{\"href\":\"<http://10.34.133.12:9292/pacticipants/{pacticipant}/versions/{version}/tags>"
-> "/{tag}\",\"title\":\"Get, create or delete a tag for a pacticipant version\",\"templated\":true},\"pb:pacticipant-branch-version\":{\"href\":\"<http://10.34.133.12:9292/pacticipants/{pacticipant}/branches/{branch}/versions/{version}>\",\"title\":\"Get or add/create a pacticipant version for a branch\",\"templated\":true},\"pb:pacticipant-version\":{\"href\":\"<http://10.34.133.12:9292/pacticipants/{pacticipant}/versions/{version}>\",\"title\":\"Get, create or delete a pacticipant version\",\"templated\":true},\"pb:metrics\":{\"href\":\"<http://10.34.133.12:9292/metrics>\",\"title\":\"Get Pact Broker metrics\"},\"pb:can-i-deploy-pacticipant-version-to-tag\":{\"href\":\"<http://10.34.133.12:9292/can-i-deploy?pacticipant={pacticipant}&version={version}&to={tag}>\",\"title\":\"Determine if an application version can be safely deployed to an environment identified by the given tag\",\"templated\":true},\"pb:can-i-deploy-pacticipant-version-to-environment\":{\"href\":\"<http://10.34.133.12:9292/can-i-deploy?pacticipant={pacticipant}&version={version}&environment={environment}>\",\"title\":\"Determine if an application version can be safely deployed to an environment\",\"templated\":true},\"pb:provider-pacts-for-verification\":{\"href\":\"<http://10.34.133.12:9292/pacts/provider/{provider}/for-verification>\",\"title\":\"Pact versions to be verified for the specified provider\",\"templated\":true},\"beta:provider-pacts-for-verification\":{\"name\":\"beta\",\"href\":\"<http://10.34.133.12:9292/pacts/provider/{provider}/for-verification>\",\"title\":\"DEPRECATED - please use pb:provider-pacts-for-verification\",\"templated\":true},\"curies\":[{\"name\":\"pb\",\"href\":\"<http://10.34.133.12:9292/doc/{rel}?context=index>\",\"templated\":true},{\"name\":\"beta\",\"href\":\"<http://10.34.133.12:9292/doc/{rel}?context=index>\",\"templated\":true}],\"pb:environments\":{\"title\":\"Environments\",\"href\":\"<http://10.34.133.12:9292/environments>\",\"templated\":false},\"pb:environment\":{\"title\":\"Environment\",\"href\":\"<http://10.34.133.12:9292/environments/{uuid}>\",\"templated\":true}}}"
read 4384 bytes
Conn keep-alive
opening connection to 10.34.133.12:9292...
Basu Silviu
12/07/2022, 10:59 AMMatt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Basu Silviu
12/07/2022, 11:02 AMBasu Silviu
12/07/2022, 5:03 PMdocker logs -f pact-broker
and also looked at EC2's system log.Basu Silviu
12/07/2022, 5:04 PMBasu Silviu
12/07/2022, 5:05 PMBasu Silviu
12/08/2022, 10:38 AMBasu Silviu
12/10/2022, 11:45 PM~/Downloads/pact-1.91.0-linux-x86_64/pact/bin/pact-broker publish /home/user/workspace/pact-ruby-cli/example/pacts/ -b <http://10.34.133.12:9292> -u myPactUser -p 'myPassword' -a fake-git-sha-for-demo-$(date +%s) -g -v
Any chance you can make the docker command work as well? - as it will be quite hard to get all the members in all the teams to download the standalone plus keeping it updated to the latest version whenever a new version comes out.
To have all in one place, the docker command that fails (for which only the first request goes through):
docker run -w ${PWD} -v ${PWD}:${PWD} -e PACT_BROKER_BASE_URL -e PACT_BROKER_USERNAME -e PACT_BROKER_PASSWORD pactfoundation/pact-cli:latest publish ${PWD}/example/pacts/ --consumer-app-version fake-git-sha-for-demo-$(date +%s) --tag-with-git-branch --verbose
Thank you,Matt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Basu Silviu
12/18/2022, 11:54 PMMatt (pactflow.io / pact-js / pact-go)
Basu Silviu
12/19/2022, 12:10 AMMatt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Basu Silviu
01/09/2023, 3:44 PMBut
: it works if the docker command (same command / same docker version / same VPN etc.) runs from a Mac.
Tested on 3 Ubuntu's in different corners of the world, and on 3 Macs also in different countries.
So from Ubuntu 20.04.5 LTS it doesn't work but from macOS Monterey v 12.6. it works.
Could it be something specific to Ubuntu ?