Hey! I have a docker container than I'm using as a...
# pact-broker
j
Hey! I have a docker container than I'm using as a jenkins agent which I'd like to run the pact cli in order to tag pacts in our pact broker. When I tried installing the pact-cli ruby standalone to the docker container, I see that
pact-publish --help
returns:
Copy code
ERROR: The `pact-publish` command has been moved to `pact-broker publish`. We apologise for any inconvenience caused.
but
pact-broker publish --help
now returns:
Copy code
/pact/lib/vendor/ruby/2.2.0/gems/pact_broker-client-1.61.0/lib/pact_broker/client/cli/broker.rb:8:in `require': /pact/lib/vendor/ruby/2.2.0/gems/pact_broker-client-1.61.0/lib/pact_broker/client/cli/version_commands.rb:51: syntax error, unexpected '.' (SyntaxError)
                branch_name: options.branch&.strip,
                                             ^
/pact/lib/vendor/ruby/2.2.0/gems/pact_broker-client-1.61.0/lib/pact_broker/client/cli/version_commands.rb:52: syntax error, unexpected '.'
                tags: options.tag&.collect(&:strip)
                                   ^
/pact/lib/vendor/ruby/2.2.0/gems/pact_broker-client-1.61.0/lib/pact_broker/client/cli/version_commands.rb:53: syntax error, unexpected '}', expecting keyword_end
        from /pact/lib/vendor/ruby/2.2.0/gems/pact_broker-client-1.61.0/lib/pact_broker/client/cli/broker.rb:8:in `<top (required)>'
        from /pact/lib/app/pact-broker.rb:1:in `require'
        from /pact/lib/app/pact-broker.rb:1:in `<main>'
So it seems to me like maybe this standalone cli is not maintained or something? Can anyone suggest an alternative?
y
Hey @json This was reported earlier today, https://github.com/pact-foundation/pact-ruby-standalone/issues/72 you could downgrade to pact-1.88.83 and you should get sorted, and we will address this address you raised asap.
Apologies for the inconvenience!
j
Excellent! Thank you, the fix worked for me too.
Another question though: how would I go about adding a new tag to an existing contract in the pact broker? The
pact-broker publish
command doesn't look right because it seems to expect you to upload a new contract when you call it.
y
j
omg, I swear that wasn't there a minute ago, haha. I even did a ctrl+f on that help for the word "tag" and somehow skipped over that one. Thank you!
y
my eyes trick me all the time heh, hope that helps dude!
👍 1