From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id C79F7A0C54 for ; Mon, 6 Sep 2021 17:46:57 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C2E58410ED; Mon, 6 Sep 2021 17:46:57 +0200 (CEST) Received: from AZHDRRW-EX01.nvidia.com (azhdrrw-ex01.nvidia.com [20.51.104.162]) by mails.dpdk.org (Postfix) with ESMTP id 01C4F410E9 for ; Mon, 6 Sep 2021 17:46:55 +0200 (CEST) Received: from NAM04-DM6-obe.outbound.protection.outlook.com (104.47.73.40) by mxs.oss.nvidia.com (10.13.234.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.858.15; Mon, 6 Sep 2021 08:46:55 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QeeNdIcdygbm//ZrYdx95AT7gJxdmEkONBLDdDn9zcfjGglLM7vtXxiwvFAqUNJ+XjyhYC+wh9/EhLaud8Eevr8AGpwO2S85R7b7aRxlJV4n40pnawx05rdmfAVUY9FsAwM0CL55hrlB5Q2pjkdUICQqU0bQH6cCh1tcD2/nXCBEL2HiwT1wPQ0Yp1RKGNyTA42+61U9uAv0tIKH6W1YlNgYwJwWSxqFSuSqJRk/XfpYXRA0NOtduGgNF+6z6gYV3YgPZ8pQFjX2ZVo1ruC6LzWSk2A01lxksEaQ1eTPKYsFuj5uIUOJk3QLJIpNKK2aL1xuOUMHjKjCkaGO8VJRvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=HJ6MPZoOVuD6q0Q3N2yxMsgD4SkkSKfj5t6nsnGZZfg=; b=UH+pusLn0PKqK7ULw2QdKJWtQ0T0X3Vwx1MHcQFSg7TrOTxcPwZ1TqQDHl2BPw4TDH95mFwkLW0wxE3bBTQfyUv/Ejs7v6SogdRJMzzMh5173s/7bajTWcnQoMZxT/2R6fRcUq2h/YtwnMqqgDN6XByKhx+YuhyiEcV7j/yqv5dDsd780giKHPwF1QYrNLi+RpT4jRO4R4FIQOgUNBJyVBNui4rFruvZwzZdhGgrDaPP4GXJsRnj3p3U9wYgyIUepUBF4HUw/M5bMUJhHtLW8+KpCLmpRJPmel18mooy6TbkjaSHlD1LN3WzrufoqNk8nqnD3EW7jTi/c9Ouu/Htbg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.32) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=HJ6MPZoOVuD6q0Q3N2yxMsgD4SkkSKfj5t6nsnGZZfg=; b=M7Pyrv1eK1hkeyax73SsVgKgClDa1zqkyubky832gUdNxun8s6LgXW1LWHTR1EIJc6LV0TejOjIwK7veNE+IcCnO/mRb/tM7+mlz9X/5txbDZ6eaS5WTTQgUljT5aCIXS76g8+daY1gVpWY5zrwGYSVO/bBc7PLzGyvwGgiiPMZhk2DHSM5iZgQeylFmkdV4egESGqRLm4oD1Dp+PGYRZ84w0RiuC8o3ule3hj38+3clWZYlBScITsPHEx7akIutV8gOWaoXTZE2bqW5nvY3NacO4Ym4RCAP/jcexGre3cbOEcxFcQX+kjwdVP2Ck4emQ5QGHaLrUpMmYlsGjta1UA== Received: from BN0PR07CA0005.namprd07.prod.outlook.com (2603:10b6:408:141::20) by BN9PR12MB5049.namprd12.prod.outlook.com (2603:10b6:408:132::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4478.19; Mon, 6 Sep 2021 15:46:52 +0000 Received: from BN8NAM11FT028.eop-nam11.prod.protection.outlook.com (2603:10b6:408:141:cafe::75) by BN0PR07CA0005.outlook.office365.com (2603:10b6:408:141::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4478.20 via Frontend Transport; Mon, 6 Sep 2021 15:46:52 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.32) smtp.mailfrom=nvidia.com; dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.112.32 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.32; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.32) by BN8NAM11FT028.mail.protection.outlook.com (10.13.176.225) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4478.19 via Frontend Transport; Mon, 6 Sep 2021 15:46:52 +0000 Received: from DRHQMAIL107.nvidia.com (10.27.9.16) by HQMAIL109.nvidia.com (172.20.187.15) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Mon, 6 Sep 2021 08:46:51 -0700 Received: from nvidia.com (172.20.187.6) by DRHQMAIL107.nvidia.com (10.27.9.16) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Mon, 6 Sep 2021 15:46:49 +0000 From: Ali Alnubani To: CC: , , , Date: Mon, 6 Sep 2021 18:45:36 +0300 Message-ID: <20210906154537.1299-9-alialnu@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210906154537.1299-1-alialnu@nvidia.com> References: <20210906154537.1299-1-alialnu@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.187.6] X-ClientProxiedBy: HQMAIL111.nvidia.com (172.20.187.18) To DRHQMAIL107.nvidia.com (10.27.9.16) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b96de1ba-db90-4586-956c-08d9714d8c34 X-MS-TrafficTypeDiagnostic: BN9PR12MB5049: X-LD-Processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr X-Microsoft-Antispam-PRVS: X-MS-Exchange-Transport-Forked: True X-MS-Oob-TLC-OOBClassifiers: OLM:3968; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: wMFPfegpacD+Iac3XhX02uCz5g8ADr3fCHiDWFJTwx318+5AllX2u/NvbBwgX4PQ2NLBZ8/LyJrQ5gJPFY6Znl16JU1qFFCOrYlJB0lF425CrN8le+AVcoHfax/W6upM6bURFIewDE9FDoy3T1WixE/hTk0yUHmnuQK879iUWDLEHd5btUMRd58aihJmBEs8SNCOk+kI6n+XxseZ7qQGtCAAOc9wIl7ckkfHyYbNAELE7RKFLdQb79keLABWentdGl3suC1mB+TSd2b8U+wMDjlupc1FkNyYxFEtfaUTwMc4bAjFOHqHNfP55uDUrckEwJLPEp7XwZKtn2zVx531qoBMsQAJwWPqpmqf94uj8dYaCnYY26nZkuSTPD7HWIqdO4w/mcA9fRo47SfJVOa8fRcCj/7mFSn/SCsgVCjbNdXxZRdTSx69UpPnVtzuKIp1JNddNaq+N2+OBEwjpJMhj5ohfMrhGq0mbZ2oZZl7l9y20BHt0NPwat5RkYigMNP45GCVoOVIHv723P5wmWKQ74bZTbO0mwYVpVoHrEYDPInrNwOagyLU/rUyKSDKioja2S02ZLbXj8ReRetsET3VfvSKlHIgqD9dxiHxBBH5ZHIKhd4Og8PKamXhrCwXzAQ0dsr+gPCjsT5eeWN87DMGSwGzard0imtxKn5lsG2KT1nU0as9EX9LUKlwGkueHtaauAnOmT+IoXb/LnGAA0+t2Q== X-Forefront-Antispam-Report: CIP:216.228.112.32; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid01.nvidia.com; CAT:NONE; SFS:(4636009)(376002)(39860400002)(346002)(396003)(136003)(46966006)(36840700001)(55016002)(26005)(8936002)(6286002)(82740400003)(7636003)(426003)(47076005)(83380400001)(6666004)(316002)(82310400003)(2906002)(36860700001)(36756003)(8676002)(1076003)(5660300002)(2616005)(336012)(4326008)(356005)(86362001)(6916009)(186003)(16526019)(478600001)(107886003)(70586007)(70206006)(7696005)(54906003); DIR:OUT; SFP:1101; X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Sep 2021 15:46:52.6683 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b96de1ba-db90-4586-956c-08d9714d8c34 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.112.32]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT028.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN9PR12MB5049 Subject: [dpdk-ci] [PATCH 8/9] tools: add support for fetching new series IDs X-BeenThere: ci@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK CI discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ci-bounces@dpdk.org Sender: "ci" The script can now fetch new series IDs the same way it fetches new patch IDs. Example usage: $ export TZ="Europe/Paris" $ export MAINTAINERS_FILE_PATH=/path/to/dpdk/MAINTAINERS $ ./tools/poll-pw series /path/to/last.txt \ '/path/to/maintainers.py --command set_pw_delegate --type series $1' Signed-off-by: Ali Alnubani --- tools/poll-pw | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/tools/poll-pw b/tools/poll-pw index e104dab..6017146 100755 --- a/tools/poll-pw +++ b/tools/poll-pw @@ -9,11 +9,11 @@ PAUSE_SECONDS=100 print_usage () { cat <<- END_OF_HELP - usage: $(basename $0) [OPTIONS] + usage: $(basename $0) [OPTIONS] - Poll patchwork and call command for each patch. + Poll patchwork and call a command for each new patch/series id. The first date to filter with is read from the specified file. - The command should use '$1' to be evaluated as the patch id. + The command should use '$1' to be evaluated as the patch/series id. The date in the specifed file is updated after each pull. END_OF_HELP } @@ -31,16 +31,22 @@ while getopts h arg ; do esac done -if [ $# -lt 2 ] ; then +if [ $# -lt 3 ] ; then printf 'missing argument(s)\n\n' >&2 print_usage >&2 exit 1 fi shift $(($OPTIND - 1)) -since_file=$1 -shift +resource_type=$1 +since_file=$2 +shift 2 cmd=$* +if ! curl -sfIo /dev/null $URL/$resource_type ; then + echo "API endpoint '$URL/$resource_type' doesn't exist or inaccessible." + exit 1 +fi + if [ ! -f "$since_file" ] ; then echo "The file '$since_file' doesn't exist." exit 1 @@ -52,7 +58,7 @@ if [ ! $? -eq 0 ] ; then exit 1 fi -URL="${URL}/patches/?" +URL="${URL}/${resource_type}/?" callcmd () # { -- 2.25.1