gradle concourse docker

138 views
Skip to first unread message

Gadi Eichhorn

unread,
Jun 14, 2017, 5:12:19 AM6/14/17
to vert.x
Hi all,

I started working on this mini project to try and create a CI for vertx using concourse.ci .

Using gradle I am not able to move the fat jar to where the docker build can see it and include it in the build. Seemed that gradle doesn't allow you to specify the artifact location in the build commands (you can specify source and cache).

anyone has experience with concourse gradle and docker  (java too)?



thanks,
G.

Alexander Lehmann

unread,
Jun 15, 2017, 1:04:45 PM6/15/17
to vert.x
I think you have to define the build/lib dir as output in the gradle step and then as input in the docker step.

Since the different tasks are executed in individual docker containers, you cannot reach the file system of the docker image from the gradle image.

Gadi Eichhorn

unread,
Jun 17, 2017, 4:23:04 AM6/17/17
to vert.x
I tried that, you have input and output options in concourse but gradle doesn't have the build output folder path as option on the cli and you are not allowed to write into the input folder (the root folder path i.e. source)

I put the two tasks on the same job so I believe this will allow me to use the output *.jar from the first one into the next one (gradle -> docker). 

The alternative is to upload the artifacts to S3 (or similar) but if I cannot access the artifacts from the first task I don't see how I can do this...

Thanks,
G.

Alexander Lehmann

unread,
Jun 17, 2017, 1:54:52 PM6/17/17
to vert.x
You can copy the source/build/lib directory to build/lib at the end of the gradle.sh

https://github.com/alexlehm/vertx-concourse-gradle/blob/master/ci/gradle.sh

then the jars will should up in build/lib in the next task
Reply all
Reply to author
Forward
0 new messages