From nobody Sun May 5 20:25:47 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=libvir-list-bounces@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=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1610622234; cv=none; d=zohomail.com; s=zohoarc; b=CiJ7m3UASopJRyky5hAFT48QAnbGBX71HVPtby6nQl1HPoM7/lZ3OZTsjoIRebmNwe+la8A61WdUlwZ8CfiRFOXG8qZf2c2SfZOztmoXB0XQIztj44cb7Nbo5syEQzCvm4S2+GLeeFoKJqNXBSAoKzVg+VPOUx4wXEIRb9/rHtg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1610622234; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=jVYZ8qjqrIbLsQgIaXTEza52c+f2Xkz5uKUxmTtCs+4=; b=TM8VpxD9CIPfDLkxy7AOW3ud5rEieN75KsXnbVAZw4jrbkMNTfbZd5sue3kuMAbQ67YJvMvuYJyTZxZLynzdxthIBCiBtxhKtvoiMEhLsv6hc9iiQpeg4iVZ+TBPWyw0vuOIs+XIBeDBXwR/pjV2Vx3WVBBUnvHR2T5eDzW0PrY= 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=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: 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 1610622234038206.04679323668324; Thu, 14 Jan 2021 03:03:54 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-79-w5ZjFVx9OqG-lBqE0hHvbw-1; Thu, 14 Jan 2021 06:03:50 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 241D6425D0; Thu, 14 Jan 2021 11:03:44 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id EE51760C47; Thu, 14 Jan 2021 11:03:43 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 01AC9180954D; Thu, 14 Jan 2021 11:03:43 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 10EB3f18002732 for ; Thu, 14 Jan 2021 06:03:41 -0500 Received: by smtp.corp.redhat.com (Postfix) id BE56C71D5E; Thu, 14 Jan 2021 11:03:41 +0000 (UTC) Received: from nautilus.local (unknown [10.40.192.109]) by smtp.corp.redhat.com (Postfix) with ESMTP id E20991B4B4; Thu, 14 Jan 2021 11:03:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1610622232; h=from:from:sender:sender: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:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=jVYZ8qjqrIbLsQgIaXTEza52c+f2Xkz5uKUxmTtCs+4=; b=J6ubug+sAllMILfJ9Tj21PLuIYtKbspGulGQCLpMdp7EOFlp66CSAxK111c7vSV7FO4/OK nU7JAZNJk3elebr9IkypQiTiYMw14/seZMyM1IG9FrBQTC/d+opta1+PwoGongsCSAFyc6 F7uJm4U4LCRz3YEgAh59CRaQHFR8qs0= X-MC-Unique: w5ZjFVx9OqG-lBqE0hHvbw-1 From: Erik Skultety To: libvir-list@redhat.com Subject: [libvirt PATCH v2 1/3] gitlab-ci.yml: Replace template anchors with extends Date: Thu, 14 Jan 2021 12:03:30 +0100 Message-Id: <9d3018d6196a2a02b0366467f763da8bb27a092c.1610621681.git.eskultet@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Cc: eskultet@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" 'extends' is slightly more readable and definitely more flexible in terms of allowing includes of templates. The main reason for this patch though is that the next patch converts the 'only/except' syntax to the new (preferable) 'rules' syntax. Variable anchors are still kept intact because the use case there is different from regular template anchors. Signed-off-by: Erik Skultety --- .gitlab-ci.yml | 128 ++++++++++++++++++++++++------------------------- 1 file changed, 64 insertions(+), 64 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2171905f8e..018008ca1c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -14,7 +14,7 @@ stages: =20 # Common templates =20 -.container_job_template: &container_job_definition +.container_job_template: image: docker:stable stage: containers needs: [] @@ -36,11 +36,11 @@ stages: # needed for the pipeline itself to complete: those sometimes fail, and wh= en # that happens it's mostly because of temporary issues with Debian sid. We # don't want those failures to affect the overall pipeline status -.container_optional_job_template: &container_optional_job_definition - <<: *container_job_definition +.container_optional_job_template: + extends: .container_job_template allow_failure: true =20 -.native_build_job_template: &native_build_job_definition +.native_build_job_template: stage: builds image: $CI_REGISTRY_IMAGE/ci-$NAME:latest cache: @@ -75,7 +75,7 @@ stages: # Note that the $PATH environment variable has to be treated with # special care, because we can't just override it at the GitLab CI job # definition level or we risk breaking it completely. -.cirrus_build_job_template: &cirrus_build_job_definition +.cirrus_build_job_template: stage: builds image: registry.gitlab.com/libvirt/libvirt-ci/cirrus-run:master needs: [] @@ -103,7 +103,7 @@ stages: - $CIRRUS_GITHUB_REPO - $CIRRUS_API_TOKEN =20 -.cross_build_default_job_template: &cross_build_job_definition +.cross_build_default_job_template: stage: builds image: $CI_REGISTRY_IMAGE/ci-$NAME-cross-$CROSS:latest cache: @@ -121,57 +121,57 @@ stages: # Native container build jobs =20 x64-centos-7-container: - <<: *container_job_definition + extends: .container_job_template variables: NAME: centos-7 =20 x64-centos-8-container: - <<: *container_job_definition + extends: .container_job_template variables: NAME: centos-8 =20 x64-centos-stream-container: - <<: *container_job_definition + extends: .container_job_template variables: NAME: centos-stream =20 x64-debian-10-container: - <<: *container_job_definition + extends: .container_job_template variables: NAME: debian-10 =20 x64-debian-sid-container: - <<: *container_job_definition + extends: .container_job_template variables: NAME: debian-sid =20 x64-fedora-32-container: - <<: *container_job_definition + extends: .container_job_template variables: NAME: fedora-32 =20 x64-fedora-33-container: - <<: *container_job_definition + extends: .container_job_template variables: NAME: fedora-33 =20 x64-fedora-rawhide-container: - <<: *container_job_definition + extends: .container_job_template variables: NAME: fedora-rawhide =20 x64-opensuse-151-container: - <<: *container_job_definition + extends: .container_job_template variables: NAME: opensuse-151 =20 x64-ubuntu-1804-container: - <<: *container_job_definition + extends: .container_job_template variables: NAME: ubuntu-1804 =20 x64-ubuntu-2004-container: - <<: *container_job_definition + extends: .container_job_template variables: NAME: ubuntu-2004 =20 @@ -179,97 +179,97 @@ x64-ubuntu-2004-container: # Cross-build containers build jobs =20 aarch64-debian-10-container: - <<: *container_job_definition + extends: .container_job_template variables: NAME: debian-10-cross-aarch64 =20 armv6l-debian-10-container: - <<: *container_job_definition + extends: .container_job_template variables: NAME: debian-10-cross-armv6l =20 armv7l-debian-10-container: - <<: *container_optional_job_definition + extends: .container_job_template variables: NAME: debian-10-cross-armv7l =20 i686-debian-10-container: - <<: *container_optional_job_definition + extends: .container_job_template variables: NAME: debian-10-cross-i686 =20 mips-debian-10-container: - <<: *container_job_definition + extends: .container_job_template variables: NAME: debian-10-cross-mips =20 mips64el-debian-10-container: - <<: *container_job_definition + extends: .container_job_template variables: NAME: debian-10-cross-mips64el =20 mipsel-debian-10-container: - <<: *container_job_definition + extends: .container_job_template variables: NAME: debian-10-cross-mipsel =20 ppc64le-debian-10-container: - <<: *container_optional_job_definition + extends: .container_optional_job_template variables: NAME: debian-10-cross-ppc64le =20 s390x-debian-10-container: - <<: *container_optional_job_definition + extends: .container_optional_job_template variables: NAME: debian-10-cross-s390x =20 aarch64-debian-sid-container: - <<: *container_optional_job_definition + extends: .container_optional_job_template variables: NAME: debian-sid-cross-aarch64 =20 armv6l-debian-sid-container: - <<: *container_optional_job_definition + extends: .container_optional_job_template variables: NAME: debian-sid-cross-armv6l =20 armv7l-debian-sid-container: - <<: *container_job_definition + extends: .container_job_template variables: NAME: debian-sid-cross-armv7l =20 i686-debian-sid-container: - <<: *container_job_definition + extends: .container_job_template variables: NAME: debian-sid-cross-i686 =20 mips64el-debian-sid-container: - <<: *container_optional_job_definition + extends: .container_optional_job_template variables: NAME: debian-sid-cross-mips64el =20 mipsel-debian-sid-container: - <<: *container_optional_job_definition + extends: .container_optional_job_template variables: NAME: debian-sid-cross-mipsel =20 ppc64le-debian-sid-container: - <<: *container_job_definition + extends: .container_job_template variables: NAME: debian-sid-cross-ppc64le =20 s390x-debian-sid-container: - <<: *container_optional_job_definition + extends: .container_optional_job_template variables: NAME: debian-sid-cross-s390x =20 mingw32-fedora-rawhide-container: - <<: *container_job_definition + extends: .container_job_template variables: NAME: fedora-rawhide-cross-mingw32 =20 mingw64-fedora-rawhide-container: - <<: *container_job_definition + extends: .container_job_template variables: NAME: fedora-rawhide-cross-mingw64 =20 @@ -277,14 +277,14 @@ mingw64-fedora-rawhide-container: # Native architecture build + test jobs =20 x64-debian-10: - <<: *native_build_job_definition + extends: .native_build_job_template needs: - x64-debian-10-container variables: NAME: debian-10 =20 x64-debian-10-clang: - <<: *native_build_job_definition + extends: .native_build_job_template needs: - x64-debian-10-container variables: @@ -292,14 +292,14 @@ x64-debian-10-clang: CC: clang =20 x64-debian-sid: - <<: *native_build_job_definition + extends: .native_build_job_template needs: - x64-debian-sid-container variables: NAME: debian-sid =20 x64-centos-7: - <<: *native_build_job_definition + extends: .native_build_job_template needs: - x64-centos-7-container variables: @@ -310,7 +310,7 @@ x64-centos-7: RPM: skip =20 x64-centos-8: - <<: *native_build_job_definition + extends: .native_build_job_template needs: - x64-centos-8-container variables: @@ -318,7 +318,7 @@ x64-centos-8: RPM: skip =20 x64-centos-8-clang: - <<: *native_build_job_definition + extends: .native_build_job_template needs: - x64-centos-8-container variables: @@ -327,7 +327,7 @@ x64-centos-8-clang: RPM: skip =20 x64-centos-stream: - <<: *native_build_job_definition + extends: .native_build_job_template needs: - x64-centos-stream-container variables: @@ -335,7 +335,7 @@ x64-centos-stream: RPM: skip =20 x64-fedora-32: - <<: *native_build_job_definition + extends: .native_build_job_template needs: - x64-fedora-32-container variables: @@ -343,21 +343,21 @@ x64-fedora-32: RPM: skip =20 x64-fedora-33: - <<: *native_build_job_definition + extends: .native_build_job_template needs: - x64-fedora-33-container variables: NAME: fedora-33 =20 x64-fedora-rawhide: - <<: *native_build_job_definition + extends: .native_build_job_template needs: - x64-fedora-rawhide-container variables: NAME: fedora-rawhide =20 x64-fedora-rawhide-clang: - <<: *native_build_job_definition + extends: .native_build_job_template needs: - x64-fedora-rawhide-container variables: @@ -366,7 +366,7 @@ x64-fedora-rawhide-clang: RPM: skip =20 x64-opensuse-151: - <<: *native_build_job_definition + extends: .native_build_job_template needs: - x64-opensuse-151-container variables: @@ -374,21 +374,21 @@ x64-opensuse-151: RPM: skip =20 x64-ubuntu-1804: - <<: *native_build_job_definition + extends: .native_build_job_template needs: - x64-ubuntu-1804-container variables: NAME: ubuntu-1804 =20 x64-ubuntu-2004: - <<: *native_build_job_definition + extends: .native_build_job_template needs: - x64-ubuntu-2004-container variables: NAME: ubuntu-2004 =20 x64-freebsd-11-build: - <<: *cirrus_build_job_definition + extends: .cirrus_build_job_template variables: NAME: freebsd-11 CIRRUS_VM_INSTANCE_TYPE: freebsd_instance @@ -397,7 +397,7 @@ x64-freebsd-11-build: INSTALL_COMMAND: pkg install -y =20 x64-freebsd-12-build: - <<: *cirrus_build_job_definition + extends: .cirrus_build_job_template variables: NAME: freebsd-12 CIRRUS_VM_INSTANCE_TYPE: freebsd_instance @@ -406,7 +406,7 @@ x64-freebsd-12-build: INSTALL_COMMAND: pkg install -y =20 x64-macos-1015-build: - <<: *cirrus_build_job_definition + extends: .cirrus_build_job_template variables: NAME: macos-1015 CIRRUS_VM_INSTANCE_TYPE: osx_instance @@ -420,7 +420,7 @@ x64-macos-1015-build: # Cross compiled build jobs =20 armv6l-debian-10: - <<: *cross_build_job_definition + extends: .cross_build_default_job_template needs: - armv6l-debian-10-container variables: @@ -428,7 +428,7 @@ armv6l-debian-10: CROSS: armv6l =20 armv7l-debian-10: - <<: *cross_build_job_definition + extends: .cross_build_default_job_template needs: - armv7l-debian-10-container variables: @@ -436,7 +436,7 @@ armv7l-debian-10: CROSS: armv7l =20 mips64el-debian-10: - <<: *cross_build_job_definition + extends: .cross_build_default_job_template needs: - mips64el-debian-10-container variables: @@ -444,7 +444,7 @@ mips64el-debian-10: CROSS: mips64el =20 mips-debian-10: - <<: *cross_build_job_definition + extends: .cross_build_default_job_template needs: - mips-debian-10-container variables: @@ -452,7 +452,7 @@ mips-debian-10: CROSS: mips =20 aarch64-debian-10: - <<: *cross_build_job_definition + extends: .cross_build_default_job_template needs: - aarch64-debian-10-container variables: @@ -460,7 +460,7 @@ aarch64-debian-10: CROSS: aarch64 =20 mipsel-debian-10: - <<: *cross_build_job_definition + extends: .cross_build_default_job_template needs: - mipsel-debian-10-container variables: @@ -468,7 +468,7 @@ mipsel-debian-10: CROSS: mipsel =20 s390x-debian-sid: - <<: *cross_build_job_definition + extends: .cross_build_default_job_template needs: - s390x-debian-10-container variables: @@ -476,7 +476,7 @@ s390x-debian-sid: CROSS: s390x =20 i686-debian-sid: - <<: *cross_build_job_definition + extends: .cross_build_default_job_template needs: - i686-debian-sid-container variables: @@ -484,7 +484,7 @@ i686-debian-sid: CROSS: i686 =20 ppc64le-debian-sid: - <<: *cross_build_job_definition + extends: .cross_build_default_job_template needs: - ppc64le-debian-10-container variables: @@ -492,7 +492,7 @@ ppc64le-debian-sid: CROSS: ppc64le =20 mingw32-fedora-rawhide: - <<: *cross_build_job_definition + extends: .cross_build_default_job_template needs: - mingw32-fedora-rawhide-container variables: @@ -500,7 +500,7 @@ mingw32-fedora-rawhide: CROSS: mingw32 =20 mingw64-fedora-rawhide: - <<: *cross_build_job_definition + extends: .cross_build_default_job_template needs: - mingw64-fedora-rawhide-container variables: --=20 2.29.2 From nobody Sun May 5 20:25:47 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=libvir-list-bounces@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=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1610622241; cv=none; d=zohomail.com; s=zohoarc; b=L1UaMyVtW16l9rKuMqfQrHU8EYG3PHvnTfKwAtyH/LgYDCnBA4bCjNNx396tcEAsdrjkJzcS0KOfkdtgnwi8Ka64YgS5iNGf6aya37MmaAeCoK5CPfblEeHrOLnJ0JukrcobHEYeOZ9AZ4L5LUVkL95vLcz97+KWMGENYglsYcw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1610622241; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=c5AFzwC/ctETvuujuxYna6ufAnJ7lXqO39NDmEHCey4=; b=mxTdB5Tm5LAa1ITMShMCa1GBvcJfk/jS91G3NH6k+vELeQDJSXXO2eCgRg2Ns6RjdEBHsRiCoXt1S+F7jiC1rHHxLhRnF7KOh2XvBSpirIbxbfwBhx/5wl9R4r5ZAW5Xx10uPYrhVkcTQw1Ky6l+fH6WL+F9cg15wYu1mpiNu20= 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=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: 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 1610622241680381.9221344008937; Thu, 14 Jan 2021 03:04:01 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-7-j0bXauQ9N0W6Sbz1Ncg_og-1; Thu, 14 Jan 2021 06:03:58 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id AEA9C18C8C00; Thu, 14 Jan 2021 11:03:51 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8854D272DB; Thu, 14 Jan 2021 11:03:51 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 555C34E590; Thu, 14 Jan 2021 11:03:51 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 10EB3heL002744 for ; Thu, 14 Jan 2021 06:03:43 -0500 Received: by smtp.corp.redhat.com (Postfix) id F3F8B71D5E; Thu, 14 Jan 2021 11:03:42 +0000 (UTC) Received: from nautilus.local (unknown [10.40.192.109]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4A5B91B4B4; Thu, 14 Jan 2021 11:03:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1610622240; h=from:from:sender:sender: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:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=c5AFzwC/ctETvuujuxYna6ufAnJ7lXqO39NDmEHCey4=; b=WNE5/p5d1g5KldT6EsfPvmxoSaEZ6zjvnhw9mz2i5YpyrNQh/BSOGzr+baoU8gzP7M8jX/ N43cre03XCLLaTPDqOkyK8AfrbrgXHajJmkFK/3mXlAD/rk86BGo6rOVLdUJ7dru7VuZZM PA1k5okVDLQ2zTgYqUQZo5YdFbVNX18= X-MC-Unique: j0bXauQ9N0W6Sbz1Ncg_og-1 From: Erik Skultety To: libvir-list@redhat.com Subject: [libvirt PATCH v2 2/3] gitlab-ci.yml: Convert only/except to the rules syntax Date: Thu, 14 Jan 2021 12:03:31 +0100 Message-Id: <6fcba00b0aded2ff10e1fd2428c8ed8301e59fe2.1610621681.git.eskultet@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Cc: eskultet@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" 'rules' syntax replaces the only/except syntax with which it is mutually exclusive. In some cases the 'rules' syntax is more readable than the 'only/except' equivalent, in some cases it is not. The idea behind this conversion is to introduce an explicit env variable controlling the 'allow_failure' attribute which would be then attached to a broken build job which would mark this broken build as a soft failure which is not possible with the 'only/except' syntax. Yes, the alternative here is to use 'allow_failure' directly on the broken job, but being explicit is always better for readability than implicit. Signed-off-by: Erik Skultety --- .gitlab-ci.yml | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 018008ca1c..de6ead01d8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -43,6 +43,8 @@ stages: .native_build_job_template: stage: builds image: $CI_REGISTRY_IMAGE/ci-$NAME:latest + rules: + - when: on_success cache: paths: - ccache/ @@ -98,10 +100,8 @@ stages: ci/cirrus/$NAME.yml - cat ci/cirrus/$NAME.yml - cirrus-run -v --show-build-log always ci/cirrus/$NAME.yml - only: - variables: - - $CIRRUS_GITHUB_REPO - - $CIRRUS_API_TOKEN + rules: + - if: "$CIRRUS_GITHUB_REPO && $CIRRUS_API_TOKEN" =20 .cross_build_default_job_template: stage: builds @@ -110,6 +110,8 @@ stages: paths: - ccache/ key: "$CI_JOB_NAME" + rules: + - when: on_success before_script: - *script_variables script: @@ -552,8 +554,8 @@ potfile: image: $CI_REGISTRY_IMAGE/ci-centos-8:latest needs: - x64-centos-8-container - only: - - master + rules: + - if: "$CI_COMMIT_BRANCH =3D=3D 'master'" before_script: - *script_variables script: @@ -580,9 +582,8 @@ check-dco: image: registry.gitlab.com/libvirt/libvirt-ci/check-dco:master script: - /check-dco - except: - variables: - - $CI_PROJECT_NAMESPACE =3D=3D 'libvirt' + rules: + - if: "$CI_PROJECT_NAMESPACE !=3D 'libvirt'" variables: GIT_DEPTH: 1000 =20 @@ -600,8 +601,5 @@ coverity: - cov-analysis-linux64-*/bin/cov-build --dir cov-int ninja -C build - tar cfz cov-int.tar.gz cov-int - curl https://scan.coverity.com/builds?project=3D$COVERITY_SCAN_PROJE= CT_NAME --form token=3D$COVERITY_SCAN_TOKEN --form email=3D$GITLAB_USER_EMA= IL --form file=3D@cov-int.tar.gz --form version=3D"$(git describe --tags)" = --form description=3D"$(git describe --tags) / $CI_COMMIT_TITLE / $CI_COMMI= T_REF_NAME:$CI_PIPELINE_ID" - only: - refs: - - schedules - variables: - - $COVERITY_SCAN_PROJECT_NAME && $COVERITY_SCAN_TOKEN + rules: + - if: "$CI_PIPELINE_SOURCE =3D=3D 'schedule' && $COVERITY_SCAN_PROJECT= _NAME && $COVERITY_SCAN_TOKEN" --=20 2.29.2 From nobody Sun May 5 20:25:47 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=libvir-list-bounces@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=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1610622244; cv=none; d=zohomail.com; s=zohoarc; b=KZMcQmCCfms4MMvITfDbCSLfX0ufm2u6Y6hTHGT3PypshpIrOE3l4s3qhakObOYXzm/O2DMT4EyXi9XgXDXoDgmU03bgFT7L9UR+hdDlF9PsOCyElYElNSLL5wKWK2kV6+YuAGEsebqMZqcEApA2IhqLbhyEHhRGvh7dm7vROQo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1610622244; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=TdzMxeix+gvma7yAu0DPllJEcgSZj54ZopP16Vxv8Ls=; b=mVCqIZMfM7Z18mn0zhqYEtZ6Dn9ad41Eyd9v6bIRCPSv/vaS6KRTXSjDyk8WHUXTsWnS2KqxbuUIPW1nAjuIzGMUL5PjdCIRgASuRIgYMUaxkYhqBr27x/fBaiZ2nm3vOitf61Kvzg/Hy+J0npZS0pqs2R7U7xgJdb8FquyffTM= 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=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: 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 1610622244217370.89336859103696; Thu, 14 Jan 2021 03:04:04 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-113-aA-9YZxxMIm6XAkJ-1PCAA-1; Thu, 14 Jan 2021 06:03:59 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 07A98425D0; Thu, 14 Jan 2021 11:03:53 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CCA1B272DB; Thu, 14 Jan 2021 11:03:52 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 95C961809CA1; Thu, 14 Jan 2021 11:03:52 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 10EB3iex002750 for ; Thu, 14 Jan 2021 06:03:44 -0500 Received: by smtp.corp.redhat.com (Postfix) id 1BBDB5C3E9; Thu, 14 Jan 2021 11:03:44 +0000 (UTC) Received: from nautilus.local (unknown [10.40.192.109]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6876671D60; Thu, 14 Jan 2021 11:03:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1610622243; h=from:from:sender:sender: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:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=TdzMxeix+gvma7yAu0DPllJEcgSZj54ZopP16Vxv8Ls=; b=Zb5PJy0wF4ByrHcm9ReTwbonp7N/LGet8FPpjPziQdasaNi7ycFh2gMlQ2Eub5xduONS1S 6wrRh4XchqyjiX7qdxGtnR7AZV8LtGlk6mMOuqPtmwAcQaApInw+7Zv2/TL2Lhk1lNdmgn 2iPCW+4suUIHEgaDYqLSCb7O4TAB3J4= X-MC-Unique: aA-9YZxxMIm6XAkJ-1PCAA-1 From: Erik Skultety To: libvir-list@redhat.com Subject: [libvirt PATCH v2 3/3] gitlab-ci.yml: Add an explicit env variable to mark a job as broken Date: Thu, 14 Jan 2021 12:03:32 +0100 Message-Id: <94982fc68eb6f015ee26fdf1be94b37737edaee2.1610621681.git.eskultet@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Cc: eskultet@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Thanks to the 'rules' syntax, this will translate to 'allow_failure:true' and let the job fail but will not affect the rest of the pipeline. Signed-off-by: Erik Skultety --- .gitlab-ci.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index de6ead01d8..5f542ab02a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -44,6 +44,8 @@ stages: stage: builds image: $CI_REGISTRY_IMAGE/ci-$NAME:latest rules: + - if: "$JOB_TEMPORARY_DISABLED" + allow_failure: true - when: on_success cache: paths: @@ -101,6 +103,8 @@ stages: - cat ci/cirrus/$NAME.yml - cirrus-run -v --show-build-log always ci/cirrus/$NAME.yml rules: + - if: "$TEMPORARY_DISABLE" + allow_failure: true - if: "$CIRRUS_GITHUB_REPO && $CIRRUS_API_TOKEN" =20 .cross_build_default_job_template: @@ -111,6 +115,8 @@ stages: - ccache/ key: "$CI_JOB_NAME" rules: + - if: "$TEMPORARY_DISABLED" + allow_failure: true - when: on_success before_script: - *script_variables --=20 2.29.2