From nobody Mon May 6 10:28:38 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1555399443; cv=none; d=zoho.com; s=zohoarc; b=adK9L+Rq+8rCvXdQZO/78cWELiP/qDGazzUDvqMdJTe3yAP6QzqliesFE2gDzwQK0EMe5zZuPosjF2C+WnINn2XWO1iiHWn2IPoZgZAMIRmUHRrxsghtyzDxV0dL5i4a2NlXUtDAx0Jwxu20OXkbKZHJFZHvs9wOHfcc6C8e+38= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1555399443; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To:ARC-Authentication-Results; bh=vB79dFFtj401Wxxx7flTedBQTCIKNdWLf9WUDbglLDA=; b=MJvTTh4zu0WvQ+2gjdsb3wGlcCRoCxKRBHZgasbc8GgOecSmtG5Y6ejmYgZoZO/m7oJedBOl8YB6wT0UbK9ATwhI0ST2aJ1pi4/SsOtL36Ioh2UxlYneL3zY5zaJEFrn+Wa5bUOXJRFk1JC4ecuHSpoMSuJ0lyx9N/GqFTTKBQ0= ARC-Authentication-Results: i=1; mx.zoho.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) 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 155539944294022.38982413468011; Tue, 16 Apr 2019 00:24:02 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hGIQX-0000vP-GD; Tue, 16 Apr 2019 07:22:45 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hGIQW-0000uM-4d for xen-devel@lists.xenproject.org; Tue, 16 Apr 2019 07:22:44 +0000 Received: from SMTP03.CITRIX.COM (unknown [162.221.156.55]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTPS id 6c59cbae-6018-11e9-92d7-bc764e045a96; Tue, 16 Apr 2019 07:22:42 +0000 (UTC) X-Inumbo-ID: 6c59cbae-6018-11e9-92d7-bc764e045a96 X-IronPort-AV: E=Sophos;i="5.60,355,1549929600"; d="scan'208";a="83659430" From: Wei Liu To: Date: Tue, 16 Apr 2019 08:21:39 +0100 Message-ID: <20190416072139.490-1-wei.liu2@citrix.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Subject: [Xen-devel] [PATCH] gitlab-ci: allow specifying base and tip in build test X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Doug Goldstein , Wei Liu Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" We will soon provide this new capability to humans and automated systems. The default behaviour is retained: tip and base are passed by Gitlab CI. Signed-off-by: Wei Liu Acked-by: Doug Goldstein --- automation/gitlab-ci/build-each-commit.sh | 10 +++++----- automation/gitlab-ci/test.yaml | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/automation/gitlab-ci/build-each-commit.sh b/automation/gitlab-= ci/build-each-commit.sh index 879028b5a7..19e337b468 100755 --- a/automation/gitlab-ci/build-each-commit.sh +++ b/automation/gitlab-ci/build-each-commit.sh @@ -1,18 +1,18 @@ #!/bin/bash =20 # For a newly pushed branch the BEFORE_SHA will be all 0s -if [[ ${CI_COMMIT_BEFORE_SHA} =3D=3D 0000000000000000000000000000000000000= 000 ]]; then +if [[ ${BASE} =3D=3D 0000000000000000000000000000000000000000 ]]; then echo "Newly pushed branch, skipped" exit 0 fi =20 -git merge-base --is-ancestor ${CI_COMMIT_BEFORE_SHA} ${CI_COMMIT_SHA} +git merge-base --is-ancestor ${BASE} ${TIP} if [[ $? -ne 0 ]]; then - echo "${CI_COMMIT_SHA} is not a descendent of ${CI_COMMIT_BEFORE_SHA},= skipped" + echo "${TIP} is not a descendent of ${BASE}, skipped" exit 0 fi =20 -echo "Building ${CI_COMMIT_BEFORE_SHA}..${CI_COMMIT_SHA}" +echo "Building ${BASE}..${TIP}" =20 -NON_SYMBOLIC_REF=3D1 ./automation/scripts/build-test.sh ${CI_COMMIT_BEFORE= _SHA} ${CI_COMMIT_SHA} \ +NON_SYMBOLIC_REF=3D1 ./automation/scripts/build-test.sh ${BASE} ${TIP} \ bash -c "git clean -ffdx && ./automation/scripts/build" diff --git a/automation/gitlab-ci/test.yaml b/automation/gitlab-ci/test.yaml index d4556afe11..a795866673 100644 --- a/automation/gitlab-ci/test.yaml +++ b/automation/gitlab-ci/test.yaml @@ -7,7 +7,7 @@ build-each-commit-gcc: XEN_TARGET_ARCH: x86_64 CC: gcc script: - - ./automation/gitlab-ci/build-each-commit.sh 2>&1 | tee build-each-co= mmit-gcc.log + - BASE=3D${BASE_SHA:-${CI_COMMIT_BEFORE_SHA}} TIP=3D${TIP_SHA:-${CI_CO= MMIT_SHA}} ./automation/gitlab-ci/build-each-commit.sh 2>&1 | tee build-eac= h-commit-gcc.log artifacts: paths: - '*.log' --=20 2.20.1 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel