help constructing a Jenkinsfile for Docker builds

8 views
Skip to first unread message

bruce....@egi.eu

unread,
Sep 11, 2018, 4:07:38 AM9/11/18
to Jenkins Users
Hi all, this is my first time coming to Jenkins pipeline builds from a long history of matrix builds in freestyle jobs. I am very confused by how Jenkins is interpreting my Jenkinsfile, and would appreciate some help. I am prepared to accept that I need to learn Groovy, and that perhaps the declarative format may not be able to do what I need, but I want to at least understand :)

Let me start with what I need:
I have several applications, of different versions, and different dependency versions which need to be built in different environments. I have constructed these environments using Docker containers. In matrix builds, I construct a matrix of environment variables - vectors of [OS, ARCH, NAME, VERSION, SITE] and use those to deploy docker containers in which to build. So far, so good. I need Jenkins to check out the code, then parallelise the workflow into each of (os,arch,name,version,site) combination. IE, provision the relevant container, put an agent on it, then send the work there.

The thing I can't seem to understand is why Jenkins schedules the agents _inside_ docker containers instead of provisioning docker containers and then passing the builds off to them. The error I'm seeing is e.g. in this run : https://ci.sagrid.ac.za/blue/organizations/jenkins/gmp-pipeline/detail/master/41/pipeline


Any guidance would be greatly appreciated.
Bruce
Reply all
Reply to author
Forward
0 new messages