diff --git a/automation/gitlab-ci/build.yaml b/automation/gitlab-ci/build.yaml
index 38bb22d860..1f186bf346 100644
--- a/automation/gitlab-ci/build.yaml
+++ b/automation/gitlab-ci/build.yaml
@@ -255,285 +255,346 @@
 
 # Jobs below this line
 
-archlinux-gcc:
-  extends: .gcc-x86-64-build
+.container-archlinux:
   variables:
     CONTAINER: archlinux:current
 
+archlinux-gcc:
+  extends:
+    - .gcc-x86-64-build
+    - .container-archlinux
+
 archlinux-gcc-debug:
-  extends: .gcc-x86-64-build-debug
-  variables:
-    CONTAINER: archlinux:current
+  extends:
+    - .gcc-x86-64-build-debug
+    - .container-archlinux
 
-centos-7-gcc:
-  extends: .gcc-x86-64-build
+.container-centos-7:
   variables:
     CONTAINER: centos:7
 
+centos-7-gcc:
+  extends:
+    - .gcc-x86-64-build
+    - .container-centos-7
+
 centos-7-gcc-debug:
-  extends: .gcc-x86-64-build-debug
-  variables:
-    CONTAINER: centos:7
+  extends:
+    - .gcc-x86-64-build-debug
+    - .container-centos-7
 
-debian-stretch-clang:
-  extends: .clang-x86-64-build
+.container-debian-stretch:
   variables:
     CONTAINER: debian:stretch
 
+debian-stretch-clang:
+  extends:
+    - .clang-x86-64-build
+    - .container-debian-stretch
+
 debian-stretch-clang-debug:
-  extends: .clang-x86-64-build-debug
-  variables:
-    CONTAINER: debian:stretch
+  extends:
+    - .clang-x86-64-build-debug
+    - .container-debian-stretch
 
 debian-stretch-clang-8:
-  extends: .clang-8-x86-64-build
-  variables:
-    CONTAINER: debian:stretch
+  extends:
+    - .clang-8-x86-64-build
+    - .container-debian-stretch
 
 debian-stretch-clang-8-debug:
-  extends: .clang-8-x86-64-build-debug
-  variables:
-    CONTAINER: debian:stretch
+  extends:
+    - .clang-8-x86-64-build-debug
+    - .container-debian-stretch
 
 debian-stretch-gcc:
-  extends: .gcc-x86-64-build
-  variables:
-    CONTAINER: debian:stretch
+  extends:
+    - .gcc-x86-64-build
+    - .container-debian-stretch
 
 debian-stretch-gcc-debug:
-  extends: .gcc-x86-64-build-debug
-  variables:
-    CONTAINER: debian:stretch
+  extends:
+    - .gcc-x86-64-build-debug
+    - .container-debian-stretch
 
-debian-stretch-32-clang-debug:
-  extends: .clang-x86-32-build-debug
+.container-debian-stretch-32:
   variables:
     CONTAINER: debian:stretch-i386
 
+debian-stretch-32-clang-debug:
+  extends:
+    - .clang-x86-32-build-debug
+    - .container-debian-stretch-32
+
 debian-stretch-32-gcc-debug:
-  extends: .gcc-x86-32-build-debug
-  variables:
-    CONTAINER: debian:stretch-i386
+  extends:
+    - .gcc-x86-32-build-debug
+    - .container-debian-stretch-32
 
 debian-buster-gcc-ibt:
-  extends: .gcc-x86-64-build
+  extends:
+    - .gcc-x86-64-build
   variables:
     CONTAINER: debian:buster-gcc-ibt
     RANDCONFIG: y
     EXTRA_FIXED_RANDCONFIG: |
       CONFIG_XEN_IBT=y
 
-debian-unstable-clang:
-  extends: .clang-x86-64-build
+.container-debian-unstable:
   variables:
     CONTAINER: debian:unstable
 
+debian-unstable-clang:
+  extends:
+    - .clang-x86-64-build
+    - .container-debian-unstable
+
 debian-unstable-clang-debug:
-  extends: .clang-x86-64-build-debug
-  variables:
-    CONTAINER: debian:unstable
+  extends:
+    - .clang-x86-64-build-debug
+    - .container-debian-unstable
 
 debian-unstable-gcc:
-  extends: .gcc-x86-64-build
-  variables:
-    CONTAINER: debian:unstable
+  extends:
+    - .gcc-x86-64-build
+    - .container-debian-unstable
 
 debian-unstable-gcc-debug:
-  extends: .gcc-x86-64-build-debug
-  variables:
-    CONTAINER: debian:unstable
+  extends:
+    - .gcc-x86-64-build-debug
+    - .container-debian-unstable
 
 debian-unstable-gcc-randconfig:
-  extends: .gcc-x86-64-build
+  extends:
+    - .gcc-x86-64-build
+    - .container-debian-unstable
   variables:
-    CONTAINER: debian:unstable
     RANDCONFIG: y
 
 debian-unstable-gcc-debug-randconfig:
-  extends: .gcc-x86-64-build-debug
+  extends:
+    - .gcc-x86-64-build-debug
+    - .container-debian-unstable
   variables:
-    CONTAINER: debian:unstable
     RANDCONFIG: y
 
-debian-unstable-32-clang-debug:
-  extends: .clang-x86-32-build-debug
+.container-debian-unstable-32:
   variables:
     CONTAINER: debian:unstable-i386
 
+debian-unstable-32-clang-debug:
+  extends:
+    - .clang-x86-32-build-debug
+    - .container-debian-unstable-32
+
 debian-unstable-32-gcc-debug:
-  extends: .gcc-x86-32-build-debug
-  variables:
-    CONTAINER: debian:unstable-i386
+  extends:
+    - .gcc-x86-32-build-debug
+    - .container-debian-unstable-32
 
 fedora-gcc:
-  extends: .gcc-x86-64-build
+  extends:
+    - .gcc-x86-64-build
   variables:
     CONTAINER: fedora:29
 
 fedora-gcc-debug:
-  extends: .gcc-x86-64-build-debug
+  extends:
+    - .gcc-x86-64-build-debug
   variables:
     CONTAINER: fedora:29
 
 # Ubuntu Trusty's Clang is 3.4 while Xen requires 3.5
 
-ubuntu-trusty-gcc:
-  extends: .gcc-x86-64-build
+.container-ubuntu-trusty:
   variables:
     CONTAINER: ubuntu:trusty
 
+ubuntu-trusty-gcc:
+  extends:
+    - .gcc-x86-64-build
+    - .container-ubuntu-trusty
+
 ubuntu-trusty-gcc-debug:
-  extends: .gcc-x86-64-build-debug
-  variables:
-    CONTAINER: ubuntu:trusty
+  extends:
+    - .gcc-x86-64-build-debug
+    - .container-ubuntu-trusty
 
-ubuntu-xenial-clang:
-  extends: .clang-x86-64-build
+.container-ubuntu-xenial:
   variables:
     CONTAINER: ubuntu:xenial
 
+ubuntu-xenial-clang:
+  extends:
+    - .clang-x86-64-build
+    - .container-ubuntu-xenial
+
 ubuntu-xenial-clang-debug:
-  extends: .clang-x86-64-build-debug
-  variables:
-    CONTAINER: ubuntu:xenial
+  extends:
+    - .clang-x86-64-build-debug
+    - .container-ubuntu-xenial
 
 ubuntu-xenial-gcc:
-  extends: .gcc-x86-64-build
-  variables:
-    CONTAINER: ubuntu:xenial
+  extends:
+    - .gcc-x86-64-build
+    - .container-ubuntu-xenial
 
 ubuntu-xenial-gcc-debug:
-  extends: .gcc-x86-64-build-debug
-  variables:
-    CONTAINER: ubuntu:xenial
+  extends:
+    - .gcc-x86-64-build-debug
+    - .container-ubuntu-xenial
 
-ubuntu-bionic-clang:
-  extends: .clang-x86-64-build
+.container-ubuntu-bionic:
   variables:
     CONTAINER: ubuntu:bionic
 
+ubuntu-bionic-clang:
+  extends:
+    - .clang-x86-64-build
+    - .container-ubuntu-bionic
+
 ubuntu-bionic-clang-debug:
-  extends: .clang-x86-64-build-debug
-  variables:
-    CONTAINER: ubuntu:bionic
+  extends:
+    - .clang-x86-64-build-debug
+    - .container-ubuntu-bionic
 
 ubuntu-bionic-gcc:
-  extends: .gcc-x86-64-build
-  variables:
-    CONTAINER: ubuntu:bionic
+  extends:
+    - .gcc-x86-64-build
+    - .container-ubuntu-bionic
 
 ubuntu-bionic-gcc-debug:
-  extends: .gcc-x86-64-build-debug
-  variables:
-    CONTAINER: ubuntu:bionic
+  extends:
+    - .gcc-x86-64-build-debug
+    - .container-ubuntu-bionic
 
-ubuntu-focal-gcc:
-  extends: .gcc-x86-64-build
+.container-ubuntu-focal:
   variables:
     CONTAINER: ubuntu:focal
 
+ubuntu-focal-gcc:
+  extends:
+    - .gcc-x86-64-build
+    - .container-ubuntu-focal
+
 ubuntu-focal-gcc-debug:
-  extends: .gcc-x86-64-build-debug
-  variables:
-    CONTAINER: ubuntu:focal
+  extends:
+    - .gcc-x86-64-build-debug
+    - .container-ubuntu-focal
 
 ubuntu-focal-clang:
-  extends: .clang-x86-64-build
-  variables:
-    CONTAINER: ubuntu:focal
+  extends:
+    - .clang-x86-64-build
+    - .container-ubuntu-focal
 
 ubuntu-focal-clang-debug:
-  extends: .clang-x86-64-build-debug
-  variables:
-    CONTAINER: ubuntu:focal
+  extends:
+    - .clang-x86-64-build-debug
+    - .container-ubuntu-focal
 
 opensuse-leap-clang:
-  extends: .clang-x86-64-build
+  extends:
+    - .clang-x86-64-build
   variables:
     CONTAINER: suse:opensuse-leap
 
 opensuse-leap-clang-debug:
-  extends: .clang-x86-64-build-debug
+  extends:
+    - .clang-x86-64-build-debug
   variables:
     CONTAINER: suse:opensuse-leap
 
 opensuse-leap-gcc:
-  extends: .gcc-x86-64-build
+  extends:
+    - .gcc-x86-64-build
   variables:
     CONTAINER: suse:opensuse-leap
 
 opensuse-leap-gcc-debug:
-  extends: .gcc-x86-64-build-debug
+  extends:
+    - .gcc-x86-64-build-debug
   variables:
     CONTAINER: suse:opensuse-leap
 
 opensuse-tumbleweed-clang:
-  extends: .clang-x86-64-build
+  extends:
+    - .clang-x86-64-build
   variables:
     CONTAINER: suse:opensuse-tumbleweed
   allow_failure: true
 
 opensuse-tumbleweed-clang-debug:
-  extends: .clang-x86-64-build-debug
+  extends:
+    - .clang-x86-64-build-debug
   variables:
     CONTAINER: suse:opensuse-tumbleweed
   allow_failure: true
 
 opensuse-tumbleweed-gcc:
-  extends: .gcc-x86-64-build
+  extends:
+    - .gcc-x86-64-build
   variables:
     CONTAINER: suse:opensuse-tumbleweed
   allow_failure: true
 
 opensuse-tumbleweed-gcc-debug:
-  extends: .gcc-x86-64-build-debug
+  extends:
+    - .gcc-x86-64-build-debug
   variables:
     CONTAINER: suse:opensuse-tumbleweed
   allow_failure: true
 
 alpine-3.12-gcc:
-  extends: .gcc-x86-64-build
+  extends:
+    - .gcc-x86-64-build
   variables:
     CONTAINER: alpine:3.12
 
 alpine-3.12-gcc-debug:
-  extends: .gcc-x86-64-build-debug
+  extends:
+    - .gcc-x86-64-build-debug
   variables:
     CONTAINER: alpine:3.12
 
 alpine-3.12-clang:
-  extends: .clang-x86-64-build
+  extends:
+    - .clang-x86-64-build
   variables:
     CONTAINER: alpine:3.12
 
 alpine-3.12-clang-debug:
-  extends: .clang-x86-64-build-debug
+  extends:
+    - .clang-x86-64-build-debug
   variables:
     CONTAINER: alpine:3.12
 
 # Arm32 cross-build
 
 debian-unstable-gcc-arm32:
-  extends: .gcc-arm32-cross-build
+  extends:
+    - .gcc-arm32-cross-build
   variables:
     CONTAINER: debian:unstable-arm64v8-arm32-gcc
     HYPERVISOR_ONLY: y
 
 debian-unstable-gcc-arm32-debug:
-  extends: .gcc-arm32-cross-build-debug
+  extends:
+    - .gcc-arm32-cross-build-debug
   variables:
     CONTAINER: debian:unstable-arm64v8-arm32-gcc
     HYPERVISOR_ONLY: y
 
 debian-unstable-gcc-arm32-randconfig:
-  extends: .gcc-arm32-cross-build
+  extends:
+    - .gcc-arm32-cross-build
   variables:
     CONTAINER: debian:unstable-arm64v8-arm32-gcc
     HYPERVISOR_ONLY: y
     RANDCONFIG: y
 
 debian-unstable-gcc-arm32-debug-randconfig:
-  extends: .gcc-arm32-cross-build-debug
+  extends:
+    - .gcc-arm32-cross-build-debug
   variables:
     CONTAINER: debian:unstable-arm64v8-arm32-gcc
     HYPERVISOR_ONLY: y
@@ -562,51 +623,60 @@ debian-unstable-gcc-arm32-debug-staticmem:
 # Arm builds
 
 debian-unstable-gcc-arm64:
-  extends: .gcc-arm64-build
+  extends:
+    - .gcc-arm64-build
   variables:
     CONTAINER: debian:unstable-arm64v8
 
 debian-unstable-gcc-debug-arm64:
-  extends: .gcc-arm64-build-debug
+  extends:
+    - .gcc-arm64-build-debug
   variables:
     CONTAINER: debian:unstable-arm64v8
 
 debian-unstable-gcc-arm64-randconfig:
-  extends: .gcc-arm64-build
+  extends:
+    - .gcc-arm64-build
   variables:
     CONTAINER: debian:unstable-arm64v8
     RANDCONFIG: y
 
 debian-unstable-gcc-debug-arm64-randconfig:
-  extends: .gcc-arm64-build-debug
+  extends:
+    - .gcc-arm64-build-debug
   variables:
     CONTAINER: debian:unstable-arm64v8
     RANDCONFIG: y
 
 alpine-3.12-gcc-arm64:
-  extends: .gcc-arm64-build
+  extends:
+    - .gcc-arm64-build
   variables:
     CONTAINER: alpine:3.12-arm64v8
 
 alpine-3.12-gcc-debug-arm64:
-  extends: .gcc-arm64-build-debug
+  extends:
+    - .gcc-arm64-build-debug
   variables:
     CONTAINER: alpine:3.12-arm64v8
 
 alpine-3.12-gcc-arm64-randconfig:
-  extends: .gcc-arm64-build
+  extends:
+    - .gcc-arm64-build
   variables:
     CONTAINER: alpine:3.12-arm64v8
     RANDCONFIG: y
 
 alpine-3.12-gcc-debug-arm64-randconfig:
-  extends: .gcc-arm64-build-debug
+  extends:
+    - .gcc-arm64-build-debug
   variables:
     CONTAINER: alpine:3.12-arm64v8
     RANDCONFIG: y
 
 alpine-3.12-gcc-arm64-staticmem:
-  extends: .gcc-arm64-build
+  extends:
+    - .gcc-arm64-build
   variables:
     CONTAINER: alpine:3.12-arm64v8
     EXTRA_XEN_CONFIG: |
@@ -615,7 +685,8 @@ alpine-3.12-gcc-arm64-staticmem:
       CONFIG_STATIC_MEMORY=y
 
 alpine-3.12-gcc-debug-arm64-staticmem:
-  extends: .gcc-arm64-build-debug
+  extends:
+    - .gcc-arm64-build-debug
   variables:
     CONTAINER: alpine:3.12-arm64v8
     EXTRA_XEN_CONFIG: |
@@ -624,7 +695,8 @@ alpine-3.12-gcc-debug-arm64-staticmem:
       CONFIG_STATIC_MEMORY=y
 
 alpine-3.12-gcc-arm64-boot-cpupools:
-  extends: .gcc-arm64-build
+  extends:
+    - .gcc-arm64-build
   variables:
     CONTAINER: alpine:3.12-arm64v8
     EXTRA_XEN_CONFIG: |
@@ -634,7 +706,8 @@ alpine-3.12-gcc-arm64-boot-cpupools:
       CONFIG_BOOT_TIME_CPUPOOLS=y
 
 alpine-3.12-gcc-debug-arm64-boot-cpupools:
-  extends: .gcc-arm64-build-debug
+  extends:
+    - .gcc-arm64-build-debug
   variables:
     CONTAINER: alpine:3.12-arm64v8
     EXTRA_XEN_CONFIG: |
@@ -642,21 +715,24 @@ alpine-3.12-gcc-debug-arm64-boot-cpupools:
 
 # RISC-V 64 cross-build
 archlinux-current-gcc-riscv64:
-  extends: .gcc-riscv64-cross-build
+  extends:
+    - .gcc-riscv64-cross-build
   variables:
     CONTAINER: archlinux:current-riscv64
     KBUILD_DEFCONFIG: tiny64_defconfig
     HYPERVISOR_ONLY: y
 
 archlinux-current-gcc-riscv64-debug:
-  extends: .gcc-riscv64-cross-build-debug
+  extends:
+    - .gcc-riscv64-cross-build-debug
   variables:
     CONTAINER: archlinux:current-riscv64
     KBUILD_DEFCONFIG: tiny64_defconfig
     HYPERVISOR_ONLY: y
 
 archlinux-current-gcc-riscv64-randconfig:
-  extends: .gcc-riscv64-cross-build
+  extends:
+    - .gcc-riscv64-cross-build
   variables:
     CONTAINER: archlinux:current-riscv64
     KBUILD_DEFCONFIG: tiny64_defconfig
@@ -665,7 +741,8 @@ archlinux-current-gcc-riscv64-randconfig:
       CONFIG_COVERAGE=n
 
 archlinux-current-gcc-riscv64-debug-randconfig:
-  extends: .gcc-riscv64-cross-build-debug
+  extends:
+    - .gcc-riscv64-cross-build-debug
   variables:
     CONTAINER: archlinux:current-riscv64
     KBUILD_DEFCONFIG: tiny64_defconfig
