From nobody Sun May 5 13:36:20 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=1610637343; cv=none; d=zohomail.com; s=zohoarc; b=Y/c3uswHJ9qBKGdfyhjG0mBmFu8Uc6Q8KupOg06U4YsTWq3PP2B2NZQRDBfBEnc5GXPnsRIqyhjAsWbOuCFjxbKUmF2e06Nvk0mrmiMQqR3BumRYzYGfFMQ19rNMRWxPeW0pwbkifiwBBx+5aFF+IwhkrZ/2AETN1QwU7OgSF8o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1610637343; 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=x2AZYpxKq9k8foC0gRuvCPIx6jMvmcAcOAa2CXMKQfc=; b=eAc3m+bgeufD4NMgeDWVXVjhinh9nJCAyTLWgJB9lnR4OumnNS5zbTMJeUn3laCa0yCsSVjBegLY3R7N0XhHv9IIHSuU+H4crWapvY0oBwy47X59P7UiWQMwIodfzAGfTsrosDiHv1oc8EAAk5e0teicdNbDWoT5lcKDzoFZD0E= 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 1610637343547718.6581813527652; Thu, 14 Jan 2021 07:15:43 -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-43-c5QeGVTrMaehlnGW4gpvNQ-1; Thu, 14 Jan 2021 10:15:39 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 45B74107ACFC; Thu, 14 Jan 2021 15:15:32 +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 14BF86F44D; Thu, 14 Jan 2021 15:15:32 +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 A43DD4BB7B; Thu, 14 Jan 2021 15:15:31 +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 10EFFUkX032673 for ; Thu, 14 Jan 2021 10:15:30 -0500 Received: by smtp.corp.redhat.com (Postfix) id 40FE074440; Thu, 14 Jan 2021 15:15:30 +0000 (UTC) Received: from nautilus.local (unknown [10.40.192.109]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8C3AC74AD1; Thu, 14 Jan 2021 15:15:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1610637342; 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=x2AZYpxKq9k8foC0gRuvCPIx6jMvmcAcOAa2CXMKQfc=; b=QXttmDJktsOZ5K5T6bgquYsNf9T9lz8YdHiV9tRt4jP/E6ocUAohoGERN2bUo+kbTeUxBI XtSH7uQNg0HRSXQqqDNP3RuO25MgzR9nKBKG7rjSFvULgrMI71Ji6c2Ikweec+OfzOpvfO jdvR9mHI8KwQxIP+ZWXy/+K0kpyL+iQ= X-MC-Unique: c5QeGVTrMaehlnGW4gpvNQ-1 From: Erik Skultety To: libvir-list@redhat.com Subject: [libvirt PATCH v3 1/3] gitlab-ci.yml: Replace template anchors with extends Date: Thu, 14 Jan 2021 16:15:09 +0100 Message-Id: <9384c26b974ca054668cc0fda2ce067c9bf7e04d.1610637247.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.11 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 Reviewed-by: Andrea Bolognani --- .gitlab-ci.yml | 128 ++++++++++++++++++++++++------------------------- 1 file changed, 64 insertions(+), 64 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2171905f8e..eefcef526b 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: 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: + extends: .container_job allow_failure: true =20 -.native_build_job_template: &native_build_job_definition +.native_build_job: 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: 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_job: 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 variables: NAME: centos-7 =20 x64-centos-8-container: - <<: *container_job_definition + extends: .container_job variables: NAME: centos-8 =20 x64-centos-stream-container: - <<: *container_job_definition + extends: .container_job variables: NAME: centos-stream =20 x64-debian-10-container: - <<: *container_job_definition + extends: .container_job variables: NAME: debian-10 =20 x64-debian-sid-container: - <<: *container_job_definition + extends: .container_job variables: NAME: debian-sid =20 x64-fedora-32-container: - <<: *container_job_definition + extends: .container_job variables: NAME: fedora-32 =20 x64-fedora-33-container: - <<: *container_job_definition + extends: .container_job variables: NAME: fedora-33 =20 x64-fedora-rawhide-container: - <<: *container_job_definition + extends: .container_job variables: NAME: fedora-rawhide =20 x64-opensuse-151-container: - <<: *container_job_definition + extends: .container_job variables: NAME: opensuse-151 =20 x64-ubuntu-1804-container: - <<: *container_job_definition + extends: .container_job variables: NAME: ubuntu-1804 =20 x64-ubuntu-2004-container: - <<: *container_job_definition + extends: .container_job 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 variables: NAME: debian-10-cross-aarch64 =20 armv6l-debian-10-container: - <<: *container_job_definition + extends: .container_job variables: NAME: debian-10-cross-armv6l =20 armv7l-debian-10-container: - <<: *container_optional_job_definition + extends: .container_optional_job variables: NAME: debian-10-cross-armv7l =20 i686-debian-10-container: - <<: *container_optional_job_definition + extends: .container_optional_job variables: NAME: debian-10-cross-i686 =20 mips-debian-10-container: - <<: *container_job_definition + extends: .container_job variables: NAME: debian-10-cross-mips =20 mips64el-debian-10-container: - <<: *container_job_definition + extends: .container_job variables: NAME: debian-10-cross-mips64el =20 mipsel-debian-10-container: - <<: *container_job_definition + extends: .container_job variables: NAME: debian-10-cross-mipsel =20 ppc64le-debian-10-container: - <<: *container_optional_job_definition + extends: .container_optional_job variables: NAME: debian-10-cross-ppc64le =20 s390x-debian-10-container: - <<: *container_optional_job_definition + extends: .container_optional_job variables: NAME: debian-10-cross-s390x =20 aarch64-debian-sid-container: - <<: *container_optional_job_definition + extends: .container_optional_job variables: NAME: debian-sid-cross-aarch64 =20 armv6l-debian-sid-container: - <<: *container_optional_job_definition + extends: .container_optional_job variables: NAME: debian-sid-cross-armv6l =20 armv7l-debian-sid-container: - <<: *container_job_definition + extends: .container_job variables: NAME: debian-sid-cross-armv7l =20 i686-debian-sid-container: - <<: *container_job_definition + extends: .container_job variables: NAME: debian-sid-cross-i686 =20 mips64el-debian-sid-container: - <<: *container_optional_job_definition + extends: .container_optional_job variables: NAME: debian-sid-cross-mips64el =20 mipsel-debian-sid-container: - <<: *container_optional_job_definition + extends: .container_optional_job variables: NAME: debian-sid-cross-mipsel =20 ppc64le-debian-sid-container: - <<: *container_job_definition + extends: .container_job variables: NAME: debian-sid-cross-ppc64le =20 s390x-debian-sid-container: - <<: *container_optional_job_definition + extends: .container_optional_job variables: NAME: debian-sid-cross-s390x =20 mingw32-fedora-rawhide-container: - <<: *container_job_definition + extends: .container_job variables: NAME: fedora-rawhide-cross-mingw32 =20 mingw64-fedora-rawhide-container: - <<: *container_job_definition + extends: .container_job 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 needs: - x64-debian-10-container variables: NAME: debian-10 =20 x64-debian-10-clang: - <<: *native_build_job_definition + extends: .native_build_job 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 needs: - x64-debian-sid-container variables: NAME: debian-sid =20 x64-centos-7: - <<: *native_build_job_definition + extends: .native_build_job 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 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 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 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 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 needs: - x64-fedora-33-container variables: NAME: fedora-33 =20 x64-fedora-rawhide: - <<: *native_build_job_definition + extends: .native_build_job needs: - x64-fedora-rawhide-container variables: NAME: fedora-rawhide =20 x64-fedora-rawhide-clang: - <<: *native_build_job_definition + extends: .native_build_job 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 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 needs: - x64-ubuntu-1804-container variables: NAME: ubuntu-1804 =20 x64-ubuntu-2004: - <<: *native_build_job_definition + extends: .native_build_job needs: - x64-ubuntu-2004-container variables: NAME: ubuntu-2004 =20 x64-freebsd-11-build: - <<: *cirrus_build_job_definition + extends: .cirrus_build_job 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 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 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_job 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_job 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_job 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_job 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_job 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_job 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_job 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_job 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_job 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_job 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_job needs: - mingw64-fedora-rawhide-container variables: --=20 2.29.2 From nobody Sun May 5 13:36:20 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.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 63.128.21.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=1610637361; cv=none; d=zohomail.com; s=zohoarc; b=mgU72/602wh3E+08PwP8jTR/MsvM8q2B+M+H5Ow5oNO32e7HsznzzBYiGPsfXCXgUZZE2PSvFv5b8uQFmkY5LyzQWU6C5Q7LccSQNmBxiLfYYbSbsZNCOhpLMvzmiXVkp/f7CWRU8E4uokLmMUmRmU/BwO4/mA4n+4F6Q4KHDDc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1610637361; 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=2LW/ezHtIP/pqT1WWj7FUMCGRk7ybspLwKMpXivi6XM=; b=bTVkR3Y5njjh0Jny9wrcaWU/VhWvF0ZpxDx5Vwjri3gDVVT/kv5tVkXflVp9GtSlToaozxzbUpd+ZKvvh5f5U/gFbgAKN0RllYn3flrGhScYl2UlKtd0m/Wj/fMkcTJzqK0JVKhEnq2WkKIssGoTG4edGeBkfkwEyxoQy4zwMHM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.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 [63.128.21.124]) by mx.zohomail.com with SMTPS id 1610637361366324.9193992259318; Thu, 14 Jan 2021 07:16: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-302-0aqsDTI1OYewAPHDxCBVyg-1; Thu, 14 Jan 2021 10:15:57 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 075E1192299F; Thu, 14 Jan 2021 15:15: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 584F6764D5; Thu, 14 Jan 2021 15:15:49 +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 11CEA5002D; Thu, 14 Jan 2021 15:15:49 +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 10EFFmAX032722 for ; Thu, 14 Jan 2021 10:15:48 -0500 Received: by smtp.corp.redhat.com (Postfix) id 31C6776201; Thu, 14 Jan 2021 15:15:48 +0000 (UTC) Received: from nautilus.local (unknown [10.40.192.109]) by smtp.corp.redhat.com (Postfix) with ESMTP id 67BE8764D8; Thu, 14 Jan 2021 15:15:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1610637360; 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=2LW/ezHtIP/pqT1WWj7FUMCGRk7ybspLwKMpXivi6XM=; b=OxIcaFsy1OOlhUyf9mBGDmOYYeq/ol3RT3r/VlXMrA/mmNIUT5DmtoTNd0X9If7yCIAYVI Ely+AqgY/aXpcAEDDt0sKbM6YtkFWG76nBZQfKkORzBOUgyM6T9XmcP6ZCL8G8NU2wb/Xm Kq2IF5nGrQOz+9ZMoqoF238hYXx10WY= X-MC-Unique: 0aqsDTI1OYewAPHDxCBVyg-1 From: Erik Skultety To: libvir-list@redhat.com Subject: [libvirt PATCH v3 2/3] gitlab-ci.yml: Convert only/except to the rules syntax Date: Thu, 14 Jan 2021 16:15:10 +0100 Message-Id: <859e5060c4f50f8afed6f5485ec80e60bb3ae3dc.1610637247.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.16 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 then be attached to a broken build job which would in turn result in a soft failure. Such behaviour is not possible to achieve with the older 'only/except' syntax. Signed-off-by: Erik Skultety Reviewed-by: Andrea Bolognani --- .gitlab-ci.yml | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index eefcef526b..7636544ee1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -20,6 +20,8 @@ stages: needs: [] services: - docker:dind + rules: + - when: on_success before_script: - export TAG=3D"$CI_REGISTRY_IMAGE/ci-$NAME:latest" - export COMMON_TAG=3D"$CI_REGISTRY/libvirt/libvirt/ci-$NAME:latest" @@ -43,6 +45,8 @@ stages: .native_build_job: stage: builds image: $CI_REGISTRY_IMAGE/ci-$NAME:latest + rules: + - when: on_success cache: paths: - ccache/ @@ -98,10 +102,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_job: stage: builds @@ -110,6 +112,8 @@ stages: paths: - ccache/ key: "$CI_JOB_NAME" + rules: + - when: on_success before_script: - *script_variables script: @@ -552,8 +556,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 +584,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 +603,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 13:36:20 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.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 63.128.21.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=1610637366; cv=none; d=zohomail.com; s=zohoarc; b=XGYjcXffzKBi2W2t+u3wi2ynHjaqZEUtTBIAC5qTHj4Z7tWfqWyAP9RXz1O7PkgzwlApzKUftWojYP+4E4xwUYlBomixmiDu0+UISXIjXBdEuJo2x8VnwXnO+skO1XhUQc+VCa1FxXpDD5I8OO8jxkYGqNtE8sUQ/OOzFFnvwyY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1610637366; 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=i12TsWnIwDxnBXKu1g0Xwm5tVQU3qRC0sUDxyuCDqSc=; b=U4Odysjhe1JS1d202FQFSiENe0klmItDJA6465I8oz6/MvY3ueSt8B3JpZ3hClrs9cj6YhuQUeFTnHLyQ7cVYqbzqoCdbA8//vxFylGRMXalCapoQf684D4wHvP/rIzNoRZlsjDxPdpg0xguj964RuNCG1dpGODJ/XIvH2DHfU4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.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 [63.128.21.124]) by mx.zohomail.com with SMTPS id 1610637366567136.51728493977487; Thu, 14 Jan 2021 07:16:06 -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-380-kqH6CQJvO7qEcp-IhKT0gA-1; Thu, 14 Jan 2021 10:16:01 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4694DC7415; Thu, 14 Jan 2021 15:15:53 +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 1B5A072160; Thu, 14 Jan 2021 15:15:53 +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 CF02150030; Thu, 14 Jan 2021 15:15: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 10EFFoil032743 for ; Thu, 14 Jan 2021 10:15:50 -0500 Received: by smtp.corp.redhat.com (Postfix) id 9258B74AAA; Thu, 14 Jan 2021 15:15:49 +0000 (UTC) Received: from nautilus.local (unknown [10.40.192.109]) by smtp.corp.redhat.com (Postfix) with ESMTP id 81C4A61D2E; Thu, 14 Jan 2021 15:15:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1610637365; 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=i12TsWnIwDxnBXKu1g0Xwm5tVQU3qRC0sUDxyuCDqSc=; b=bTGQkt6Y9yl4raaNxAL+OfeSRSwe5Hsrd/XBTUMQGQZGsk4V5CfcX5HVwLTAwASVOH2Nli F19UKCsvbKqrDiqomlGCLbMAf4JTKGseeMGsKx6WCd/XZWqK91lAfKWSc3ax9s4dvu0azp c7P1i0cknEGuzZHhuMgsYfUhzLsAfuk= X-MC-Unique: kqH6CQJvO7qEcp-IhKT0gA-1 From: Erik Skultety To: libvir-list@redhat.com Subject: [libvirt PATCH v3 3/3] gitlab-ci.yml: Add an explicit env variable to mark a job as broken Date: Thu, 14 Jan 2021 16:15:11 +0100 Message-Id: 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.11 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 Reviewed-by: Andrea Bolognani --- .gitlab-ci.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7636544ee1..673327fb9e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -21,6 +21,8 @@ stages: services: - docker:dind rules: + - if: "$TEMPORARILY_DISABLED" + allow_failure: true - when: on_success before_script: - export TAG=3D"$CI_REGISTRY_IMAGE/ci-$NAME:latest" @@ -46,6 +48,8 @@ stages: stage: builds image: $CI_REGISTRY_IMAGE/ci-$NAME:latest rules: + - if: "$TEMPORARILY_DISABLED" + allow_failure: true - when: on_success cache: paths: @@ -103,6 +107,8 @@ stages: - cat ci/cirrus/$NAME.yml - cirrus-run -v --show-build-log always ci/cirrus/$NAME.yml rules: + - if: "$TEMPORARILY_DISABLED" + allow_failure: true - if: "$CIRRUS_GITHUB_REPO && $CIRRUS_API_TOKEN" =20 .cross_build_job: @@ -113,6 +119,8 @@ stages: - ccache/ key: "$CI_JOB_NAME" rules: + - if: "$TEMPORARILY_DISABLED" + allow_failure: true - when: on_success before_script: - *script_variables --=20 2.29.2