From patchwork Tue Jul 7 07:08:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 234942 Delivered-To: patch@linaro.org Received: by 2002:a92:d244:0:0:0:0:0 with SMTP id v4csp660836ilg; Tue, 7 Jul 2020 00:24:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwJfSO7NF2013jU8GAhkn7Mwk6YhSpIBK22O/LH+tfu7r9sUvZmdefnbfeazf3Mu5hCZ7MM X-Received: by 2002:a25:f204:: with SMTP id i4mr81282943ybe.486.1594106697253; Tue, 07 Jul 2020 00:24:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594106697; cv=none; d=google.com; s=arc-20160816; b=dYw6JLkPgD456PDnFA9bQnzS8rVRMHfGh05/StfDNZBkDV4AY/PytSjpeshcTzCkmB D2C77OsYYybkASOIdtBNIr7lvRNImXN/oNa14QR9Qkk/prHH3cx63QoSw0RYEKPpK9su 5BvaYweqrwA/RO4fwlCzVvvogtFhAkzELY2bWoTUru1QIdHs1E/VStjXQHQU/9W61lUn AVRqImxMPKavO8brGcbPY8t3PIPS0qRerZFWpFyb2gFTQwjMTfmJF5UfJ4JOPKBEb2jR z254PfIC9wAj2EvLKXM3z5TFkZ/w3NO1Y/lkVDu7zMYl2yJNObtu0hFpd4l32On+qMdZ U6Bg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=eRHrZQr4xxHTl8oAYYO/0TefLzk7Y8ib9xGkS3UKuCE=; b=qphti62BJ8Dbp+19Cmtx71yOQsFuIeEbgPX69DROen4GOFhtWTZN48UFmeTkofMk4+ zenPReMUDm74xGGNYo8ej/+8ke49aSOCfrfeHN16Y6JXOEbE8/Dyg1N7bLf/BVKYiwfj aWfbUz5SUxJuu2/tNmzZQgoOiyzpyB5r1t3DComira4OIUuoZQl/OSoQ4m38IwbFz05A c3Ix/FI3tibtgMdzW7peldwrR2D1fN3qrwiqHUnBlGWJuau4Mw7jQWqFtaeuyWDzJUxJ I/WMtQVFzFuveW5qYWBXBOn9q70iSeM3gOzIdDJ6uh/cC/cir4p8c0/gXFhjhnyopjYL 2vnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=fU3LyOAS; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id i24si27597174ybj.388.2020.07.07.00.24.57 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 07 Jul 2020 00:24:57 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=fU3LyOAS; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:52088 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jshyK-0002At-MN for patch@linaro.org; Tue, 07 Jul 2020 03:24:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45938) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jshxu-0001bh-J4 for qemu-devel@nongnu.org; Tue, 07 Jul 2020 03:24:30 -0400 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]:53825) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jshxs-0006gg-GA for qemu-devel@nongnu.org; Tue, 07 Jul 2020 03:24:30 -0400 Received: by mail-wm1-x32a.google.com with SMTP id j18so42153424wmi.3 for ; Tue, 07 Jul 2020 00:24:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=eRHrZQr4xxHTl8oAYYO/0TefLzk7Y8ib9xGkS3UKuCE=; b=fU3LyOASuwUlx1qff9Jk3ntYLstmYpSzeZoKLEC+bc3f6mWZ4G5eQSQVsVn71IzFJr 5Jt63hd0AqxnCqDh1+mG0BjrOgivo9fFAM4qxhLK0WrewF6JYiT9CStvNPX71bVJxQrs 9/sDmP1s4GazBkgjWa++2ruWhhJSgXwehDu5dQs7Bbmkr4/NW8UZBYNgW2mZMO+7ic8k MAAp1kPprAggmdxm4/IZqFLgt+L4KVYszqOtNolmdzEf8IN9NnaTEk6Vn6qnLzba4274 2uQB8KmignVrlTk4ufFfu+4PYUPI6KlxGr4J1MsoLbhyhAvEmS3og3/z5XZglQ3tveMu s+MQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=eRHrZQr4xxHTl8oAYYO/0TefLzk7Y8ib9xGkS3UKuCE=; b=Y0BXS8y0viB301v5HjtRT+vOxvB7Cd2ETKV1g/Oe/vOwEy5Vepf9caNRVGVsYdenGA yXNwgMypsG7CPUK4ebm/vi4hkCy3JcaF/Mz1DLkayeIG5AzjxJ8pU+xnLV4DDxZUWZ5C QCDdrccOIpAfO3gfYK354749al/iVRXvOZrOecnGhAy2W7tPAkEwI6GNnyZYJFpAVcCP 6j/++XenvpX7GLwxiSs7U6RZshfBOMCa8/VnsoF4aYazsKuu4Nxy9jFbymeJmYTvl3p2 VL3eBmdh3qVQHRlLu6kndgs5x0BpILq5EHbX2wkBTYneVChP+/zTi7StAW520hvhOtkZ vFPA== X-Gm-Message-State: AOAM5323K3mCrlNf6Wm7ZC3Zog69pJo2ViLDaPq2hpl7bYDg9EOc/Owr d+aHDkECopg5V5bBGoEd7rgU5Q== X-Received: by 2002:a05:600c:4109:: with SMTP id j9mr2622040wmi.157.1594106667008; Tue, 07 Jul 2020 00:24:27 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id b184sm2343882wmc.20.2020.07.07.00.24.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jul 2020 00:24:22 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 7B75C1FFA9; Tue, 7 Jul 2020 08:09:00 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 19/41] gitlab: build all container images during CI Date: Tue, 7 Jul 2020 08:08:36 +0100 Message-Id: <20200707070858.6622-20-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200707070858.6622-1-alex.bennee@linaro.org> References: <20200707070858.6622-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32a; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32a.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Huth , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , qemu-devel@nongnu.org, Wainer dos Santos Moschetta , =?utf-8?q?Alex_Ben?= =?utf-8?q?n=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Daniel P. Berrangé We have a number of container images in tests/docker/dockerfiles that are intended to provide well defined environments for doing test builds. We want our CI system to use these containers too. This introduces builds of all of them as the first stage in the CI, so that the built containers are available for later build jobs. The containers are setup to use the GitLab container registry as the cache, so we only pay the penalty of the full build when the dockerfiles change. The main qemu-project/qemu repo is used as a second cache, so that users forking QEMU will see a fast turnaround time on their CI jobs. Signed-off-by: Daniel P. Berrangé Message-Id: <20200622153318.751107-3-berrange@redhat.com> [AJB: tweak the tag format] Signed-off-by: Alex Bennée Acked-by: Thomas Huth Message-Id: <20200701135652.1366-22-alex.bennee@linaro.org> -- 2.20.1 diff --git a/.gitlab-ci.d/containers.yml b/.gitlab-ci.d/containers.yml new file mode 100644 index 000000000000..2afd01f1d179 --- /dev/null +++ b/.gitlab-ci.d/containers.yml @@ -0,0 +1,245 @@ +.container_job_template: &container_job_definition + image: docker:stable + stage: containers + services: + - docker:dind + before_script: + - export TAG="$CI_REGISTRY_IMAGE/qemu/$NAME:latest" + - export COMMON_TAG="$CI_REGISTRY/qemu-project/qemu/$NAME:latest" + - docker info + - docker login registry.gitlab.com -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" + script: + - docker pull "$TAG" || docker pull "$COMMON_TAG" || true + - sed -i -e "s,FROM qemu/,FROM $CI_REGISTRY_IMAGE/qemu/," tests/docker/dockerfiles/$NAME.docker + - docker build --cache-from "$TAG" --cache-from "$COMMON_TAG" --tag "$TAG" -f "tests/docker/dockerfiles/$NAME.docker" tests/docker/dockerfiles + - docker push "$TAG" + after_script: + - docker logout + +amd64-centos7-container: + <<: *container_job_definition + variables: + NAME: centos7 + +amd64-centos8-container: + <<: *container_job_definition + variables: + NAME: centos8 + +amd64-debian10-container: + <<: *container_job_definition + variables: + NAME: debian10 + +amd64-debian11-container: + <<: *container_job_definition + variables: + NAME: debian11 + +amd64-debian9-container: + <<: *container_job_definition + variables: + NAME: debian9 + +amd64-debian9-mxe-container: + <<: *container_job_definition + stage: containers-layer2 + needs: ['amd64-debian9-container'] + variables: + NAME: debian9-mxe + +alpha-debian-cross-container: + <<: *container_job_definition + stage: containers-layer2 + needs: ['amd64-debian10-container'] + variables: + NAME: debian-alpha-cross + +amd64-debian-cross-container: + <<: *container_job_definition + stage: containers-layer2 + needs: ['amd64-debian10-container'] + variables: + NAME: debian-amd64-cross + +amd64-debian-container: + <<: *container_job_definition + stage: containers-layer2 + needs: ['amd64-debian10-container'] + variables: + NAME: debian-amd64 + +arm64-debian-cross-container: + <<: *container_job_definition + stage: containers-layer2 + needs: ['amd64-debian10-container'] + variables: + NAME: debian-arm64-cross + +arm64-test-debian-cross-container: + <<: *container_job_definition + stage: containers-layer2 + needs: ['amd64-debian11-container'] + variables: + NAME: debian-arm64-test-cross + +armel-debian-cross-container: + <<: *container_job_definition + stage: containers-layer2 + needs: ['amd64-debian10-container'] + variables: + NAME: debian-armel-cross + +armhf-debian-cross-container: + <<: *container_job_definition + stage: containers-layer2 + needs: ['amd64-debian10-container'] + variables: + NAME: debian-armhf-cross + +hppa-debian-cross-container: + <<: *container_job_definition + stage: containers-layer2 + needs: ['amd64-debian10-container'] + variables: + NAME: debian-hppa-cross + +m68k-debian-cross-container: + <<: *container_job_definition + stage: containers-layer2 + needs: ['amd64-debian10-container'] + variables: + NAME: debian-m68k-cross + +mips64-debian-cross-container: + <<: *container_job_definition + stage: containers-layer2 + needs: ['amd64-debian10-container'] + variables: + NAME: debian-mips64-cross + +mips64el-debian-cross-container: + <<: *container_job_definition + stage: containers-layer2 + needs: ['amd64-debian10-container'] + variables: + NAME: debian-mips64el-cross + +mips-debian-cross-container: + <<: *container_job_definition + stage: containers-layer2 + needs: ['amd64-debian10-container'] + variables: + NAME: debian-mips-cross + +mipsel-debian-cross-container: + <<: *container_job_definition + stage: containers-layer2 + needs: ['amd64-debian10-container'] + variables: + NAME: debian-mipsel-cross + +powerpc-debian-cross-container: + <<: *container_job_definition + stage: containers-layer2 + needs: ['amd64-debian10-container'] + variables: + NAME: debian-powerpc-cross + +ppc64-debian-cross-container: + <<: *container_job_definition + stage: containers-layer2 + needs: ['amd64-debian10-container'] + variables: + NAME: debian-ppc64-cross + +ppc64el-debian-cross-container: + <<: *container_job_definition + stage: containers-layer2 + needs: ['amd64-debian10-container'] + variables: + NAME: debian-ppc64el-cross + +riscv64-debian-cross-container: + <<: *container_job_definition + stage: containers-layer2 + needs: ['amd64-debian10-container'] + variables: + NAME: debian-riscv64-cross + +s390x-debian-cross-container: + <<: *container_job_definition + stage: containers-layer2 + needs: ['amd64-debian10-container'] + variables: + NAME: debian-s390x-cross + +sh4-debian-cross-container: + <<: *container_job_definition + stage: containers-layer2 + needs: ['amd64-debian10-container'] + variables: + NAME: debian-sh4-cross + +sparc64-debian-cross-container: + <<: *container_job_definition + stage: containers-layer2 + needs: ['amd64-debian10-container'] + variables: + NAME: debian-sparc64-cross + +tricore-debian-cross-container: + <<: *container_job_definition + stage: containers-layer2 + needs: ['amd64-debian9-container'] + variables: + NAME: debian-tricore-cross + +win32-debian-cross-container: + <<: *container_job_definition + stage: containers-layer3 + needs: ['amd64-debian9-mxe-container'] + variables: + NAME: debian-win32-cross + +win64-debian-cross-container: + <<: *container_job_definition + stage: containers-layer3 + needs: ['amd64-debian9-mxe-container'] + variables: + NAME: debian-win64-cross + +xtensa-debian-cross-container: + <<: *container_job_definition + variables: + NAME: debian-xtensa-cross + +cris-fedora-cross-container: + <<: *container_job_definition + variables: + NAME: fedora-cris-cross + +amd64-fedora-container: + <<: *container_job_definition + variables: + NAME: fedora + +i386-fedora-cross-container: + <<: *container_job_definition + variables: + NAME: fedora-i386-cross + +amd64-ubuntu1804-container: + <<: *container_job_definition + variables: + NAME: ubuntu1804 + +amd64-ubuntu2004-container: + <<: *container_job_definition + variables: + NAME: ubuntu2004 + +amd64-ubuntu-container: + <<: *container_job_definition + variables: + NAME: ubuntu diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9fdc752ea636..72d688875fd7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,10 +1,13 @@ stages: - containers + - containers-layer2 + - containers-layer3 - build include: - local: '/.gitlab-ci.d/edk2.yml' - local: '/.gitlab-ci.d/opensbi.yml' + - local: '/.gitlab-ci.d/containers.yml' .update_apt_template: &before_script_apt before_script: