From nobody Sat May 18 11:46:49 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=1626799715; cv=none; d=zohomail.com; s=zohoarc; b=BZMDWOeks704xg8Bk2ahM7+laTRYwXbwpG4DnSI19xhFuyR/Q3/t2iZzTLlyVWfNkSV5EhtByBePGLoA/jx50fY8LTRjfoMjIDrALHx3XSbe1kxC4Rmk5b+xYyEXGNnqbKssvBUv/QBTePxCULRz23cfWgcx86+dZWjr3Cvj0J8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1626799715; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:MIME-Version:Message-ID:Subject:To; bh=ifKFT5mDN0/2fYNVh88LtazBrq4yCqRHZAlJRSofaMU=; b=TMN+k3etsdgR0qp+YQ4XkGh57GcUpxszaKwnFTsSEHqPeyqdgIRFgvPVYroWRlXUhGGxL1sRO59H44scv/mi66oHWc4oM2NFNhrMzX6THoiib9NFH6UzCytE2LQ0QG1MTUgr7PmCn/naHwKfaWNPp1LYUEb/fazkb3o0jzjq5mg= 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 1626799715416772.7211186854475; Tue, 20 Jul 2021 09:48:35 -0700 (PDT) Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-415--3uC4G5pOemA0KIK26ZZRg-1; Tue, 20 Jul 2021 12:48:32 -0400 Received: by mail-wr1-f70.google.com with SMTP id z6-20020a5d4c860000b029013a10564614so10567727wrs.15 for ; Tue, 20 Jul 2021 09:48:32 -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 z4sm10290174wrv.40.2021.07.20.09.48.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Jul 2021 09:48:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626799714; 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; bh=ifKFT5mDN0/2fYNVh88LtazBrq4yCqRHZAlJRSofaMU=; b=DzOGJLkiems8hbGtPzF2/eII79wbTH4cpIyOmS5StZbePIKQIOamKM+f63BzIbf/by9nYg 2svmR2sFFWoQK8MdQr73CmHQx6teBRO6TpS2vQWHhv/iWzMQ3tHCCvCAgsCkcN0EZtvvES jTuleZWtJ4ObzWbXMy6LaJXac4ck4J0= X-MC-Unique: -3uC4G5pOemA0KIK26ZZRg-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:mime-version :content-transfer-encoding; bh=ifKFT5mDN0/2fYNVh88LtazBrq4yCqRHZAlJRSofaMU=; b=rswJDw+QAjuwThKkJlQ6lq2wgH/UQ6yWOerLKW0jBsGaKBOOStCx6IEogRKOF3JqjH J6JsoQHkMYVNk6ssB6OvXJD4cVrq4JUqwDpSOdPHwcutWcIE8VhlgbXtUwEY/tXp6vu7 rEA5FLG/RWvG3yOjKt+OIpAoOdPNGcpOoSoj0AXAHyoyw3ZLfznse8EufCITQOfz6ueX nOU252PlNPX/VPzB1XCV7DiSPySLdlWI2ZiYmVUdPBsXpTo88agTLl6xTUIxns+QSGkf 4P2Nk4AbQGvSljkeTy8J2MNAbcoYeCQSvqzdZISekXOhrBNoWEwixkcKFSNy95qqh1RE ZGSg== X-Gm-Message-State: AOAM53192UVOSHToHaZxk0IwoVqjP6xbdAwS7U+M8/CaBx3gzCdYOZ76 VyuH6ED6oMMDJVY/y59v2Uw/bisbwi7C3lN+r5MsqO+jTPL7eFf2q4Q1NqoEdWHICJwhtZKhBg+ NfQjVWVzW1cX9xQ== X-Received: by 2002:adf:ec86:: with SMTP id z6mr37001201wrn.320.1626799711520; Tue, 20 Jul 2021 09:48:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz77g+tE7Hm3caqHqgUN1ZHWYpA/WOMHsnGiji1qOHo8YDg4gZgIbYTZ1rOcu5cQFwHaI/oew== X-Received: by 2002:adf:ec86:: with SMTP id z6mr37001179wrn.320.1626799711358; Tue, 20 Jul 2021 09:48:31 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Wainer dos Santos Moschetta , Bin Meng , Willian Rampazzo , Thomas Huth , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= Subject: [PATCH-for-6.1] gitlab-ci: Extract OpenSBI job rules to reusable section Date: Tue, 20 Jul 2021 18:48:29 +0200 Message-Id: <20210720164829.3949558-1-philmd@redhat.com> X-Mailer: git-send-email 2.31.1 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: 1626799717899100001 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. The problem was introduced in commit c6fc0fc1a71 ("gitlab-ci.yml: Add jobs to build OpenSBI firmware binaries"), but was 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 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Willian Rampazzo --- Latent bug on CI, safe for 6.1. --- .gitlab-ci.d/opensbi.yml | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/.gitlab-ci.d/opensbi.yml b/.gitlab-ci.d/opensbi.yml index f66cd1d9089..d8a0456679e 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 + - changes: # or 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 + +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