www-builds mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joan Touzet <woh...@apache.org>
Subject Re: Building with docker - Best practices
Date Tue, 14 Nov 2017 17:37:29 GMT
Hi Thomas,

I can't speak to anything maven related, but on 1), you might want to
look at leveraging the new Pipeline syntax, and especially the
Declarative Pipeline syntax. This lets you have a Jenkinsfile right in
your repo that contains the entire configuration for Jenkins. Keeping
your CI configuration under version control has fantastic benefits that
should be immediately obvious to anyone who's had Jenkins log them out
while updating a job configuration through the web interface. ;) Also,
you can leverage the Multibranch Pipeline job type in Jenkins which lets
you build on one, many, or all branches in a repo when they change -
very powerful. We use this to great effect for CouchDB to build on our
release branches across 11 different Erlang/OS combinations in parallel,
then a final step to push snapshot packages to our VM for internal dev
team use.

On 3) see my comments here: 

https://lists.apache.org/thread.html/b765b2d7f15c2cc68a70f4146d7ba08753d32e4da28130dcc5e4051e@%3Cbuilds.apache.org%3E

As well as here:

https://lists.apache.org/thread.html/c240e9bce761ef25ce8a594a29cc26628f97d9546e14a9fa30066896@%3Cbuilds.apache.org%3E

I'm still of the opinion this is an overly conservative policy
standpoint, but I'm complying until such time as the policy is changed.
If enough of us disagree, perhaps we can petition to change the policy
together?

-Joan
----- Original Message -----
From: "Thomas Bouron" <tbouron@apache.org>
To: builds@apache.org
Sent: Tuesday, 14 November, 2017 12:17:50 PM
Subject: Building with docker - Best practices

Hi.

Based on suggestions on this thread[1], I started to look at how to build everything in our
project with docker. This was surprisingly straight forward but I have some remaining questions.
I figured I was not the only one and it might help people in the future so, here we go:

1. In Jenkins, rather than using a maven type job, I'm using a freestyle type job to call
`docker run .... ` during the build phase. Is it the right way to go?
2. My docker images are based on `maven:alpine` with few extra bits and bobs on top. All is
working fine but, how do I configure jenkins to push built artifacts (SNAPSHOT) on Apache
maven repo? I'm sure other projects do that but couldn't figure it out so far.
3. Each git submodule requiring a custom docker image will have their own `Dockerfile` at
the root. I was planning to create an extra jenkins job to build and publish those images
to docker hub. Does Apache has an official account and if yes, should we use that? Otherwise,
I'll create an account for our project only and share the credential with our PMCs.

Best.

[1] https://lists.apache.org/thread.html/204d803d92e12f566323881b8e617164a29edc4790b20d361f73dd36@%3Cbuilds.apache.org%3E

Mime
View raw message