From nobody Mon Feb 9 02:28:09 2026 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