From nobody Mon Feb 9 01:51:31 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1690883900197235.9640716438313; Tue, 1 Aug 2023 02:58:20 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.574028.899201 (Exim 4.92) (envelope-from ) id 1qQm8i-0001UP-Ej; Tue, 01 Aug 2023 09:58:04 +0000 Received: by outflank-mailman (output) from mailman id 574028.899201; Tue, 01 Aug 2023 09:58:04 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qQm8i-0001UG-Br; Tue, 01 Aug 2023 09:58:04 +0000 Received: by outflank-mailman (input) for mailman id 574028; Tue, 01 Aug 2023 09:58:03 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qQm8h-0001NH-9v for xen-devel@lists.xenproject.org; Tue, 01 Aug 2023 09:58:03 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id e62f2a7e-3051-11ee-8613-37d641c3527e; Tue, 01 Aug 2023 11:58:00 +0200 (CEST) Received: from beta.station (net-188-218-251-179.cust.vodafonedsl.it [188.218.251.179]) by support.bugseng.com (Postfix) with ESMTPSA id 1D9A84EE0737; Tue, 1 Aug 2023 11:58:01 +0200 (CEST) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: e62f2a7e-3051-11ee-8613-37d641c3527e From: Simone Ballarin To: xen-devel@lists.xenproject.org Cc: consulting@bugseng.com, Simone Ballarin , Doug Goldstein , Stefano Stabellini Subject: [XEN PATCH 1/4] automation/eclair: add support for tag pipelines Date: Tue, 1 Aug 2023 11:57:01 +0200 Message-Id: <5e79b954062385c4d765c32347bcb45896d3ed5e.1690881495.git.simone.ballarin@bugseng.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1690883904322100001 Content-Type: text/plain; charset="utf-8" The ECLAIR jobs fail when triggered by tag pipelines (e.g. xen-project/patchew/xen). This patch extends the integration to support such pipelines. Signed-off-by: Simone Ballarin Acked-by: Stefano Stabellini --- .../eclair_analysis/ECLAIR/action.settings | 24 ++++++++++++------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/automation/eclair_analysis/ECLAIR/action.settings b/automation= /eclair_analysis/ECLAIR/action.settings index 96426811a8..71c10d5141 100644 --- a/automation/eclair_analysis/ECLAIR/action.settings +++ b/automation/eclair_analysis/ECLAIR/action.settings @@ -41,7 +41,7 @@ github) push | workflow_dispatch) event=3Dpush # Extract the branch name from "refs/heads/" - branch=3D"${GITHUB_REF#refs/heads/}" + ref=3D"${GITHUB_REF#refs/heads/}" headCommitId=3D"${GITHUB_SHA}" pushUser=3D"${GITHUB_ACTOR}" ;; @@ -75,7 +75,13 @@ gitlab) ;; push | pipeline | web) event=3Dpush - branch=3D"${CI_COMMIT_BRANCH}" + if [ -n "${CI_COMMIT_BRANCH:-}" ]; then + ref_kind=3Dbranch + ref=3D"${CI_COMMIT_BRANCH}" + else + ref_kind=3Dtag + ref=3D"${CI_COMMIT_TAG}" + fi headCommitId=3D"${CI_COMMIT_SHA}" pushUser=3D"${GITLAB_USER_NAME}" ;; @@ -99,7 +105,7 @@ jenkins) jenkinsBotToken=3D"${ECLAIR_BOT_TOKEN:-}" =20 event=3Dpush - branch=3D"${GIT_BRANCH}" + ref=3D"${GIT_BRANCH}" headCommitId=3D"${GIT_COMMIT}" pushUser=3D$(git show --pretty=3D'format:%aN' -s) ;; @@ -111,7 +117,7 @@ esac =20 if [ "${event}" =3D "push" ] && [ -n "${autoPRBranch:-}" ]; then # AUTO PR Feature enabled - if ! [ "${branch}" =3D "${autoPRBranch}" ] || + if ! [ "${ref}" =3D "${autoPRBranch}" ] || ! [ "${repository}" =3D "${autoPRRepository}" ]; then event=3Dauto_pull_request fi @@ -123,17 +129,17 @@ pull_request) jobHeadline=3D"ECLAIR ${ANALYSIS_KIND} on repository ${repository}: ${= pullRequestUser} wants to merge ${pullRequestHeadRepo}:${pullRequestHeadRef= } (${headCommitId}) into ${pullRequestBaseRef} (${baseCommitId})" ;; push) - subDir=3D"${branch}" - jobHeadline=3D"ECLAIR ${ANALYSIS_KIND} on repository ${repository}: br= anch ${branch} (${headCommitId})" - badgeLabel=3D"ECLAIR ${ANALYSIS_KIND} ${branch}${variantHeadline} #${j= obId}" + subDir=3D"${ref}" + jobHeadline=3D"ECLAIR ${ANALYSIS_KIND} on repository ${repository}: ${= ref_kind} ${ref} (${headCommitId})" + badgeLabel=3D"ECLAIR ${ANALYSIS_KIND} ${ref}${variantHeadline} #${jobI= d}" ;; auto_pull_request) git remote remove autoPRRemote || true git remote add autoPRRemote "${autoPRRemoteUrl}" git fetch -q autoPRRemote - subDir=3D"${branch}" + subDir=3D"${ref}" baseCommitId=3D$(git merge-base "autoPRRemote/${autoPRBranch}" HEAD) - jobHeadline=3D"ECLAIR ${ANALYSIS_KIND} on repository ${repository}: ${= pushUser} wants to merge ${repository}:${branch} (${headCommitId}) into ${a= utoPRRepository}/${autoPRBranch} (${baseCommitId})" + jobHeadline=3D"ECLAIR ${ANALYSIS_KIND} on repository ${repository}: ${= pushUser} wants to merge ${repository}:${ref} (${headCommitId}) into ${auto= PRRepository}/${autoPRBranch} (${baseCommitId})" ;; *) echo "Unexpected event ${event}" >&2 --=20 2.34.1