[keycloak-dev] need feedback on integrating golang with testsuite and distro

Bill Burke bburke at redhat.com
Mon Mar 26 09:51:07 EDT 2018


On Wed, Mar 21, 2018 at 9:52 AM, Stian Thorgersen <sthorger at redhat.com> wrote:
>
>
> On 20 March 2018 at 22:29, Bill Burke <bburke at redhat.com> wrote:
>>
>> I have a golang client utility (kcinit) that I need to integrate with
>> tests in our testsuite.  Its possible to integrate golang with maven
>> using this maven plugin:
>>
>> https://github.com/raydac/mvn-golang
>>
>> To integrate my tool into the arquillian testsuite, I've pulled in
>> this plugin to pull down and build my golang tool so that it can be
>> executed within a test.  The way it works is that the maven plugin
>> will first download the Golang SDK and store it within ~/.mvnGolang.
>> It will also store any source code it pulls down and builds there.  It
>> will build a binary that is specific to the platform it is running on
>> so this is perfect for our testsuite.
>>
>> Sound ok?
>
>
> That works. Would it be best to have a profile for it though? Rather than
> having it run every time developers build and test we can add a CI job for
> it that would be ran on PRs. That way it's always tested on PRs, but you
> don't have to pay the price locally if you haven't touched kinit at all.
>

its not that bad (an extra 10 secs on my network).  If somebody
complains I'll change it?

>>
>>
>> Next question is distribution.  "kcinit" is a command line utility.
>> Should I add this to our current client tools directory in the disto
>> or create a separate dis zipt?  Ok to include binaries for linux, osx,
>> and windows?  This will require the maven plugin to individually
>> cross-compile for each platform.  Its not superfast and our distro
>> build will be slower, but we will have one place to pull this stuff
>> together.  I will need to eventually create an RPM for this tool so
>> that it can be automatically installed in Fedora/RHEL.
>
>
> I'd go with a separate dist. It's a client tool and having to download and
> extract it from the large server zip would be annoying.
>

Don't really need a dist, per se, just need to build the binaries for
common platforms (osx x86, linux x86, and windows x86).

Is publishing downloads to community website automated?  Will want a
separate download for each platform binary.

> Maybe it would be best to have a separate profile here as well? Something
> like distribution-cli. It can be disabled by default, but enabled when we do
> releases. I know quite a lot of folks regularly builds the server dist while
> doing development, myself included.
>

Yes, should definitely do this.  cross-platform builds take awhile.

> For Keycloak we can definitively include binaries for all. Can the Maven
> plugin build all binaries on Linux? Or do you need to build it on the
> individual platforms? If the latter then we have a biggish problem to figure
> out when releasing Keycloak.
>

Golang and the maven plugin can build all platform targets on any OS.


-- 
Bill Burke
Red Hat


More information about the keycloak-dev mailing list