uinput: Implement FreeBSD fetch_syspath_and_devnode()
[platform/upstream/libevdev.git] / .gitlab-ci.yml
index cab0b5c..eeaee26 100644 (file)
@@ -1,36 +1,34 @@
-# vim: set expandtab shiftwidth=2 tabstop=8 textwidth=0 filetype=yaml:
-
 ########################################
 #                                      #
 # THIS FILE IS GENERATED, DO NOT EDIT  #
 #                                      #
 ########################################
 
-.templates_sha: &template_sha b7030c2cd0d6ccc5f6d4f8299bafa4daa9240d71 # see https://docs.gitlab.com/ee/ci/yaml/#includefile
+.templates_sha: &template_sha ca99d9418390fb5faaa7f2407b94c733d7ec6a37 # see https://docs.gitlab.com/ee/ci/yaml/#includefile
 
 include:
   # Alpine container builder template
-  - project: 'wayland/ci-templates'
+  - project: 'freedesktop/ci-templates'
     ref: *template_sha
     file: '/templates/alpine.yml'
   # Arch container builder template
-  - project: 'wayland/ci-templates'
+  - project: 'freedesktop/ci-templates'
     ref: *template_sha
     file: '/templates/arch.yml'
   # Centos container builder template
-  - project: 'wayland/ci-templates'
+  - project: 'freedesktop/ci-templates'
     ref: *template_sha
     file: '/templates/centos.yml'
   # Debian container builder template
-  - project: 'wayland/ci-templates'
+  - project: 'freedesktop/ci-templates'
     ref: *template_sha
     file: '/templates/debian.yml'
   # Fedora container builder template
-  - project: 'wayland/ci-templates'
+  - project: 'freedesktop/ci-templates'
     ref: *template_sha
     file: '/templates/fedora.yml'
   # Ubuntu container builder template
-  - project: 'wayland/ci-templates'
+  - project: 'freedesktop/ci-templates'
     ref: *template_sha
     file: '/templates/ubuntu.yml'
 
@@ -42,44 +40,11 @@ stages:
   - meson            # distribution builds with meson
   - tarballs         # tarball builds
   - container_clean  # clean up unused container images
+  - merge-check      # check for a merge request
 
 variables:
-  ###############################################################################
-  # This is the list of packages required to build libevdev with the default    #
-  # configuration.                                                              #
-  #                                                                             #
-  # Run dnf install/apt-get install/.. with the list of packages for your       #
-  # distribution                                                                #
-  ###############################################################################
-  FEDORA_RPMS: 'git gcc gcc-c++ meson automake autoconf libtool make pkgconfig  python3 check-devel valgrind binutils doxygen xz clang-analyzer'
-  CENTOS_RPMS: 'git gcc gcc-c++       automake autoconf libtool make pkgconfig  python3 check-devel valgrind binutils xz'
-  UBUNTU_DEBS: 'git gcc g++     meson automake autoconf libtool make pkg-config python3 check       valgrind binutils doxygen xz-utils'
-  DEBIAN_DEBS: $UBUNTU_DEBS
-  ARCH_PKGS:   'git gcc         meson automake autoconf libtool make pkgconfig  python3 check       valgrind binutils doxygen'
-  ALPINE_PKGS: 'git gcc g++     meson automake autoconf libtool make pkgconfig  python3 check-dev   valgrind binutils doxygen xz linux-headers'
-  ############################ end of package lists #############################
-  # these tags should be updated each time the list of packages is updated
-  # changing these will force rebuilding the associated image
-  # Note: these tags have no meaning and are not tied to a particular
-  # libevdev version
-  FEDORA_TAG: '2020-02-24.0'
-  CENTOS_TAG: '2020-02-24.0'
-  DEBIAN_TAG: '2020-02-24.0'
-  UBUNTU_TAG: '2020-02-24.0'
-  ARCH_TAG:   '2020-02-24.0'
-  ALPINE_TAG: '2020-02-24.0'
-  QEMU_TAG:   'qemu-2020-02-24.0'
-
-  UPSTREAM_REPO: libevdev/libevdev
-  BUILDAH_IMAGE: $CI_REGISTRY/wayland/ci-templates/buildah:latest
-  FEDORA_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/fedora/$FEDORA_VERSION:$FEDORA_TAG
-  CENTOS_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/centos/$CENTOS_VERSION:$CENTOS_TAG
-  UBUNTU_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/ubuntu/$UBUNTU_VERSION:$UBUNTU_TAG
-  DEBIAN_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/debian/$DEBIAN_VERSION:$DEBIAN_TAG
-  ARCH_CONTAINER_IMAGE:   $CI_REGISTRY_IMAGE/archlinux/rolling:$ARCH_TAG
-  ALPINE_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/alpine/latest:$ALPINE_TAG
-  QEMU_CONTAINER_IMAGE:   $CI_REGISTRY_IMAGE/fedora/$FEDORA_VERSION:$QEMU_TAG
-
+  # The upstrem repository we will check for images
+  FDO_UPSTREAM_REPO: libevdev/libevdev
   LIBEVDEV_SKIP_ROOT_TESTS: 1
   GIT_DEPTH: 1
   MESON_BUILDDIR: 'build dir'
@@ -112,6 +77,68 @@ variables:
   script:
     - .gitlab-ci/meson-build.sh
 
+.fedora:30:
+  extends: .fdo.distribution-image@fedora
+  variables:
+    FDO_DISTRIBUTION_TAG: '2020-03-17.0'
+    FDO_DISTRIBUTION_VERSION: '30'
+
+.fedora:31:
+  extends: .fdo.distribution-image@fedora
+  variables:
+    FDO_DISTRIBUTION_TAG: '2020-03-17.0'
+    FDO_DISTRIBUTION_VERSION: '31'
+
+.ubuntu:20.04:
+  extends: .fdo.distribution-image@ubuntu
+  variables:
+    FDO_DISTRIBUTION_TAG: '2020-03-17.0'
+    FDO_DISTRIBUTION_VERSION: '20.04'
+
+.ubuntu:19.10:
+  extends: .fdo.distribution-image@ubuntu
+  variables:
+    FDO_DISTRIBUTION_TAG: '2020-03-17.0'
+    FDO_DISTRIBUTION_VERSION: '19.10'
+
+.debian:stable:
+  extends: .fdo.distribution-image@debian
+  variables:
+    FDO_DISTRIBUTION_TAG: '2020-03-17.0'
+    FDO_DISTRIBUTION_VERSION: 'stable'
+
+.debian:sid:
+  extends: .fdo.distribution-image@debian
+  variables:
+    FDO_DISTRIBUTION_TAG: '2020-03-17.0'
+    FDO_DISTRIBUTION_VERSION: 'sid'
+
+.centos:7:
+  extends: .fdo.distribution-image@centos
+  variables:
+    FDO_DISTRIBUTION_TAG: '2020-03-17.0'
+    FDO_DISTRIBUTION_VERSION: '7'
+
+.centos:8:
+  extends: .fdo.distribution-image@centos
+  variables:
+    FDO_DISTRIBUTION_TAG: '2020-03-17.0'
+    FDO_DISTRIBUTION_VERSION: '8'
+
+.arch:rolling:
+  extends: .fdo.distribution-image@arch
+  variables:
+    FDO_DISTRIBUTION_TAG: '2020-03-17.0'
+    FDO_DISTRIBUTION_VERSION: 'rolling'
+
+.alpine:latest:
+  extends: .fdo.distribution-image@alpine
+  variables:
+    FDO_DISTRIBUTION_TAG: '2020-03-17.0'
+    FDO_DISTRIBUTION_VERSION: 'latest'
+
+
+
 #################################################################
 #                                                               #
 #                          prep stage                           #
@@ -126,27 +153,26 @@ check-ci-script:
   image: golang:alpine
   stage: prep
   before_script:
-    - apk add python3 git
-    - pip3 install --user jinja2 PyYAML
+    - apk add python3 py-pip git
+    - pip3 install git+http://gitlab.freedesktop.org/freedesktop/ci-templates
   script:
-    - python3 ./.gitlab-ci/generate-gitlab-ci.py
+    - ci-fairy generate-template
     - git diff --exit-code && exit 0 || true
     - echo "Committed gitlab-ci.yml differs from generated gitlab-ci.yml. Please verify"
     - exit 1
 
+#
+# Verify that commit messages are as expected, signed-off, etc.
+#
+
 check-commit:
   image: golang:alpine
   stage: prep
   before_script:
-    - apk add python3 git
+    - apk add python3 py-pip git
+    - pip3 install git+http://gitlab.freedesktop.org/freedesktop/ci-templates
   script:
-    - pip3 install GitPython
-    - pip3 install pytest
-    - |
-      pytest --junitxml=results.xml \
-             --tb=line \
-             --assert=plain \
-             ./.gitlab-ci/check-commit.py
+    - ci-fairy check-commits --signed-off-by --junit-xml=results.xml
   except:
     - master@libevdev/libevdev
   variables:
@@ -155,181 +181,303 @@ check-commit:
     reports:
       junit: results.xml
 
-.pull_upstream_or_rebuild:
+#
+# Verify that the merge request has the allow-collaboration checkbox ticked
+#
+
+check-merge-request:
+  image: golang:alpine
+  stage: merge-check
   before_script:
-    # log in to the registry
-    - podman login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
+    - apk add python3 py-pip git
+    - pip3 install git+http://gitlab.freedesktop.org/freedesktop/ci-templates
+  script:
+    - ci-fairy check-merge-request --require-allow-collaboration --junit-xml=results.xml
+  artifacts:
+    when: on_failure
+    reports:
+      junit: results.xml
+  allow_failure: true
 
-    # get the full container image name (DISTRIB_VERSION still has indirections)
-    - IMAGE=$(eval echo "$DISTRIB_FLAVOR/$DISTRIB_VERSION:$TAG")
 
-    - |
-      # force rebuild if schedule, reuse otherwise
-      if [[ $CI_PIPELINE_SOURCE != "schedule" ]] ;
-      then
-        # pull the latest upstream image if it exists
-        skopeo copy docker://$CI_REGISTRY/$UPSTREAM_REPO/$IMAGE \
-                    docker://$CI_REGISTRY_IMAGE/$IMAGE && exit 0 || true ;
+.fedora.packages:
+  variables:
+    FDO_DISTRIBUTION_PACKAGES: 'git gcc gcc-c++ meson automake autoconf libtool make pkgconfig python3 check-devel valgrind binutils doxygen xz clang-analyzer'
 
-        # check if our image is already in the current registry
-        skopeo inspect docker://$CI_REGISTRY_IMAGE/$IMAGE > /dev/null && exit 0 || true ;
-      fi
+.ubuntu.packages:
+  variables:
+    FDO_DISTRIBUTION_PACKAGES: 'git gcc g++ meson automake autoconf libtool make pkg-config python3 check valgrind binutils doxygen xz-utils'
 
-fedora:31@qemu-prep:
+.debian.packages:
+  variables:
+    FDO_DISTRIBUTION_PACKAGES: 'git gcc g++ meson automake autoconf libtool make pkg-config python3 check valgrind binutils doxygen xz-utils'
+
+.centos.packages:
+  variables:
+    FDO_DISTRIBUTION_PACKAGES: 'git gcc gcc-c++ automake autoconf libtool make pkgconfig python3 check-devel valgrind binutils xz'
+
+.arch.packages:
+  variables:
+    FDO_DISTRIBUTION_PACKAGES: 'git gcc meson automake autoconf libtool make pkgconfig python3 check valgrind binutils doxygen'
+
+.alpine.packages:
+  variables:
+    FDO_DISTRIBUTION_PACKAGES: 'git gcc g++ meson automake autoconf libtool make pkgconfig python3 check-dev valgrind binutils doxygen xz linux-headers'
+
+
+# Pulls in the qemu container from upstream or rebuilds it if missing
+.fedora:30@qemu-prep:
   extends:
-    - .fedora@qemu-build
-    - .pull_upstream_or_rebuild
+    - .fedora:30
+    - .fedora.packages
+    - .fdo.qemu-build@fedora
   stage: prep
   tags:
     - kvm
   variables:
     GIT_STRATEGY: none
-    FEDORA_VERSION: 31
-    FEDORA_TAG: $QEMU_TAG
-    DISTRIB_FLAVOR: fedora
-    DISTRIB_VERSION: $FEDORA_VERSION
-    TAG: $QEMU_TAG
+    FDO_DISTRIBUTION_TAG: qemu-2020-03-17.0
   allow_failure: true
 
+# Always rebuilds the container
+.fedora:30@qemu-forced-rebuild:
+  extends:
+    - .fedora:30@qemu-prep
+  variables:
+    FDO_FORCE_REBUILD: 1
+  only:
+    - schedules
 
-### fedora 30
+# Pulls in the qemu container from upstream or rebuilds it if missing
+.fedora:31@qemu-prep:
+  extends:
+    - .fedora:31
+    - .fedora.packages
+    - .fdo.qemu-build@fedora
+  stage: prep
+  tags:
+    - kvm
+  variables:
+    GIT_STRATEGY: none
+    FDO_DISTRIBUTION_TAG: qemu-2020-03-17.0
+  allow_failure: true
+
+# Always rebuilds the container
+.fedora:31@qemu-forced-rebuild:
+  extends:
+    - .fedora:31@qemu-prep
+  variables:
+    FDO_FORCE_REBUILD: 1
+  only:
+    - schedules
+
+
+# This is the actual job
+fedora:31@qemu-prep:
+  extends: .fedora:31@qemu-prep
+
+fedora:31@qemu-forced-rebuild:
+  extends: .fedora:31@qemu-forced-rebuild
+
+
+# Pulls in the container from upstream or rebuilds it if missing
 fedora:30@container-prep:
   extends:
-    - .fedora@container-build
-    - .pull_upstream_or_rebuild
+    - .fedora:30
+    - .fedora.packages
+    - .fdo.container-build@fedora
   stage: prep
   variables:
     GIT_STRATEGY: none
-    FEDORA_VERSION: '30'
-    DISTRIB_FLAVOR: fedora
-    DISTRIB_VERSION: $FEDORA_VERSION
-    TAG: $FEDORA_TAG
+
+# Always rebuilds the container
+fedora:30@container-forced-rebuild:
+  extends:
+    - fedora:30@container-prep
+  only:
+    - schedules
+  variables:
+    FDO_FORCE_REBUILD: 1
 
 
-### fedora 31
+# Pulls in the container from upstream or rebuilds it if missing
 fedora:31@container-prep:
   extends:
-    - .fedora@container-build
-    - .pull_upstream_or_rebuild
+    - .fedora:31
+    - .fedora.packages
+    - .fdo.container-build@fedora
   stage: prep
   variables:
     GIT_STRATEGY: none
-    FEDORA_VERSION: '31'
-    DISTRIB_FLAVOR: fedora
-    DISTRIB_VERSION: $FEDORA_VERSION
-    TAG: $FEDORA_TAG
 
+# Always rebuilds the container
+fedora:31@container-forced-rebuild:
+  extends:
+    - fedora:31@container-prep
+  only:
+    - schedules
+  variables:
+    FDO_FORCE_REBUILD: 1
 
-### ubuntu 19.10
-ubuntu:19.10@container-prep:
+
+# Pulls in the container from upstream or rebuilds it if missing
+ubuntu:20.04@container-prep:
   extends:
-    - .ubuntu@container-build
-    - .pull_upstream_or_rebuild
+    - .ubuntu:20.04
+    - .ubuntu.packages
+    - .fdo.container-build@ubuntu
   stage: prep
   variables:
     GIT_STRATEGY: none
-    UBUNTU_VERSION: '19.10'
-    DISTRIB_FLAVOR: ubuntu
-    DISTRIB_VERSION: $UBUNTU_VERSION
-    TAG: $UBUNTU_TAG
+
+# Always rebuilds the container
+ubuntu:20.04@container-forced-rebuild:
+  extends:
+    - ubuntu:20.04@container-prep
+  only:
+    - schedules
+  variables:
+    FDO_FORCE_REBUILD: 1
 
 
-### ubuntu 19.04
-ubuntu:19.04@container-prep:
+# Pulls in the container from upstream or rebuilds it if missing
+ubuntu:19.10@container-prep:
   extends:
-    - .ubuntu@container-build
-    - .pull_upstream_or_rebuild
+    - .ubuntu:19.10
+    - .ubuntu.packages
+    - .fdo.container-build@ubuntu
   stage: prep
   variables:
     GIT_STRATEGY: none
-    UBUNTU_VERSION: '19.04'
-    DISTRIB_FLAVOR: ubuntu
-    DISTRIB_VERSION: $UBUNTU_VERSION
-    TAG: $UBUNTU_TAG
 
+# Always rebuilds the container
+ubuntu:19.10@container-forced-rebuild:
+  extends:
+    - ubuntu:19.10@container-prep
+  only:
+    - schedules
+  variables:
+    FDO_FORCE_REBUILD: 1
 
-### debian stable
+
+# Pulls in the container from upstream or rebuilds it if missing
 debian:stable@container-prep:
   extends:
-    - .debian@container-build
-    - .pull_upstream_or_rebuild
+    - .debian:stable
+    - .debian.packages
+    - .fdo.container-build@debian
   stage: prep
   variables:
     GIT_STRATEGY: none
-    DEBIAN_VERSION: 'stable'
-    DISTRIB_FLAVOR: debian
-    DISTRIB_VERSION: $DEBIAN_VERSION
-    TAG: $DEBIAN_TAG
 
+# Always rebuilds the container
+debian:stable@container-forced-rebuild:
+  extends:
+    - debian:stable@container-prep
+  only:
+    - schedules
+  variables:
+    FDO_FORCE_REBUILD: 1
 
-### debian sid
+
+# Pulls in the container from upstream or rebuilds it if missing
 debian:sid@container-prep:
   extends:
-    - .debian@container-build
-    - .pull_upstream_or_rebuild
+    - .debian:sid
+    - .debian.packages
+    - .fdo.container-build@debian
   stage: prep
   variables:
     GIT_STRATEGY: none
-    DEBIAN_VERSION: 'sid'
-    DISTRIB_FLAVOR: debian
-    DISTRIB_VERSION: $DEBIAN_VERSION
-    TAG: $DEBIAN_TAG
 
+# Always rebuilds the container
+debian:sid@container-forced-rebuild:
+  extends:
+    - debian:sid@container-prep
+  only:
+    - schedules
+  variables:
+    FDO_FORCE_REBUILD: 1
 
-### centos 7
+
+# Pulls in the container from upstream or rebuilds it if missing
 centos:7@container-prep:
   extends:
-    - .centos@container-build
-    - .pull_upstream_or_rebuild
+    - .centos:7
+    - .centos.packages
+    - .fdo.container-build@centos
   stage: prep
   variables:
     GIT_STRATEGY: none
-    CENTOS_VERSION: '7'
-    DISTRIB_FLAVOR: centos
-    DISTRIB_VERSION: $CENTOS_VERSION
-    TAG: $CENTOS_TAG
+
+# Always rebuilds the container
+centos:7@container-forced-rebuild:
+  extends:
+    - centos:7@container-prep
+  only:
+    - schedules
+  variables:
+    FDO_FORCE_REBUILD: 1
 
 
-### centos 8
+# Pulls in the container from upstream or rebuilds it if missing
 centos:8@container-prep:
   extends:
-    - .centos@container-build
-    - .pull_upstream_or_rebuild
+    - .centos:8
+    - .centos.packages
+    - .fdo.container-build@centos
   stage: prep
   variables:
     GIT_STRATEGY: none
-    CENTOS_VERSION: '8'
-    DISTRIB_FLAVOR: centos
-    DISTRIB_VERSION: $CENTOS_VERSION
-    TAG: $CENTOS_TAG
 
+# Always rebuilds the container
+centos:8@container-forced-rebuild:
+  extends:
+    - centos:8@container-prep
+  only:
+    - schedules
+  variables:
+    FDO_FORCE_REBUILD: 1
 
-### arch rolling
+
+# Pulls in the container from upstream or rebuilds it if missing
 arch:rolling@container-prep:
   extends:
-    - .arch@container-build
-    - .pull_upstream_or_rebuild
+    - .arch:rolling
+    - .arch.packages
+    - .fdo.container-build@arch
   stage: prep
   variables:
     GIT_STRATEGY: none
-    ARCH_VERSION: 'rolling'
-    DISTRIB_FLAVOR: arch
-    DISTRIB_VERSION: $ARCH_VERSION
-    TAG: $ARCH_TAG
 
+# Always rebuilds the container
+arch:rolling@container-forced-rebuild:
+  extends:
+    - arch:rolling@container-prep
+  only:
+    - schedules
+  variables:
+    FDO_FORCE_REBUILD: 1
 
-### alpine latest
+
+# Pulls in the container from upstream or rebuilds it if missing
 alpine:latest@container-prep:
   extends:
-    - .alpine@container-build
-    - .pull_upstream_or_rebuild
+    - .alpine:latest
+    - .alpine.packages
+    - .fdo.container-build@alpine
   stage: prep
   variables:
     GIT_STRATEGY: none
-    ALPINE_VERSION: 'latest'
-    DISTRIB_FLAVOR: alpine
-    DISTRIB_VERSION: $ALPINE_VERSION
-    TAG: $ALPINE_TAG
+
+# Always rebuilds the container
+alpine:latest@container-forced-rebuild:
+  extends:
+    - alpine:latest@container-prep
+  only:
+    - schedules
+  variables:
+    FDO_FORCE_REBUILD: 1
 
 
 #################################################################
@@ -343,164 +491,95 @@ alpine:latest@container-prep:
 # This stage will look for the container images we currently have in
 # the registry and will remove any that are not tagged with the provided
 # $container_image:$tag
-#
 .container-clean:
   stage: container_clean
-  image: $BUILDAH_IMAGE
+  image: golang:alpine
+  before_script:
+    - apk add python3 py-pip git
+    - pip3 install git+http://gitlab.freedesktop.org/freedesktop/ci-templates
   script:
-    # get the full container image name (CURRENT_CONTAINER_IMAGE still has indirections)
-    - CONTAINER_IMAGE=$(eval echo "$CURRENT_CONTAINER_IMAGE")
-    - GITLAB=$(echo $CI_PROJECT_URL | cut -f3 -d/)
-    - REPOSITORY=$(echo $CONTAINER_IMAGE | cut -f2- -d/ | cut -f1 -d:)
-    - IMAGE_PATH=$(echo $CONTAINER_IMAGE | cut -f1 -d:)
-    - LATEST_TAG=$(echo $CONTAINER_IMAGE | cut -f2 -d:)
-
-    # log in to the registry (read only)
-    - podman login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
-
-    # get the r/w token from the settings to access the registry
-    #
-    # each developer needs to register a secret variable that contains
-    # a personal token with api access. The token
-    # - must be named PERSONAL_TOKEN_$USER (for example PERSONAL_TOKEN_bentiss)
-    # - must be registered in the CI/CD Variables section as type file
-    # - value must be a netrc file as a single-line string:
-    #   default login <user> password <token value>
-    #   e.g. "default login bentiss password 1235abcde"
-    - tokenname="PERSONAL_TOKEN_$GITLAB_USER_LOGIN"
-    - netrcfile=$(eval echo "\$$tokenname")
-    - if [[ ! -f "$netrcfile" ]]; then
-         echo "No netrc file found or token is missing, skipping job" && false;
-      fi
-
-    # request a token for the registry API
-    - REGISTRY_TOKEN=$(curl https://$GITLAB/jwt/auth --get
-                             --silent --show-error
-                             -d client_id=docker
-                             -d offline_token=true
-                             -d service=container_registry
-                             -d "scope=repository:$REPOSITORY:pull,*"
-                             --fail
-                             --netrc-file "$netrcfile"
-                             | sed -r 's/(\{"token":"|"\})//g')
-
-    # get the digest of the latest image
-    - LATEST_MANIFEST=$(skopeo inspect docker://$IMAGE_PATH:$LATEST_TAG | jq -r '.Digest')
-
-    # get the list of tags
-    - TAGS=$(skopeo inspect docker://$IMAGE_PATH:$LATEST_TAG | jq -r '.RepoTags[]')
-    # FIXME: is the above command working properly? If not, use below:
-    # - TAGS=$(curl -X GET -H "accept:application/vnd.docker.distribution.manifest.v2+json"
-    #                      -H "authorization:Bearer $REGISTRY_TOKEN"
-    #                      https://$CI_REGISTRY/v2/$REPOSITORY/tags/list | jq -r '.tags[]')
-
-    # iterate over the tags
-    - for tag in $TAGS;
-      do
-        MANIFEST=$(skopeo inspect docker://$IMAGE_PATH:$tag | jq -r '.Digest');
-        if test x"$MANIFEST" != x"$LATEST_MANIFEST";
-          then
-            echo removing $tag as $MANIFEST;
-            curl https://$CI_REGISTRY/v2/$REPOSITORY/manifests/$MANIFEST --silent
-                 -H "accept:application/vnd.docker.distribution.manifest.v2+json"
-                 -H "authorization:Bearer $REGISTRY_TOKEN"
-                 --fail --show-error -X DELETE || true
-          ;fi
-      ;done
+    # Go to your Profile, Settings, Access Tokens
+    # Create a personal token with 'api' scope, copy the value.
+    # Go to CI/CD, Schedules, schedule a new monthly job (or edit the existing one)
+    # Define a variable of type File named AUTHFILE. Content is that token
+    # value.
+    - ci-fairy -v --authfile $AUTHFILE delete-image
+            --repository $FDO_DISTRIBUTION_NAME/$FDO_DISTRIBUTION_VERSION
+            --exclude-tag $FDO_DISTRIBUTION_TAG
   dependencies: []
   allow_failure: true
   only:
     - schedules
 
-
 ### fedora 30
 fedora:30@container-clean:
-  extends: .container-clean
-  variables:
-    GIT_STRATEGY: none
-    FEDORA_VERSION: '30'
-    CURRENT_CONTAINER_IMAGE: $FEDORA_CONTAINER_IMAGE
-
+  extends:
+    - .fedora:30
+    - .container-clean
+  needs: ["fedora:30@container-prep"]
 
 ### fedora 31
 fedora:31@container-clean:
-  extends: .container-clean
-  variables:
-    GIT_STRATEGY: none
-    FEDORA_VERSION: '31'
-    CURRENT_CONTAINER_IMAGE: $FEDORA_CONTAINER_IMAGE
+  extends:
+    - .fedora:31
+    - .container-clean
+  needs: ["fedora:31@container-prep"]
 
+### ubuntu 20.04
+ubuntu:20.04@container-clean:
+  extends:
+    - .ubuntu:20.04
+    - .container-clean
+  needs: ["ubuntu:20.04@container-prep"]
 
 ### ubuntu 19.10
 ubuntu:19.10@container-clean:
-  extends: .container-clean
-  variables:
-    GIT_STRATEGY: none
-    UBUNTU_VERSION: '19.10'
-    CURRENT_CONTAINER_IMAGE: $UBUNTU_CONTAINER_IMAGE
-
-
-### ubuntu 19.04
-ubuntu:19.04@container-clean:
-  extends: .container-clean
-  variables:
-    GIT_STRATEGY: none
-    UBUNTU_VERSION: '19.04'
-    CURRENT_CONTAINER_IMAGE: $UBUNTU_CONTAINER_IMAGE
-
+  extends:
+    - .ubuntu:19.10
+    - .container-clean
+  needs: ["ubuntu:19.10@container-prep"]
 
 ### debian stable
 debian:stable@container-clean:
-  extends: .container-clean
-  variables:
-    GIT_STRATEGY: none
-    DEBIAN_VERSION: 'stable'
-    CURRENT_CONTAINER_IMAGE: $DEBIAN_CONTAINER_IMAGE
-
+  extends:
+    - .debian:stable
+    - .container-clean
+  needs: ["debian:stable@container-prep"]
 
 ### debian sid
 debian:sid@container-clean:
-  extends: .container-clean
-  variables:
-    GIT_STRATEGY: none
-    DEBIAN_VERSION: 'sid'
-    CURRENT_CONTAINER_IMAGE: $DEBIAN_CONTAINER_IMAGE
-
+  extends:
+    - .debian:sid
+    - .container-clean
+  needs: ["debian:sid@container-prep"]
 
 ### centos 7
 centos:7@container-clean:
-  extends: .container-clean
-  variables:
-    GIT_STRATEGY: none
-    CENTOS_VERSION: '7'
-    CURRENT_CONTAINER_IMAGE: $CENTOS_CONTAINER_IMAGE
-
+  extends:
+    - .centos:7
+    - .container-clean
+  needs: ["centos:7@container-prep"]
 
 ### centos 8
 centos:8@container-clean:
-  extends: .container-clean
-  variables:
-    GIT_STRATEGY: none
-    CENTOS_VERSION: '8'
-    CURRENT_CONTAINER_IMAGE: $CENTOS_CONTAINER_IMAGE
-
+  extends:
+    - .centos:8
+    - .container-clean
+  needs: ["centos:8@container-prep"]
 
 ### arch rolling
 arch:rolling@container-clean:
-  extends: .container-clean
-  variables:
-    GIT_STRATEGY: none
-    ARCH_VERSION: 'rolling'
-    CURRENT_CONTAINER_IMAGE: $ARCH_CONTAINER_IMAGE
-
+  extends:
+    - .arch:rolling
+    - .container-clean
+  needs: ["arch:rolling@container-prep"]
 
 ### alpine latest
 alpine:latest@container-clean:
-  extends: .container-clean
-  variables:
-    GIT_STRATEGY: none
-    ALPINE_VERSION: 'latest'
-    CURRENT_CONTAINER_IMAGE: $ALPINE_CONTAINER_IMAGE
+  extends:
+    - .alpine:latest
+    - .container-clean
+  needs: ["alpine:latest@container-prep"]
 
 
 #################################################################
@@ -527,160 +606,144 @@ alpine:latest@container-clean:
 
 
 fedora:30@autotools-build:
-  extends: .autotools-build@template
+  extends:
+    - .fedora:30
+    - .autotools-build@template
   stage: autotools
-  image: $FEDORA_CONTAINER_IMAGE
-  variables:
-    FEDORA_VERSION: '30'
   needs: ['fedora:30@container-prep']
 
 fedora:30@meson-build:
-  extends: .meson-build@template
+  extends:
+    - .fedora:30
+    - .meson-build@template
   stage: meson
-  image: $FEDORA_CONTAINER_IMAGE
-  variables:
-    FEDORA_VERSION: '30'
   needs: ['fedora:30@container-prep']
 
 
 fedora:31@autotools-build:
-  extends: .autotools-build@template
+  extends:
+    - .fedora:31
+    - .autotools-build@template
   stage: autotools
-  image: $FEDORA_CONTAINER_IMAGE
-  variables:
-    FEDORA_VERSION: '31'
   needs: ['fedora:31@container-prep']
 
 fedora:31@meson-build:
-  extends: .meson-build@template
+  extends:
+    - .fedora:31
+    - .meson-build@template
   stage: meson
-  image: $FEDORA_CONTAINER_IMAGE
-  variables:
-    FEDORA_VERSION: '31'
   needs: ['fedora:31@container-prep']
 
 
-ubuntu:19.10@autotools-build:
-  extends: .autotools-build@template
+ubuntu:20.04@autotools-build:
+  extends:
+    - .ubuntu:20.04
+    - .autotools-build@template
   stage: autotools
-  image: $UBUNTU_CONTAINER_IMAGE
-  variables:
-    UBUNTU_VERSION: '19.10'
-  needs: ['ubuntu:19.10@container-prep']
+  needs: ['ubuntu:20.04@container-prep']
 
-ubuntu:19.10@meson-build:
-  extends: .meson-build@template
+ubuntu:20.04@meson-build:
+  extends:
+    - .ubuntu:20.04
+    - .meson-build@template
   stage: meson
-  image: $UBUNTU_CONTAINER_IMAGE
-  variables:
-    UBUNTU_VERSION: '19.10'
-  needs: ['ubuntu:19.10@container-prep']
+  needs: ['ubuntu:20.04@container-prep']
 
 
-ubuntu:19.04@autotools-build:
-  extends: .autotools-build@template
+ubuntu:19.10@autotools-build:
+  extends:
+    - .ubuntu:19.10
+    - .autotools-build@template
   stage: autotools
-  image: $UBUNTU_CONTAINER_IMAGE
-  variables:
-    UBUNTU_VERSION: '19.04'
-  needs: ['ubuntu:19.04@container-prep']
+  needs: ['ubuntu:19.10@container-prep']
 
-ubuntu:19.04@meson-build:
-  extends: .meson-build@template
+ubuntu:19.10@meson-build:
+  extends:
+    - .ubuntu:19.10
+    - .meson-build@template
   stage: meson
-  image: $UBUNTU_CONTAINER_IMAGE
-  variables:
-    UBUNTU_VERSION: '19.04'
-  needs: ['ubuntu:19.04@container-prep']
+  needs: ['ubuntu:19.10@container-prep']
 
 
 debian:stable@autotools-build:
-  extends: .autotools-build@template
+  extends:
+    - .debian:stable
+    - .autotools-build@template
   stage: autotools
-  image: $DEBIAN_CONTAINER_IMAGE
-  variables:
-    DEBIAN_VERSION: 'stable'
   needs: ['debian:stable@container-prep']
 
 debian:stable@meson-build:
-  extends: .meson-build@template
+  extends:
+    - .debian:stable
+    - .meson-build@template
   stage: meson
-  image: $DEBIAN_CONTAINER_IMAGE
-  variables:
-    DEBIAN_VERSION: 'stable'
   needs: ['debian:stable@container-prep']
 
 
 debian:sid@autotools-build:
-  extends: .autotools-build@template
+  extends:
+    - .debian:sid
+    - .autotools-build@template
   stage: autotools
-  image: $DEBIAN_CONTAINER_IMAGE
-  variables:
-    DEBIAN_VERSION: 'sid'
   needs: ['debian:sid@container-prep']
 
 debian:sid@meson-build:
-  extends: .meson-build@template
+  extends:
+    - .debian:sid
+    - .meson-build@template
   stage: meson
-  image: $DEBIAN_CONTAINER_IMAGE
-  variables:
-    DEBIAN_VERSION: 'sid'
   needs: ['debian:sid@container-prep']
 
 
 centos:7@autotools-build:
-  extends: .autotools-build@template
+  extends:
+    - .centos:7
+    - .autotools-build@template
   stage: autotools
-  image: $CENTOS_CONTAINER_IMAGE
   variables:
-    CENTOS_VERSION: '7'
     MAKE_ARGS: ''  # disable distcheck, requires doxygen
   needs: ['centos:7@container-prep']
 
 
 
 centos:8@autotools-build:
-  extends: .autotools-build@template
+  extends:
+    - .centos:8
+    - .autotools-build@template
   stage: autotools
-  image: $CENTOS_CONTAINER_IMAGE
   variables:
-    CENTOS_VERSION: '8'
     MAKE_ARGS: ''  # disable distcheck, requires doxygen
   needs: ['centos:8@container-prep']
 
 
 
 arch:rolling@autotools-build:
-  extends: .autotools-build@template
+  extends:
+    - .arch:rolling
+    - .autotools-build@template
   stage: autotools
-  image: $ARCH_CONTAINER_IMAGE
-  variables:
-    ARCH_VERSION: 'rolling'
   needs: ['arch:rolling@container-prep']
 
 arch:rolling@meson-build:
-  extends: .meson-build@template
+  extends:
+    - .arch:rolling
+    - .meson-build@template
   stage: meson
-  image: $ARCH_CONTAINER_IMAGE
-  variables:
-    ARCH_VERSION: 'rolling'
   needs: ['arch:rolling@container-prep']
 
 
 alpine:latest@autotools-build:
-  extends: .autotools-build@template
+  extends:
+    - .alpine:latest
+    - .autotools-build@template
   stage: autotools
-  image: $ALPINE_CONTAINER_IMAGE
-  variables:
-    ALPINE_VERSION: 'latest'
   needs: ['alpine:latest@container-prep']
 
 alpine:latest@meson-build:
-  extends: .meson-build@template
+  extends:
+    - .alpine:latest
+    - .meson-build@template
   stage: meson
-  image: $ALPINE_CONTAINER_IMAGE
-  variables:
-    ALPINE_VERSION: 'latest'
   needs: ['alpine:latest@container-prep']
 
 
@@ -689,11 +752,10 @@ alpine:latest@meson-build:
 # We only run the build option combinations on one image
 # because they're supposed to fail equally on all
 .fedora-custom-build@autotools-template:
-  extends: .autotools-build@template
+  extends:
+    - .fedora:31
+    - .autotools-build@template
   stage: build
-  image: $FEDORA_CONTAINER_IMAGE
-  variables:
-    FEDORA_VERSION: 31
   needs: ['fedora:31@container-prep']
 
 no-valgrind:autotools:
@@ -732,11 +794,10 @@ enable-gcov:autotools:
     CONFIGURE_FLAGS: "--enable-gcov"
 
 .fedora-custom-build@meson-template:
-  extends: .meson-build@template
+  extends:
+    - .fedora:31
+    - .meson-build@template
   stage: build
-  image: $FEDORA_CONTAINER_IMAGE
-  variables:
-    FEDORA_VERSION: 31
   needs: ['fedora:31@container-prep']
 
 no-valgrind:meson:
@@ -782,9 +843,17 @@ scan-build:meson:
     NINJA_ARGS: 'scan-build'
     SKIP_MESON_TEST: 1
 
+static-build:meson:
+  extends: .fedora-custom-build@meson-template
+  script:
+    - meson "$MESON_BUILDDIR" --default-library=static --prefix=$PWD/prefix-meson/
+    - ninja -C "$MESON_BUILDDIR" install
+    - ls -l $PWD/prefix-meson/lib64/libevdev.a
+
 soname:
+  extends:
+    - .fedora:31
   stage: build
-  image: $FEDORA_CONTAINER_IMAGE
   script:
   - ./autogen.sh --prefix=$PWD/prefix-autotools/
   - make install
@@ -792,8 +861,6 @@ soname:
   - meson "$MESON_BUILDDIR" --prefix=$PWD/prefix-meson/
   - ninja -C "$MESON_BUILDDIR" install
   - ls -l $PWD/prefix-meson/lib64/libevdev.so.2.3.0
-  variables:
-    FEDORA_VERSION: 31
   needs: ['fedora:31@container-prep']
 
 #################################################################
@@ -811,12 +878,13 @@ soname:
   fi
 
 .qemu@fedora:31:
+  extends:
+    - .fedora:31
   stage: VM
-  image: $QEMU_CONTAINER_IMAGE
+  image: $CI_REGISTRY_IMAGE/$FDO_DISTRIBUTION_NAME/$FDO_DISTRIBUTION_VERSION:qemu-$FDO_DISTRIBUTION_TAG
   tags:
     - kvm
   variables:
-    FEDORA_VERSION: 31
     MESON_BUILDDIR: build_dir
   script:
     # start our vm, no args required
@@ -855,7 +923,6 @@ soname:
     reports:
       junit: $MESON_BUILDDIR/junit-*.xml
 
-  allow_failure: true
   retry:
     max: 2
     when: script_failure
@@ -870,8 +937,9 @@ qemu:meson:valgrind:
     MESON_TEST_ARGS: '--setup=valgrind'
 
 meson-from-tarball:
+  extends:
+    - .fedora:31
   stage: tarballs
-  image: $FEDORA_CONTAINER_IMAGE
   script:
     - export INSTALLDIR="$PWD/_inst"
     - mkdir _build
@@ -888,13 +956,12 @@ meson-from-tarball:
     - ninja -C "$MESON_BUILDDIR" install
     - popd > /dev/null
     - ls -lR $INSTALLDIR
-  variables:
-    FEDORA_VERSION: 31
   needs: ['fedora:31@container-prep']
 
 autotools-from-tarball:
+  extends:
+    - .fedora:31
   stage: tarballs
-  image: $FEDORA_CONTAINER_IMAGE
   script:
     - export INSTALLDIR="$PWD/_inst"
     - meson "$MESON_BUILDDIR"
@@ -911,6 +978,4 @@ autotools-from-tarball:
     - popd > /dev/null
     - popd > /dev/null
     - ls -lR $INSTALLDIR
-  variables:
-    FEDORA_VERSION: 31
   needs: ['fedora:31@container-prep']
\ No newline at end of file