Commit 935b46d6 authored by Guillaume Tucker's avatar Guillaume Tucker

initial commit: Jenkinsfile and Dockerfile

Add a Dockerfile to define an x86 Debian Stretch Docker image suitable
to build a Linux kernel for x86_64, arm64 and armhf.  This image can
also be used by a Jenkins job to automatically build and publish
kernel binaries.

Add a Jenkinsfile to create this Docker image in a Jenkins job.
Signed-off-by: Guillaume Tucker's avatarGuillaume Tucker <>
#!/usr/bin/env groovy
Copyright (C) 2017, 2018 Collabora Limited
Author: Guillaume Tucker <>
This module is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free
Software Foundation; either version 2.1 of the License, or (at your option)
any later version.
This library is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
/* Note: docker_image.inside() needs to be called after dir(some_directory)
* otherwise it fails and stays at the root of the workspace. */
def REGISTRY = ""
def REGISTRY_CREDENTIALS = "ccu-docker-collabora-com"
def IMAGE_NAME = "linux-kernel"
node("docker-slave") {
docker.withRegistry("https://${REGISTRY}", REGISTRY_CREDENTIALS) {
def docker_image = null
def checkout = env.WORKSPACE + "/checkout"
stage("job checkout") {
dir(checkout) {
git(url: env.gitlabSourceRepoHttpUrl,
branch: env.gitlabBranch,
poll: false)
stage("build") {
dir(checkout) {
docker_image =
stage("push") {
FROM debian:stretch-slim
ARG DEBIAN_FRONTEND=noninteractive
# Docker for Jenkins really needs procps otherwise the Jenkins side fails
RUN apt-get update && apt-get install --no-install-recommends -y procps
# Set HOME to a writable directory in case something wants to cache things
# (e.g. obs)
# Kernel build-depends
RUN apt-get update && apt-get install --no-install-recommends -y \
build-essential \
debhelper \
dh-exec \
cpio \
kernel-wedge \
kmod \
bc \
libssl-dev:native \
asciidoc-base \
xmlto \
bison \
flex \
gcc-multilib \
libaudit-dev \
libbabeltrace-dev \
libbabeltrace-ctf-dev \
libdw-dev \
libelf-dev \
libiberty-dev \
libnewt-dev \
libnuma-dev \
libperl-dev \
libunwind8-dev \
python-dev \
autoconf \
automake \
libtool \
libglib2.0-dev \
libudev-dev \
libwrap0-dev \
libpci-dev \
gcc-6 \
# Cross-compiler toolchains
RUN apt-get update && apt-get install --no-install-recommends -y \
gcc-arm-linux-gnueabihf \
# Other tools needed to upload the artifacts from Jenkins
RUN apt-get update && apt-get install --no-install-recommends -y \
ssh \
rsync \
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment