[gnome-settings-daemon/benzea/master-gsettings-desktop-schemas] ci: Move to use the wayland ci-templates from freedesktop.org



commit 8785a7c834a28057b34e6883e9c6a8bf0d6e3160
Author: Benjamin Berg <bberg redhat com>
Date:   Tue Feb 18 13:22:59 2020 +0100

    ci: Move to use the wayland ci-templates from freedesktop.org
    
    This also fixes building the image inside non-privileged containers.

 .gitlab-ci.yml                                 | 134 ++++++++++++++-----------
 build-aux/ci/Dockerfile.arm64v8.fedora.rawhide |  31 ------
 build-aux/ci/Dockerfile.fedora.rawhide         |  29 ------
 build-aux/ci/Dockerfile.ppc64le.fedora.rawhide |  31 ------
 4 files changed, 73 insertions(+), 152 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 68982062..c881459a 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,4 +1,62 @@
-image: registry.gitlab.gnome.org/gnome/gnome-settings-daemon:fedora.dev
+include:
+ - remote: 'https://gitlab.freedesktop.org/wayland/ci-templates/raw/master/templates/fedora.yml'
+
+variables:
+  # Use F31 for now as the base image needs updating for the new keys
+  FEDORA_TAG: latest
+  FEDORA_VERSION: 31
+  # NOTE: We hardcode /gnome/ so that forks pick up the correct registry
+  FEDORA_IMAGE: "$CI_REGISTRY/gnome/$CI_PROJECT_NAME/fedora/$FEDORA_VERSION:$FEDORA_TAG"
+  FEDORA_DEPENDENCIES: >
+    @c-development
+    alsa-lib-devel
+    colord-devel
+    compiler-rt
+    cups-devel
+    fontconfig-devel
+    gcr-devel
+    geoclue2-devel geocode-glib-devel
+    gettext
+    git
+    glib2-devel
+    gnome-desktop3-devel
+    gnome-session
+    gobject-introspection
+    gobject-introspection-devel
+    gsettings-desktop-schemas-devel
+    gtk3-devel
+    lcms2-devel
+    lcov gcovr clang libasan libubsan libtsan
+    libcanberra-devel
+    libgtop2-devel
+    libgudev-devel
+    libgweather-devel
+    libnotify-devel
+    librsvg2-devel
+    libwacom-devel
+    libX11-devel
+    libXi-devel
+    libXtst-devel
+    llvm
+    mesa-dri-drivers
+    meson
+    ModemManager-glib-devel
+    NetworkManager-libnm-devel
+    nss-devel
+    perl-interpreter
+    polkit-devel
+    pulseaudio-libs-devel
+    pygobject3 python3-dbusmock
+    umockdev
+    upower-devel
+    wayland-devel
+    which
+    xorg-x11-drv-wacom-devel
+    xorg-x11-server-Xvfb
+    xorg-x11-utils mutter
+
+image: "$FEDORA_IMAGE"
+
 stages:
   - build
   - test
@@ -179,68 +237,22 @@ msan:
 #############################################
 #          Create CI Docker Images          #
 #############################################
-.Docker common variables: &docker_common_variables
-  # https://about.gitlab.com/blog/2019/07/31/docker-in-docker-with-docker-19-dot-03/
-  DOCKER_TLS_CERTDIR: ""
-  DOCKER_DRIVER: overlay
 
-.Docker image template: &create_docker_image
-  image: docker:latest
-  stage: delivery
-  services:
-    - docker:stable-dind
+container_fedora_build:
+  extends: .fedora@container-build
+  # The templates reference the local registry, but we need the fdo one
+  image: registry.freedesktop.org/wayland/ci-templates/buildah:latest
   only:
     variables:
-      - $CRON_TASK == "BUILD_CI_IMAGES"
-
-  script:
-    # Skip the build (if requested)
-    - |
-      if [[ -z "${CI_COMMIT_MESSAGE##*'[skip images]'*}" ]]; then
-        echo "== Nothing to do =="
-        exit 0
-      fi
-
-    # Get multiarch stuff
-    - |
-      if [[ -n "${TARGET_ARCH}" ]]; then
-        docker run --rm --privileged multiarch/qemu-user-static:register --reset
-        wget 
https://github.com/multiarch/qemu-user-static/releases/download/v2.12.0/x86_64_qemu-${TARGET_ARCH}-static.tar.gz
-      fi
-
-    # Build using the Dockerfile
-    - docker build -f "$DOCKERFILE" -t "$CI_REGISTRY_IMAGE:$NAME" .
-
-    # Prepare to publish
-    - docker tag "$CI_REGISTRY_IMAGE:$NAME" "$CI_REGISTRY_IMAGE:job-"$CI_JOB_ID"_$NAME"
-    - docker images
-    - docker login ${CI_REGISTRY} -u ${CI_REGISTRY_USER} -p ${CI_REGISTRY_PASSWORD}
-
-    # Publish (if running on a schedule)
-    - |
-      if [[ "${CI_PIPELINE_SOURCE}" == "schedule" ]]; then
-        docker push "$CI_REGISTRY_IMAGE"
-      fi
-
-fedora.dev:
-  <<: *create_docker_image
-  variables:
-    <<: *docker_common_variables
-    DOCKERFILE: "build-aux/ci/Dockerfile.fedora.rawhide"
-    NAME: "fedora.dev"
-
-fedora.aarch64:
-  <<: *create_docker_image
+      - $CI_PIPELINE_SOURCE == "schedule" && $CRON_TASK == "BUILD_CI_IMAGES"
   variables:
-    <<: *docker_common_variables
-    DOCKERFILE: "build-aux/ci/Dockerfile.arm64v8.fedora.rawhide"
-    NAME: "fedora.aarch64"
-    TARGET_ARCH: "aarch64"
+    GIT_STRATEGY: none # no need to pull the whole tree for rebuilding the image
+    FEDORA_RPMS: $FEDORA_DEPENDENCIES
+    FEDORA_EXEC: |
+      git clone https://gitlab.gnome.org/GNOME/gsettings-desktop-schemas.git && \
+        cd gsettings-desktop-schemas && \
+        meson . _build --prefix=/usr && \
+        ninja -C _build && \
+        ninja -C _build install && \
+        cd ..
 
-fedora.ppc64le:
-  <<: *create_docker_image
-  variables:
-    <<: *docker_common_variables
-    DOCKERFILE: "build-aux/ci/Dockerfile.ppc64le.fedora.rawhide"
-    NAME: "fedora.ppc64le"
-    TARGET_ARCH: "ppc64le"


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]