Publishing to Pact Broker (pact-jvm)

725 views
Skip to first unread message

Ruairí O'Brien

unread,
May 18, 2015, 11:00:18 AM5/18/15
to pact-s...@googlegroups.com
Hello,

I've been working with this example here:
https://github.com/mstine/microservices-pact

So I am using Spring Boot with pact-jvm.

I've also deployed a pact broker using the Docker container:
https://registry.hub.docker.com/u/dius/pact_broker/

All good so far but I'm wondering if I can publish a pact file to the broker as part of a build using the framework?

I mean, I was able to PUT the file myself and could script that easily enough but am wondering if I am missing something that exists already to do that? I don't really know ruby but I looked through that client code and could see a way to configure the broker URL but I don't see the same in the jvm & gradle side of things.

It would be handy if something exists that I can call as a gradle task but if it is standard just to write your own publish step that's fine too. Just wanted to check here as I couldn't find anything about it elsewhere.

My apologies if this is some obvious thing that I've simply missed. I really appreciate any assistance.

Kind Regards,
Ruairi

Bethany Skurrie

unread,
May 18, 2015, 6:23:10 PM5/18/15
to Ruairí O'Brien, pact-s...@googlegroups.com
Hi Ruairi,

To my knowledge, nothing exists for the JVM yet. If you would like to make an open source contribution, that would be fantastic. Ron would probably have some thoughts as to what the best tool set to use would be?

Beth


--
You received this message because you are subscribed to the Google Groups "Pact" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pact-support...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Bethany Skurrie
Software Developer

DiUS Computing Pty. Ltd.
where ideas are engineered

Phone: +61 3 9008 5400
Mobile: +61 415 413 713

www.dius.com.au

This email is intended solely for the use of the addressee and may contain information that is confidential or privileged. If you receive this email in error please notify the sender and delete the email immediately.

Ronald Holshausen

unread,
May 18, 2015, 7:59:49 PM5/18/15
to Bethany Skurrie, Ruairí O'Brien, pact-s...@googlegroups.com
Hi Ruairi,

That would a great feature and should not be too difficult to implement. Can you raise an issue against the pact-jvm project?

Regards,

Ronald

Ronald Holshausen

DiUS Computing Pty Ltd

Level 10, 99 Queens Street
Melbourne, VIC 3000

Ruairí O'Brien

unread,
May 20, 2015, 4:28:43 AM5/20/15
to pact-s...@googlegroups.com, ruairi...@gmail.com, bsku...@dius.com.au
Hi Bethany and Ronald,

Thank you very much for you reply.

I opened an issue on Github: https://github.com/DiUS/pact-jvm/issues/120

I'd be happy to have a look at it of course although as I mention in the issue, my first attempt at it was a gradle plugin. A more generic solution may be better though I am not sure yet how that would work.

Kind Regards,
Ruairi

Ronald Holshausen

unread,
May 20, 2015, 5:23:12 AM5/20/15
to Ruairí O'Brien, pact-s...@googlegroups.com, Bethany Skurrie
Thanks for raising the issue. I would have implemented a gradle plugin as well. And then port it to the maven plugin.

But I'll have a think on how to best integrate that into the main test runners.

Bethany Skurrie

unread,
May 20, 2015, 6:07:56 PM5/20/15
to Ronald Holshausen, Ruairí O'Brien, pact-s...@googlegroups.com
I think it should be a separate task, not run as part of the tests - it should only be called from the CI build, not a local machine, in the "publish artifact" stage, not the "run test stage".

Ruairi O'Brien

unread,
May 20, 2015, 7:07:32 PM5/20/15
to Bethany Skurrie, Ronald Holshausen, pact-s...@googlegroups.com
I agree. 

I was trying to imagine a something that could be used by any jvm based build plugin so could work with gradle, maven and if I was working with another language like clojure I could easily plug in to something like leiningen for example. I'm probably overthinking things though.

I am working on a gradle plugin anyway for my own use that will be used in a CI build and will be happy to share that once I get a better understanding of the existing code base to get what I have integrated and in a good enough state for review. 

If ye guys get something done before that, that’s totally understandable. 

Thanks for responding by the way. It’s great to get communication like this.

Georg Meyer

unread,
Jul 24, 2015, 9:28:40 AM7/24/15
to Pact, bsku...@dius.com.au, rhols...@dius.com.au, ruairi...@gmail.com
FYI: 
I implemented uploading & downloading from/to a PactBroker within the existing maven plugin:
Reply all
Reply to author
Forward
0 new messages