xserver: Branch 'master'

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Mar 27 16:46:23 UTC 2019


 .gitlab-ci.yml               |   43 ++++++++++++++-----------------------------
 .gitlab-ci/Dockerfile        |   35 -----------------------------------
 .gitlab-ci/debian-install.sh |   36 ++++++++++++++++++++++++++++++++++++
 3 files changed, 50 insertions(+), 64 deletions(-)

New commits:
commit f7069723093de585d082cfd98f0191d163569a78
Author: Benjamin Tissoires <benjamin.tissoires at gmail.com>
Date:   Mon Mar 18 11:09:29 2019 +0100

    CI: use wayland-ci-templates to manage the images
    
    There shouldn't be a difference for users, but this way we do manage
    all of our containers from freedesktop.org
    
    Signed-off-by: Benjamin Tissoires <benjamin.tissoires at gmail.com>
    Reviewed-by: Michel Dänzer <michel.daenzer at amd.com>

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 117744496..52a89ddf0 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,4 +1,4 @@
-# IMAGE_TAG is the tag of the docker image used for the build jobs. If the
+# DEBIAN_TAG is the tag of the docker image used for the build jobs. If the
 # image doesn't exist yet, the docker-image stage generates it.
 #
 # In order to generate a new image, one should generally change the tag.
@@ -13,40 +13,25 @@
 # container registry, so that the image from the main repository's registry
 # will be used there as well.
 variables:
-    IMAGE_TAG: "debian-testing-20190219"
-    IMAGE_LOCAL: "$CI_REGISTRY_IMAGE:$IMAGE_TAG"
-    IMAGE_MAIN: "registry.freedesktop.org/xorg/xserver:$IMAGE_TAG"
+    UPSTREAM_REPO: xorg/xserver
+    DEBIAN_VERSION: testing-slim
+    DEBIAN_EXEC: 'bash .gitlab-ci/debian-install.sh'
+
+    DEBIAN_TAG: "2019-03-27"
+    IMAGE_LOCAL: "$CI_REGISTRY_IMAGE/debian/$DEBIAN_VERSION:$DEBIAN_TAG"
+
+include:
+  - project: 'wayland/ci-templates'
+    ref: c73dae8b84697ef18e2dbbf4fed7386d9652b0cd
+    file: '/templates/debian.yml'
 
 stages:
     - docker-image
     - build-and-test
 
 debian-testing:
-    stage: docker-image
-    image:
-        name: gcr.io/kaniko-project/executor:debug
-        entrypoint: [""]
-    script:
-        - echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
-        - mkdir kaniko-context
-        - |
-          echo "FROM $IMAGE_LOCAL" > kaniko-context/Dockerfile
-          # If the image exists in the local registry, skip to the build-and-test job
-          set +e
-          set -x
-          /kaniko/executor --context kaniko-context --no-push && exit 0
-          set +x
-          set -e
-        - |
-          echo "FROM $IMAGE_MAIN" > kaniko-context/Dockerfile
-          # Try to re-use the image from the main repository's registry, and if
-          # that fails, generate a local image from scratch
-          set +e
-          set -x
-          /kaniko/executor --context kaniko-context --destination $IMAGE_LOCAL && exit 0
-          set +x
-          set -e
-        - /kaniko/executor --context $CI_PROJECT_DIR/.gitlab-ci --destination $IMAGE_LOCAL
+  extends: .debian at container-ifnot-exists
+  stage: docker-image
 
 .common-build-and-test:
     stage: build-and-test
diff --git a/.gitlab-ci/Dockerfile b/.gitlab-ci/Dockerfile
deleted file mode 100644
index 4c66ad0d4..000000000
--- a/.gitlab-ci/Dockerfile
+++ /dev/null
@@ -1,35 +0,0 @@
-FROM debian:testing-slim
-
-WORKDIR /tmp
-
-RUN export DEBIAN_FRONTEND=noninteractive; \
-    echo 'path-exclude=/usr/share/doc/*' > /etc/dpkg/dpkg.cfg.d/99-exclude-cruft && \
-    echo 'path-exclude=/usr/share/locale/*' >> /etc/dpkg/dpkg.cfg.d/99-exclude-cruft && \
-    echo 'path-exclude=/usr/share/man/*' >> /etc/dpkg/dpkg.cfg.d/99-exclude-cruft && \
-    echo 'APT::Install-Recommends "false";' > /etc/apt/apt.conf && \
-    echo '#!/bin/sh' > /usr/sbin/policy-rc.d && \
-    echo 'exit 101' >> /usr/sbin/policy-rc.d && \
-    chmod +x /usr/sbin/policy-rc.d && \
-    echo 'deb-src https://deb.debian.org/debian testing main' >/etc/apt/sources.list.d/deb-src.list && \
-    apt-get update && \
-    apt-get install -y meson git ca-certificates ccache cmake automake autoconf libtool libwaffle-dev \
-        libxkbcommon-dev python3-mako python3-numpy python3-six x11-utils x11-xserver-utils xauth xvfb && \
-    apt-get build-dep -y xorg-server && \
-    \
-    cd /root && \
-    git clone https://gitlab.freedesktop.org/mesa/piglit.git && cd piglit && \
-    cmake -G Ninja -DPIGLIT_BUILD_GL_TESTS=OFF -DPIGLIT_BUILD_GLES1_TESTS=OFF \
-        -DPIGLIT_BUILD_GLES2_TESTS=OFF -DPIGLIT_BUILD_GLES3_TESTS=OFF \
-        -DPIGLIT_BUILD_DMA_BUF_TESTS=OFF -DPIGLIT_BUILD_GLX_TESTS=OFF && \
-    ninja && \
-    cd .. && \
-    git clone https://gitlab.freedesktop.org/xorg/test/xts && \
-    cd xts && ./autogen.sh && xvfb-run make -j$(nproc) && \
-    cd .. && rm -rf piglit/.git xts/.git && \
-    echo '[xts]' > piglit/piglit.conf && echo 'path=/root/xts' >> piglit/piglit.conf && \
-    find -name \*.a -o -name \*.o | xargs rm && \
-    \
-    apt-get purge -y git cmake libwaffle-dev libxkbcommon-dev \
-        x11-utils x11-xserver-utils xauth xvfb && \
-    apt-get autoremove -y --purge && apt-get clean && \
-    rm -f /var/lib/apt/lists/deb.debian.org_debian_dists_testing_*
diff --git a/.gitlab-ci/debian-install.sh b/.gitlab-ci/debian-install.sh
new file mode 100644
index 000000000..e8d53eee9
--- /dev/null
+++ b/.gitlab-ci/debian-install.sh
@@ -0,0 +1,36 @@
+#!/bin/bash
+
+set -e
+set -o xtrace
+
+echo 'deb-src https://deb.debian.org/debian testing main' > /etc/apt/sources.list.d/deb-src.list
+apt-get update
+apt-get install -y meson git ca-certificates ccache cmake automake autoconf libtool libwaffle-dev \
+    libxkbcommon-dev python3-mako python3-numpy python3-six x11-utils x11-xserver-utils xauth xvfb
+apt-get build-dep -y xorg-server
+
+cd /root
+git clone https://gitlab.freedesktop.org/mesa/piglit.git
+cd piglit
+cmake -G Ninja -DPIGLIT_BUILD_GL_TESTS=OFF -DPIGLIT_BUILD_GLES1_TESTS=OFF \
+    -DPIGLIT_BUILD_GLES2_TESTS=OFF -DPIGLIT_BUILD_GLES3_TESTS=OFF \
+    -DPIGLIT_BUILD_DMA_BUF_TESTS=OFF -DPIGLIT_BUILD_GLX_TESTS=OFF
+ninja
+cd ..
+
+git clone https://gitlab.freedesktop.org/xorg/test/xts
+cd xts
+./autogen.sh
+xvfb-run make -j$(nproc)
+cd ..
+
+rm -rf piglit/.git xts/.git
+
+echo '[xts]' > piglit/piglit.conf
+echo 'path=/root/xts' >> piglit/piglit.conf
+
+find -name \*.a -o -name \*.o | xargs rm
+
+apt-get purge -y git cmake libwaffle-dev libxkbcommon-dev \
+    x11-utils x11-xserver-utils xauth xvfb
+apt-get autoremove -y --purge


More information about the xorg-commit mailing list