From nobody Sat May 11 23:06:36 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1627038492; cv=none; d=zohomail.com; s=zohoarc; b=b23jCUmwqDFyeF/2fHVvFgNgk8ElG1OoKBDzr/Lj6NqptUepUXD1da3huh088ekpeQU1676qa9u+I0RiwMJt02G6yk1AQUQgOib88iX5vnuqWVHf+GPSIdMmUWdIJlY2JGgtXPwa3/EI5GlC3lFJsgXEmVPtuzRhUsmCT++u1CU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1627038492; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=uuNQOS7IFKHEZ6XIucVdSxVJJVJQXJSBvjsX07/cOh8=; b=QTk2/7IXfKvj63FOxuZToqGY8rDDmC7JeJQ3mgSqI/0bf/3RoHReguHu8SRGQGM/WCkv6wpGD9mdEuwVkLfZW668L6RnDbV+m1U9LNjkr0thXJlXn0tiKsJNRc/Q1+TnbbM3HdDJ5ajS42Q9EQrxlM8/RcKYRiEIU+cYjXJrUG0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1627038492506437.10378884682495; Fri, 23 Jul 2021 04:08:12 -0700 (PDT) Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-59-vI8QX_TKMcGeepz_DpaWmg-1; Fri, 23 Jul 2021 07:08:08 -0400 Received: by mail-wr1-f71.google.com with SMTP id d14-20020adfe2ce0000b029013a357d7bdcso835465wrj.18 for ; Fri, 23 Jul 2021 04:08:08 -0700 (PDT) Return-Path: Return-Path: Received: from x1w.. (122.red-83-42-66.dynamicip.rima-tde.net. [83.42.66.122]) by smtp.gmail.com with ESMTPSA id z6sm5496223wmp.1.2021.07.23.04.08.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Jul 2021 04:08:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1627038491; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=uuNQOS7IFKHEZ6XIucVdSxVJJVJQXJSBvjsX07/cOh8=; b=YaUwKgd8JAeI6T6T6l5cyE4jRZkfRaHvZn6nIxbhu/OkEP2fAdLxxEBYZGn/SFXeXVanIS U6NGckHxiDsoo5/XdxmNO10sNn83Ovl8nMpuHC5Gmo9l1LzM8NZ43tFpablrVpwBJiIc54 HJ1NP3R0qNYqBDXX0JZg3uethHRONdw= X-MC-Unique: vI8QX_TKMcGeepz_DpaWmg-1 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=uuNQOS7IFKHEZ6XIucVdSxVJJVJQXJSBvjsX07/cOh8=; b=r2zIMUIBeUMC8zNccS32ki4s3aFz7tl+R2AT8h7KbNxpxIyGRDR0R9kRukhQbPd2UO LKc768nrBaPV0CvtPnMI8XcQYDtKot2DHyQ9P7APoshvqMyw9Cv0V7UfcDQfdTvlYzMl z1NQWJMiQq3NnIpY1nGFvlV54wKA73579gC74tqmtMfzo5Ehqq0Hu5ac4gGqX7WqilHq /KcEyvmRcIVWW8tUh1pQaUOySV+Xtz99MHZp6zUhSbvhyowpnB253Dcbyx/nA9Z4Un07 /YTSVYroxLoXlW43Hf3yHqqjzayakjLwfGm433qzEtKZwe335fwrWbTGA4XXOgHGpVYV 1k6A== X-Gm-Message-State: AOAM530G2rBcmdPZKANiRrwoSnbxxo6nbOcgeG7Nw+iC4P+tcchrNTSu 9Ih0Zvr3tTsYXZ8yJiWZTTniduOFm/jjAqi1mL+vRSfW0d9GsXuUKD9jlNsOU9RKcN5iU4iQVMu rd1kLw5F6NMTeog== X-Received: by 2002:a5d:6d8f:: with SMTP id l15mr4676567wrs.158.1627038487347; Fri, 23 Jul 2021 04:08:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxP3mG+GuXTevCVV0LTYjQ9ixYNMx2XAwCl0CaOZlkJWlY6CY1X3JMumFu2kgTgoxcMWDjxZw== X-Received: by 2002:a5d:6d8f:: with SMTP id l15mr4676533wrs.158.1627038487135; Fri, 23 Jul 2021 04:08:07 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Willian Rampazzo , =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= , Thomas Huth , Bin Meng , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Wainer dos Santos Moschetta , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH-for-6.1 v3 1/4] docs: Document GitLab custom CI/CD variables Date: Fri, 23 Jul 2021 13:07:57 +0200 Message-Id: <20210723110800.855648-2-philmd@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210723110800.855648-1-philmd@redhat.com> References: <20210723110800.855648-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1627038492941100001 We introduced the QEMU_CI_AVOCADO_TESTING variable in commit f56bf4caf ("gitlab: Run Avocado tests manually (except mainstream CI)"), but forgot to document it properly. Do it now. Suggested-by: Thomas Huth Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Daniel P. Berrang=C3=A9 --- docs/devel/ci.rst | 40 ++++++++++++++++++++++++++++++++++++++++ .gitlab-ci.yml | 19 ++----------------- 2 files changed, 42 insertions(+), 17 deletions(-) diff --git a/docs/devel/ci.rst b/docs/devel/ci.rst index b3bf3ef615b..53df04afb7f 100644 --- a/docs/devel/ci.rst +++ b/docs/devel/ci.rst @@ -8,6 +8,46 @@ found at:: =20 https://wiki.qemu.org/Testing/CI =20 +Custom CI/CD variables +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + +QEMU CI pipelines can be tuned setting some CI environment variables. + +Set variable globally in the user's CI namespace +------------------------------------------------ + +Variables can be set globally in the user's CI namespace setting. + +For further information about how to set these variables, please refer to:: + + https://docs.gitlab.com/ee/ci/variables/#create-a-custom-variable-in-the= -ui + +Set variable manually when pushing a branch or tag to the user's repository +--------------------------------------------------------------------------- + +Variables can be set manually when pushing a branch or tag, using +git-push command line arguments. + +Example setting the QEMU_CI_EXAMPLE_VAR variable: + +.. code:: + + git push -o ci.variable=3D"QEMU_CI_EXAMPLE_VAR=3Dvalue" myrepo mybranch + +For further information about how to set these variables, please refer to:: + + https://docs.gitlab.com/ee/user/project/push_options.html#push-options-f= or-gitlab-cicd + +Here is a list of the most used variables: + +QEMU_CI_AVOCADO_TESTING +~~~~~~~~~~~~~~~~~~~~~~~ +By default, tests using the Avocado framework are not run automatically in +the pipelines (because multiple artifacts have to be downloaded, and if +these artifacts are not already cached, downloading them make the jobs +reach the timeout limit). Set this variable to have the tests using the +Avocado framework run automatically. + Jobs on Custom Runners =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6dc5385e697..9762dda2ee3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -16,24 +16,9 @@ # QEMU CI jobs are based on templates. Some templates provide # user-configurable options, modifiable via configuration variables. # -# These variables can be set globally in the user's CI namespace -# setting: -# https://docs.gitlab.com/ee/ci/variables/#create-a-custom-variable-in-the= -ui -# or set manually each time a branch/tag is pushed, as a git-push -# command line argument: -# https://docs.gitlab.com/ee/user/project/push_options.html#push-options-f= or-gitlab-cicd +# See https://qemu-project.gitlab.io/qemu/devel/ci.html#custom-ci-cd-varia= bles +# for more information. # -# Example setting the QEMU_CI_EXAMPLE_VAR variable: -# -# git push -o ci.variable=3D"QEMU_CI_EXAMPLE_VAR=3Dvalue" myrepo mybranch -# -# ---------------------------------------------------------------------- -# -# List of environment variables that can be use to modify the set -# of jobs selected: -# -# - QEMU_CI_AVOCADO_TESTING -# If set, tests using the Avocado framework will be run =20 include: - local: '/.gitlab-ci.d/qemu-project.yml' --=20 2.31.1 From nobody Sat May 11 23:06:36 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1627038495; cv=none; d=zohomail.com; s=zohoarc; b=RxWMGw0dnvnFuGa7FWUcIYy8huvp2+xmILlU1KjWerruCD+okaNc81+0lsYB0dgFjLExC0bxCGESPRuXpPzGvAu2twlvyQ8ybkKvoJetsSJ5waWyatVtgCD3lhyVX/wbKQOkjrCMKj52V6jWafLpqlY1wtlRzQZzSvaPrQYi65I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1627038495; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=v8MzHpNZAnKpENgpYi7cnpOvXuv0pKcpWhVnCTIEAsU=; b=j6YMfoR4g4L0fFW2LXWYJBxmCOUPwfiFcjWqj40Rhn1erkl6d77z6/RfIwbWXib+Dw/j2OHuh6XEDWl/SuqwWZkMtGtjK3m696cWpSLUQQnVXzoXlpGKKuRtHBRmHCLn/+Y8odJqD1CYRo53NGT7Ol5j1FVmVxzKdAbePIAW/yQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1627038495048778.1900666141053; Fri, 23 Jul 2021 04:08:15 -0700 (PDT) Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-261-O5yEKVr5MjqiaiFjfTK4fg-1; Fri, 23 Jul 2021 07:08:12 -0400 Received: by mail-wr1-f69.google.com with SMTP id l14-20020a5d560e0000b029013e2b4ee624so897864wrv.1 for ; Fri, 23 Jul 2021 04:08:12 -0700 (PDT) Return-Path: Return-Path: Received: from x1w.. (122.red-83-42-66.dynamicip.rima-tde.net. [83.42.66.122]) by smtp.gmail.com with ESMTPSA id d203sm179149wmd.38.2021.07.23.04.08.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Jul 2021 04:08:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1627038494; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=v8MzHpNZAnKpENgpYi7cnpOvXuv0pKcpWhVnCTIEAsU=; b=OyAGK3sd2uw7bWmckZFNXj8q1/J0Zf5wO/n6oyy+W4ebh7ayyNrrs0jtttOI09sBGbai36 JUFErG0E9tLGog1D7Ncv249Ww6NQ0U2WvugPxBDricJREhsDGhvit04DyLCiQyn26XNaqE cnshmoGv+7T7vjc/nvBaK/UFSxVhetQ= X-MC-Unique: O5yEKVr5MjqiaiFjfTK4fg-1 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=v8MzHpNZAnKpENgpYi7cnpOvXuv0pKcpWhVnCTIEAsU=; b=gOzYhA7ehaOHW4NawcnCeutL6YtiQHEMRVvy/wbt8vMaw9m6XdeEiYW5+martzCtoy c6281TNhyOxn87t8N1/nMaDAcH/RPpEaJiokxLu8b7tHKiTnuLGFvPbk4B1zfklpy5Z1 KU9QojiavFEKXGjtcL+S1aor2Ww6Xwb0vUiXXOd+YtE3H5BBk8+dTDm1R6GpzpL7jhD8 cBtq94qowgH6K4GkiykWe6oxxr5WQTsPcuJKsuG7lFNQKzF6vAB2npJ6aTEcsJhC17uE xZneDCmMT6sHtRpMPrK5jSC/CxgT9189GRlNGQw10j2r2IeSOAWMTaiEtk531UaX3cp9 LTmA== X-Gm-Message-State: AOAM530SVQeZylBCPFYME8Io/IHr/AsORJ8IRd9VWaRiTUoVsFYkYhjk UiYvbgW8diAry1lIY5ngzNH/P5qbvSjFE347nAdXTBZpjB8k4PmigkbVbKnVT0dJlQvVui/ELiD 5TS2yx7Zg4/NxqQ== X-Received: by 2002:a5d:4010:: with SMTP id n16mr4703098wrp.142.1627038491869; Fri, 23 Jul 2021 04:08:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxyzxjfYrFb6YXdKI3FuaKZZGzKz5awc0OnzJj5PlESIoVPcV1ZPhyUj/nONmLtDglRp+09MA== X-Received: by 2002:a5d:4010:: with SMTP id n16mr4703072wrp.142.1627038491670; Fri, 23 Jul 2021 04:08:11 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Willian Rampazzo , =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= , Thomas Huth , Bin Meng , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Wainer dos Santos Moschetta , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH-for-6.1 v3 2/4] gitlab-ci: Fix 'when:' condition in acceptance_test_job_template Date: Fri, 23 Jul 2021 13:07:58 +0200 Message-Id: <20210723110800.855648-3-philmd@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210723110800.855648-1-philmd@redhat.com> References: <20210723110800.855648-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1627038497102100001 Jobs depending on another should not use the 'when: always' condition, because if a dependency failed we should not keep running jobs depending on it. The correct condition is 'when: on_success'. Fixes: f56bf4caf71 ("gitlab: Run Avocado tests manually (except mainstream = CI)") Reported-by: Daniel P. Berrang=C3=A9 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Daniel P. Berrang=C3=A9 --- .gitlab-ci.d/buildtest-template.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.d/buildtest-template.yml b/.gitlab-ci.d/buildtest-t= emplate.yml index 3e3e19d96bd..fcbcc4e627a 100644 --- a/.gitlab-ci.d/buildtest-template.yml +++ b/.gitlab-ci.d/buildtest-template.yml @@ -73,9 +73,9 @@ # in its namespace setting or via git-push option, see documentation # in /.gitlab-ci.yml of this repository). - if: '$CI_PROJECT_NAMESPACE =3D=3D "qemu-project"' - when: always + when: on_success - if: '$QEMU_CI_AVOCADO_TESTING' - when: always + when: on_success # Otherwise, set to manual (the jobs are created but not run). - when: manual allow_failure: true --=20 2.31.1 From nobody Sat May 11 23:06:36 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1627038499; cv=none; d=zohomail.com; s=zohoarc; b=Mns+R6iOVh6NTj79T/4ezJaMnyjliWETYtAZCf5uvu5C3n+p/jCffGBMDPnsgsEuhYgCTdjIwTjYztQmGMnk97Lj9kxCdEqe3aBR706eRYfYmcsuS6Zidx/COMhuBZyFL6OyKpGnCObOIYMHgXS7KEUWFFI4KLDSuMFSnWOK2dc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1627038499; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=XidfJlF9uLw0ONlJoTjRYGZYc29iEXG+CBqqwyBgpGk=; b=aaB2KBl5gKgzdFl0MDCW0qMn9L2BU0gQQhJCMHEdQvmqRWVWQDlaQO1MpHHEdjxJwJJ0ABAj/Q8GWDe37CTfDKin1nweGEzef/f9/nUj4kLCrCotjMB6mmJA1b91Q61OBL7IvmZdcu4BP8ho3FUnOCxWL4sZhL5MivI4uBp3Xfg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1627038499809161.1207862969037; Fri, 23 Jul 2021 04:08:19 -0700 (PDT) Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-30-vMy6k0cPOryLbVfl-qzdFQ-1; Fri, 23 Jul 2021 07:08:17 -0400 Received: by mail-wm1-f71.google.com with SMTP id k4-20020a05600c1c84b0290210c73f067aso93301wms.6 for ; Fri, 23 Jul 2021 04:08:17 -0700 (PDT) Return-Path: Return-Path: Received: from x1w.. (122.red-83-42-66.dynamicip.rima-tde.net. [83.42.66.122]) by smtp.gmail.com with ESMTPSA id a10sm32157785wrm.12.2021.07.23.04.08.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Jul 2021 04:08:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1627038498; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XidfJlF9uLw0ONlJoTjRYGZYc29iEXG+CBqqwyBgpGk=; b=H26cPRA2T9rYZv0qxcfkmkssvWgnOiP5ZBj1wrWExX+29DcOFlYptvN3J7C1Nga2RWWY48 ewElNWPqtlMEGv3ePyBNP98xjpF8Cs1PI7lyWpNd8q10gj1AzeOmvnuiiRHtYBHwua6DfM fZaCMu3fIF0fAf6v1A0mAbB0TBtL6Aw= X-MC-Unique: vMy6k0cPOryLbVfl-qzdFQ-1 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=XidfJlF9uLw0ONlJoTjRYGZYc29iEXG+CBqqwyBgpGk=; b=QEtdETmXPtyytgExKeDmtUM2taTxqC50AjwtixYGkqighglCXvTwH8CuhFW1ES2Jal AMkjpzm3Yr71S/SbdDzJEn3i1YyNTZZEgkrVgjYLQXN/3Grd9G0z725ilGqpVfG2bwqx GVRvXiNhonvBt81JCIdINtBfUjH2gPmqKjiudhUeOUoeCtmsou870/mEGCvnlHLyJImU Q6XriH9tf3EQCA7KJUp3TlhP/2Ae0PbrgT6AmhZkKPR+OzOna4nPHIPKYJr9g66msLnX nmJvJsZg5edGC7b3+JylK9UDUgcASFDKSHxjT6sUlD4Sc2gOxuovZnM8YZN3rUvXwxhu Zovw== X-Gm-Message-State: AOAM533GQj77MRjwOhm4mp8yS8+qkiTgIFdRHyv0V5awD/LsO97vEZrg Dob9dBeTr6WCUMpZJJb9TJorawfX5HuDi65Rzpw/wurpX+YXLcx03Fh/OYM9EEFubIEJdVaGmqI 8OSHsH5vV8jkuhg== X-Received: by 2002:a1c:1dcf:: with SMTP id d198mr243039wmd.103.1627038496322; Fri, 23 Jul 2021 04:08:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyev2IvkcNXfbbBaa+H25DPErEH/dkOuryws+ARsaH/OFnHtfOHxpbWWxNt84luxEZ2GYPKww== X-Received: by 2002:a1c:1dcf:: with SMTP id d198mr243018wmd.103.1627038496162; Fri, 23 Jul 2021 04:08:16 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Willian Rampazzo , =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= , Thomas Huth , Bin Meng , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Wainer dos Santos Moschetta , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH-for-6.1 v3 3/4] gitlab-ci: Fix 'when:' condition in EDK2 jobs Date: Fri, 23 Jul 2021 13:07:59 +0200 Message-Id: <20210723110800.855648-4-philmd@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210723110800.855648-1-philmd@redhat.com> References: <20210723110800.855648-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1627038501596100001 Jobs depending on another should not use the 'when: always' condition, because if a dependency failed we should not keep running jobs depending on it. The correct condition is 'when: on_success'. Fixes: 71920809cea ("gitlab-ci.yml: Add jobs to build EDK2 firmware binarie= s") Reported-by: Daniel P. Berrang=C3=A9 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Daniel P. Berrang=C3=A9 --- .gitlab-ci.d/edk2.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.d/edk2.yml b/.gitlab-ci.d/edk2.yml index aae2f7ad880..62497ba47fb 100644 --- a/.gitlab-ci.d/edk2.yml +++ b/.gitlab-ci.d/edk2.yml @@ -8,11 +8,11 @@ - .gitlab-ci.d/edk2/Dockerfile # or roms/edk2/ is modified (submodule updated) - roms/edk2/* - when: always + when: on_success - if: '$CI_COMMIT_REF_NAME =3D~ /^edk2/' # or the branch/tag starts with = 'edk2' - when: always + when: on_success - if: '$CI_COMMIT_MESSAGE =3D~ /edk2/i' # or last commit description cont= ains 'EDK2' - when: always + when: on_success =20 docker-edk2: extends: .edk2_job_rules --=20 2.31.1 From nobody Sat May 11 23:06:36 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1627038504; cv=none; d=zohomail.com; s=zohoarc; b=lauJhQ42LG3TDQtJUI7TVnNLXVO1G4xel+QORTHo9FkZjpPhSAokq4YO//S8VYb36nDjxb7fLBCxTJCXZjh7Yl59ib2E8wyRBZcHjjzEzpRU29VuCxHl3OjNj4ZJGAqxb9q/S+YUvnRrfD/CnKEEyYkHuj7bVcUB1/xk90KM8FQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1627038504; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=MgVf1UaIIsKpWFBNlJub9Vl0Re2X6ZB97rXqZyhYWzE=; b=FqFa6gnN3/NRne+9yOHVMr67QccVMa04s03AMlUDIsqBHIVJVinM7Pj+ERe+KIi4UP0DYRzA31S9vquEUHSFXnvXoiVcqmxU6E9W/OVMrtaWJW7UrCGQ4aEMer0SvLHumqNUy7CfVu0haQdcXWEl0aB0dYztnxHyhxz+/Awj9Dk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1627038504872285.79385546486935; Fri, 23 Jul 2021 04:08:24 -0700 (PDT) Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-9-6uH5ojsOOn-s6Cm2dZZ9Kg-1; Fri, 23 Jul 2021 07:08:22 -0400 Received: by mail-wm1-f70.google.com with SMTP id n7-20020a05600c3b87b029024e59a633baso274913wms.5 for ; Fri, 23 Jul 2021 04:08:21 -0700 (PDT) Return-Path: Return-Path: Received: from x1w.. (122.red-83-42-66.dynamicip.rima-tde.net. [83.42.66.122]) by smtp.gmail.com with ESMTPSA id d5sm542167wre.77.2021.07.23.04.08.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Jul 2021 04:08:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1627038503; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=MgVf1UaIIsKpWFBNlJub9Vl0Re2X6ZB97rXqZyhYWzE=; b=UmQT5bbXcmPpSBNMk54hyYJwf3LG3QbRKJF7orUDC4twmsdGDlamZDp+ycNj4ELd2//Nh6 /eUHg4c+aVCzkk/MIqw5Yn9sF2BfFqGnbcj6KjfOg61EULtxlWxdCFf2YgZgL/ShdxicbW B/w/33BuHk5+Yo1QSdgdyFZTrSUJedg= X-MC-Unique: 6uH5ojsOOn-s6Cm2dZZ9Kg-1 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=MgVf1UaIIsKpWFBNlJub9Vl0Re2X6ZB97rXqZyhYWzE=; b=NG03pC6zIsAI8eZGXH4ti4MkCZ/By8BIX1Ld4rC20+55dUm0X8f7Qcq3mG9dLr+Qw+ /uW+f4J5j0Ln9uVA4E1Mmvad9SeeqS8dvdp2t+BeCyJB9uD9R86EhdNi6abkP7JTXSKx xxkzXdk3OC8FM6V+7IvwealLyCYbO/T1LEMjsoqcS3yPtlt8NM9/oXakTRrF7pOo22we Vn8DdJZSwRGdyjQ3W6N+pAsNx8cyYwNygQtspUfNcwIPiNK25PvcHdytNBhkDDMo45ZV CNtkzPlthAHGb1OKytpwFNaFsoLgMAAJvV4QdHMOYORR+sra41qOr9otCcOuzHa3EbTv IpnA== X-Gm-Message-State: AOAM532wbPYfwXrJgGykZPR/IT4teRhW8O4YlE528DtRc7JSk4e9cRkh vxnQczaWAMHkMt5QUih7kodl/LPKg+G09MxnWCH1OZ55hl1raxK2km+H+YD9jnfBplpEHYNswJe D8Hz3pVbWk8Endg== X-Received: by 2002:a1c:ed13:: with SMTP id l19mr3073085wmh.48.1627038500912; Fri, 23 Jul 2021 04:08:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwTeCidQNnCLQKQpmyQxSYsy+smZFue4QXZlkNqt7Ushhzmbf5mLwkaAy1HjJXHA5ceypXOzg== X-Received: by 2002:a1c:ed13:: with SMTP id l19mr3073053wmh.48.1627038500683; Fri, 23 Jul 2021 04:08:20 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Willian Rampazzo , =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= , Thomas Huth , Bin Meng , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Wainer dos Santos Moschetta , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Cleber Rosa Subject: [PATCH-for-6.1 v3 4/4] gitlab-ci: Extract OpenSBI job rules and fix 'when:' condition Date: Fri, 23 Jul 2021 13:08:00 +0200 Message-Id: <20210723110800.855648-5-philmd@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210723110800.855648-1-philmd@redhat.com> References: <20210723110800.855648-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1627038506239100001 First, all jobs depending on 'docker-opensbi' job must use at most all the rules that triggers it. The simplest way to ensure that is to always use the same rules. Extract all the rules to a reusable section, and include this section (with the 'extends' keyword) in both 'docker-opensbi' and 'build-opensbi' jobs. Second, jobs depending on another should not use the 'when: always' condition, because if a dependency failed we should not keep running jobs depending on it. The correct condition is 'when: on_success'. The problems were introduced in commit c6fc0fc1a71 ("gitlab-ci.yml: Add jobs to build OpenSBI firmware binaries"), but were revealed in commit 91e9c47e50a ("docker: OpenSBI build job depends on OpenSBI container"). This fix is similar to the one used with the EDK2 firmware job in commit ac0595cf6b3 ("gitlab-ci: Extract EDK2 job rules to reusable section"). Reported-by: Daniel P. Berrang=C3=A9 Reviewed-by: Daniel P. Berrang=C3=A9 Reviewed-by: Willian Rampazzo Reviewed-by: Cleber Rosa Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- .gitlab-ci.d/opensbi.yml | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/.gitlab-ci.d/opensbi.yml b/.gitlab-ci.d/opensbi.yml index f66cd1d9089..5e0a2477c5d 100644 --- a/.gitlab-ci.d/opensbi.yml +++ b/.gitlab-ci.d/opensbi.yml @@ -1,10 +1,23 @@ -docker-opensbi: - stage: containers - rules: # Only run this job when the Dockerfile is modified +# All jobs needing docker-opensbi must use the same rules it uses. +.opensbi_job_rules: + rules: # Only run this job when ... - changes: + # this file is modified - .gitlab-ci.d/opensbi.yml + # or the Dockerfile is modified - .gitlab-ci.d/opensbi/Dockerfile - when: always + when: on_success + - changes: # or roms/opensbi/ is modified (submodule updated) + - roms/opensbi/* + when: on_success + - if: '$CI_COMMIT_REF_NAME =3D~ /^opensbi/' # or the branch/tag starts wi= th 'opensbi' + when: on_success + - if: '$CI_COMMIT_MESSAGE =3D~ /opensbi/i' # or last commit description c= ontains 'OpenSBI' + when: on_success + +docker-opensbi: + extends: .opensbi_job_rules + stage: containers image: docker:19.03.1 services: - docker:19.03.1-dind @@ -24,16 +37,9 @@ docker-opensbi: - docker push $IMAGE_TAG =20 build-opensbi: + extends: .opensbi_job_rules stage: build needs: ['docker-opensbi'] - rules: # Only run this job when ... - - changes: # ... roms/opensbi/ is modified (submodule updated) - - roms/opensbi/* - when: always - - if: '$CI_COMMIT_REF_NAME =3D~ /^opensbi/' # or the branch/tag starts wi= th 'opensbi' - when: always - - if: '$CI_COMMIT_MESSAGE =3D~ /opensbi/i' # or last commit description c= ontains 'OpenSBI' - when: always artifacts: paths: # 'artifacts.zip' will contains the following files: - pc-bios/opensbi-riscv32-generic-fw_dynamic.bin --=20 2.31.1