From nobody Sat May 4 15:04:27 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=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 170.10.133.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=1677671725; cv=none; d=zohomail.com; s=zohoarc; b=nWH+kx3f0+JeT/G6coq+lrAelHxNo7KpUjw6W+RB5s0sEDrvc3GlPq8No8ZWsl2Bm4n3OqmxW0wl8nm8egWdXmt9wWSf+0DqmUajCWr7ef+gTYuBLe1KE2xXlYveaXbEBa2B4UmmvaavOOpPQEGAi7neq+CGLwR5Dae78bvuTs4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677671725; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=GQGrm0Dv6ysUU4d+AewPJvOg0m33SAFBilxHfPYm6/w=; b=FYjYUUeG/uPhKQG7TdfT0cMOutAhujJn6UpC7udMb22D4YGwtidOJOv70UGNnAWnfAUm+IdcjfhUqkuq7J/h/Ssqq/yGEjPToC2k1mimXEOtSC64264I7kS0/o0a6cwlNYm0Oq92qsad2Tnd7BMGIP7XJcSWXZFEvcwbR+Fb/cs= 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=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: 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 1677671725240890.1654878856266; Wed, 1 Mar 2023 03:55:25 -0800 (PST) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-662--2mvq3wbPNOnoSbyP7sgNg-1; Wed, 01 Mar 2023 06:55:21 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 859ED85CBE5; Wed, 1 Mar 2023 11:55:18 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id AC91F2026D4B; Wed, 1 Mar 2023 11:55:16 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 96F231946A45; Wed, 1 Mar 2023 11:55:16 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 679EC19465BB for ; Wed, 1 Mar 2023 11:55:15 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 59DE4C15BAE; Wed, 1 Mar 2023 11:55:15 +0000 (UTC) Received: from speedmetal.lan (unknown [10.45.242.7]) by smtp.corp.redhat.com (Postfix) with ESMTP id B240EC15BAD for ; Wed, 1 Mar 2023 11:55:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1677671724; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=GQGrm0Dv6ysUU4d+AewPJvOg0m33SAFBilxHfPYm6/w=; b=Xo2QgQy7yx8kLU1O+JzbGqcu19K+82xYuYe9THMnKbAKMrX9xRFac/H7f0BxbljpNVfBzn qbQRAApfJFb3GIAg+ohFXgxnUnkhb+g8+Z7KXVP6ffm2q7vf8iJlebd96tKkVDWqDqCd+Q 8cPl5rSN16m/rR8Zbx/nKiAhyaCVPak= X-MC-Unique: -2mvq3wbPNOnoSbyP7sgNg-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH] ci: Regenerate gitlab CI config with latest lcitool Date: Wed, 1 Mar 2023 12:55:13 +0100 Message-Id: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1677671726898100001 Content-Type: text/plain; charset="utf-8" The latest 'lcitool' now generates the CI config in a way which allows users to kick off pipelines with the upstream projects container environment rather than building a throwaway updated environment each time and enables a gitlab feature to time individual script lines. Pull it into libvirt. Signed-off-by: Peter Krempa Reviewed-by: Erik Skultety --- ci/gitlab.yml | 7 +++++++ ci/gitlab/build-templates.yml | 31 ++++++++++++++++++++++++++++++- ci/gitlab/sanity-checks.yml | 4 +++- 3 files changed, 40 insertions(+), 2 deletions(-) diff --git a/ci/gitlab.yml b/ci/gitlab.yml index 3866dcf545..7bb68b848c 100644 --- a/ci/gitlab.yml +++ b/ci/gitlab.yml @@ -14,6 +14,12 @@ # created/updated. Setting this variable to a non-empty # value allows CI testing prior to opening a merge request. # +# - RUN_PIPELINE_UPSTREAM_ENV - same semantics as RUN_PIPELINE, +# but uses the CI environment (containers) from the upstream project +# rather than creating and updating a throwaway environment +# Should not be used if the pushed branch includes CI container +# changes. +# # - RUN_CONTAINER_BUILDS - CI pipelines in upstream only # publish containers if CI file changes are detected. # Setting this variable to a non-empty value will force @@ -44,6 +50,7 @@ variables: RUN_UPSTREAM_NAMESPACE: libvirt + FF_SCRIPT_SECTIONS: 1 workflow: diff --git a/ci/gitlab/build-templates.yml b/ci/gitlab/build-templates.yml index 445bfa63eb..82ddd2c650 100644 --- a/ci/gitlab/build-templates.yml +++ b/ci/gitlab/build-templates.yml @@ -37,6 +37,13 @@ - if: '$CI_PROJECT_NAMESPACE =3D=3D $RUN_UPSTREAM_NAMESPACE && $CI_PIP= ELINE_SOURCE =3D=3D "push" && $CI_COMMIT_BRANCH =3D=3D $CI_DEFAULT_BRANCH' when: on_success + # forks: pushes to a branch when a pipeline run in upstream env is exp= licitly requested + - if: '$CI_PROJECT_NAMESPACE !=3D $RUN_UPSTREAM_NAMESPACE && $CI_PIPEL= INE_SOURCE =3D=3D "push" && $RUN_PIPELINE_UPSTREAM_ENV && $JOB_OPTIONAL' + when: manual + allow_failure: true + - if: '$CI_PROJECT_NAMESPACE !=3D $RUN_UPSTREAM_NAMESPACE && $CI_PIPEL= INE_SOURCE =3D=3D "push" && $RUN_PIPELINE_UPSTREAM_ENV' + when: on_success + # upstream: other web/api/scheduled pipelines targeting the default br= anch - if: '$CI_PROJECT_NAMESPACE =3D=3D $RUN_UPSTREAM_NAMESPACE && $CI_PIP= ELINE_SOURCE =3D~ /(web|api|schedule)/ && $CI_COMMIT_REF_NAME =3D=3D $CI_DE= FAULT_BRANCH && $JOB_OPTIONAL' when: manual @@ -75,6 +82,11 @@ - if: '$CI_PROJECT_NAMESPACE =3D=3D $RUN_UPSTREAM_NAMESPACE && $CI_PIP= ELINE_SOURCE =3D=3D "push" && $CI_COMMIT_BRANCH !=3D $CI_DEFAULT_BRANCH' when: on_success + # forks: avoid build in local env when job requests run in upstream co= ntainers + - if: '$CI_PROJECT_NAMESPACE !=3D $RUN_UPSTREAM_NAMESPACE && $CI_PIPEL= INE_SOURCE =3D=3D "push" && $RUN_PIPELINE_UPSTREAM_ENV' + when: never + + # forks: pushes to branches with pipeline requested - if: '$CI_PROJECT_NAMESPACE !=3D $RUN_UPSTREAM_NAMESPACE && $CI_PIPEL= INE_SOURCE =3D=3D "push" && $RUN_PIPELINE && $JOB_OPTIONAL' when: manual allow_failure: true @@ -151,6 +163,13 @@ - if: '$CI_PROJECT_NAMESPACE =3D=3D $RUN_UPSTREAM_NAMESPACE && $CI_PIP= ELINE_SOURCE =3D=3D "push" && $CI_COMMIT_BRANCH =3D=3D $CI_DEFAULT_BRANCH' when: on_success + # forks: pushes to a branch when a pipeline run in upstream env is exp= licitly requested + - if: '$CI_PROJECT_NAMESPACE !=3D $RUN_UPSTREAM_NAMESPACE && $CI_PIPEL= INE_SOURCE =3D=3D "push" && $RUN_PIPELINE_UPSTREAM_ENV && $JOB_OPTIONAL' + when: manual + allow_failure: true + - if: '$CI_PROJECT_NAMESPACE !=3D $RUN_UPSTREAM_NAMESPACE && $CI_PIPEL= INE_SOURCE =3D=3D "push" && $RUN_PIPELINE_UPSTREAM_ENV' + when: on_success + # upstream: other web/api/scheduled pipelines targeting the default br= anch - if: '$CI_PROJECT_NAMESPACE =3D=3D $RUN_UPSTREAM_NAMESPACE && $CI_PIP= ELINE_SOURCE =3D~ /(web|api|schedule)/ && $CI_COMMIT_REF_NAME =3D=3D $CI_DE= FAULT_BRANCH && $JOB_OPTIONAL' when: manual @@ -189,6 +208,11 @@ - if: '$CI_PROJECT_NAMESPACE =3D=3D $RUN_UPSTREAM_NAMESPACE && $CI_PIP= ELINE_SOURCE =3D=3D "push" && $CI_COMMIT_BRANCH !=3D $CI_DEFAULT_BRANCH' when: on_success + # forks: avoid build in local env when job requests run in upstream co= ntainers + - if: '$CI_PROJECT_NAMESPACE !=3D $RUN_UPSTREAM_NAMESPACE && $CI_PIPEL= INE_SOURCE =3D=3D "push" && $RUN_PIPELINE_UPSTREAM_ENV' + when: never + + # forks: pushes to branches with pipeline requested - if: '$CI_PROJECT_NAMESPACE !=3D $RUN_UPSTREAM_NAMESPACE && $CI_PIPEL= INE_SOURCE =3D=3D "push" && $RUN_PIPELINE && $JOB_OPTIONAL' when: manual allow_failure: true @@ -272,12 +296,17 @@ - if: '$CI_PROJECT_NAMESPACE =3D=3D $RUN_UPSTREAM_NAMESPACE && $CI_PIP= ELINE_SOURCE =3D=3D "push"' when: on_success - # forks: pushes to branches with pipeline requested + # forks: pushes to branches with pipeline requested (including pipelin= e in upstream environment) - if: '$CI_PROJECT_NAMESPACE !=3D $RUN_UPSTREAM_NAMESPACE && $CI_PIPEL= INE_SOURCE =3D=3D "push" && $RUN_PIPELINE && $JOB_OPTIONAL' when: manual allow_failure: true - if: '$CI_PROJECT_NAMESPACE !=3D $RUN_UPSTREAM_NAMESPACE && $CI_PIPEL= INE_SOURCE =3D=3D "push" && $RUN_PIPELINE' when: on_success + - if: '$CI_PROJECT_NAMESPACE !=3D $RUN_UPSTREAM_NAMESPACE && $CI_PIPEL= INE_SOURCE =3D=3D "push" && $RUN_PIPELINE_UPSTREAM_ENV && $JOB_OPTIONAL' + when: manual + allow_failure: true + - if: '$CI_PROJECT_NAMESPACE !=3D $RUN_UPSTREAM_NAMESPACE && $CI_PIPEL= INE_SOURCE =3D=3D "push" && $RUN_PIPELINE_UPSTREAM_ENV' + when: on_success # upstream+forks: Run pipelines on MR, web, api & scheduled - if: '$CI_PIPELINE_SOURCE =3D~ /(web|api|schedule|merge_request_event= )/ && $JOB_OPTIONAL' diff --git a/ci/gitlab/sanity-checks.yml b/ci/gitlab/sanity-checks.yml index 4e33b2dfe3..d2b1768e26 100644 --- a/ci/gitlab/sanity-checks.yml +++ b/ci/gitlab/sanity-checks.yml @@ -17,9 +17,11 @@ check-dco: - if: '$CI_PIPELINE_SOURCE =3D~ "merge_request_event"' when: on_success - # forks: pushes to branches with pipeline requested + # forks: pushes to branches with pipeline requested (including upstrea= m env pipelines) - if: '$CI_PROJECT_NAMESPACE !=3D $RUN_UPSTREAM_NAMESPACE && $CI_PIPEL= INE_SOURCE =3D=3D "push" && $CI_COMMIT_BRANCH && $RUN_PIPELINE' when: on_success + - if: '$CI_PROJECT_NAMESPACE !=3D $RUN_UPSTREAM_NAMESPACE && $CI_PIPEL= INE_SOURCE =3D=3D "push" && $CI_COMMIT_BRANCH && $RUN_PIPELINE_UPSTREAM_ENV' + when: on_success # upstream+forks: that's all folks - when: never --=20 2.39.2