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 D3B82A0C4C for ; Tue, 21 Sep 2021 16:36:53 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CEC4B41145; Tue, 21 Sep 2021 16:36:53 +0200 (CEST) Received: from AZHDRRW-EX01.nvidia.com (azhdrrw-ex01.nvidia.com [20.51.104.162]) by mails.dpdk.org (Postfix) with ESMTP id D856B4003C for ; Tue, 21 Sep 2021 16:36:52 +0200 (CEST) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.176) 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; Tue, 21 Sep 2021 07:36:52 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GhYzfe/TLjiC7amblxpA1fr3dB0fIXUsbNAr0K+nlxvHbUBbdsu5eRb9PXwJQBJzRzlZ5E3rHLWH43FqRpXU/c6aiMYmShQw1mdsPmUbZ9gI9REs5bu+t61JE2cgB9W+7Ri4xQ4QRDPx+i/HE9NNYR7pERVeZy5rp441/7KSZ63Dgr9SotEihdDkowqa/iKr/ANmmruu4Jx6fWwxutPn/Bf1uGXdmN8rKAtl021XQQC2/CbQJm3NIwlxT0k+zgtKQ5v1Z903sXwoT2HOIhNJaIPnBwOOJN71bEIL1mXK7zTch+p5Ax7ixVuakV7w/QrXm3EEjjvj6rqldwpYOgfNRA== 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=V8Q6qtSvAQ599C0oO/fVKNzCZfVg8JxUc+nnCj6cZRA=; b=TVQ7uXm49jzE1qFZyRJG47IW9Nquz1x5CjhTsaqVE1uzh10qh37Wd7PcvTrl+Z4piyfxG62TJEi3dRbVHb/F3oEHOcKwtZHAwA2+EL/LMVOQkWPHzAaIyaGVK9vR61akI5jXEE9fJ4xGaIswhg+NSHpVSKQnyqakG6z2H+tOIE80fBW0dtJ5DwluQDA1RzWg+xi/G9Oh9cx1jtsqh0RznkzU4j7luQSEcEf079cm8cKCY4xns2Pa1iXFob0Zn4vCUmfP5UB3jyIvXxObrwc+jqLQSTA3TJbmeZVs7w2CZCrZtVa53c3iat5OzvQV2kALBN52ndcoQZSrRPJmapZYjA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) 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=V8Q6qtSvAQ599C0oO/fVKNzCZfVg8JxUc+nnCj6cZRA=; b=azQFsLOxeLtPYt45wwPBIy/fUsYv4igcil2zy/wcJFOj/rlPjmnuGzArnIBT/UXGg5OnGlL44+02ukaVtuxcF7tlw5P/+V+JvpvPDSujAVLsB7dqUZXHlSkDHo5mh+gAVB/3KfbiFr76uh6Ijk+dbvWXr9twO945XKfKTPEEDPcHw8LrjsJhvBBf4roWJAzSosP54ta1Nf0VGylk29ii11unSPlD1unq0kOP38tr3Z6i46pzguiET24UiCtelm1qJokm7RBLar8NnA68LxvUrkFHfBn4TB/qc0fwffFiBNVb8OVcmg4znq8PhQepAwdAqx8R40edngP+TpDWFUf23g== Received: from BN0PR04CA0027.namprd04.prod.outlook.com (2603:10b6:408:ee::32) by MN2PR12MB3519.namprd12.prod.outlook.com (2603:10b6:208:107::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.13; Tue, 21 Sep 2021 14:36:49 +0000 Received: from BN8NAM11FT024.eop-nam11.prod.protection.outlook.com (2603:10b6:408:ee:cafe::34) by BN0PR04CA0027.outlook.office365.com (2603:10b6:408:ee::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4523.14 via Frontend Transport; Tue, 21 Sep 2021 14:36:49 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) 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.34 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.34; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.34) by BN8NAM11FT024.mail.protection.outlook.com (10.13.177.38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4523.14 via Frontend Transport; Tue, 21 Sep 2021 14:36:48 +0000 Received: from DRHQMAIL107.nvidia.com (10.27.9.16) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Tue, 21 Sep 2021 14:36:48 +0000 Received: from nvidia.com (172.20.187.5) by DRHQMAIL107.nvidia.com (10.27.9.16) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Tue, 21 Sep 2021 14:36:45 +0000 From: To: CC: , , , , Date: Tue, 21 Sep 2021 17:35:40 +0300 Message-ID: <20210921143542.4412-9-alialnu@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210921143542.4412-1-alialnu@nvidia.com> References: <20210906154537.1299-1-alialnu@nvidia.com> <20210921143542.4412-1-alialnu@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.187.5] 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: 677c99be-c4fa-405a-ec0b-08d97d0d3ec3 X-MS-TrafficTypeDiagnostic: MN2PR12MB3519: 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: iwIy4tFI5gqXGGGFenIFtH8JS12PJ2BcjW9N/6rMnZe+qs+354kxZQ9R9fwi9Jwgc+7lFdZEpvRdtn1g7LGjhQKQ77TcEqeYt/NcI0ct76QrAgMDvfWXLXFCzWZyXivXNxmioe/YYZAYxrnjmIMOyh2rm7QBEcx1+kA2uzNZxRjheEe3pspCCAvIC6OUp5YHMx628mDBXbFuCAPLj9WnyjnsISJwnVZXQuvwWFILpn9H8m0TzD1azovzpdl4g69BkH+xWWB5TbPJbSGnU5UXDwrdkKbNYJUWS9LbHJdAsQcW1qFbsmzh3T2QXcUpry/Ofl+AtRJTuZQjCrw70I1LhuSPTHqrPZh39XfxBsEh6RvR8fOayMomjhlV1wFjYp4soGUrktg2puR1ncf2/AffiF0+ejUW/r1Xq/eGvzPcetQ+4eT5tkQRK5tWXCStnT8joULTZt6qH7ODciENuSXsR3Gcu5cvEofl0pFLDKafc/ZKhDL102cXw64vnu037oZn4zgraL5cqnqI1ci7GWEvosX+QEsg1+74ARlMltekrl9IDnY4pJZFCN1/Qp0E5yozu6BrCs+BKLeK3kck6VEDnnOSzwIk8/3tkNOeWhlyy/HEs8x7Kx4W0u/H2Q31HsYP4GtvCnoy16U3+hGIUgoFrdZvpcOqIDvaQeyYW3zplYgjm+P90HQ9y7XNB3GxlBSFZFbvUENyJkLNsVgESoKQpw== X-Forefront-Antispam-Report: CIP:216.228.112.34; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid03.nvidia.com; CAT:NONE; SFS:(4636009)(46966006)(36840700001)(356005)(7636003)(4326008)(26005)(186003)(16526019)(7696005)(2906002)(426003)(107886003)(2876002)(2616005)(508600001)(336012)(6286002)(55016002)(86362001)(5660300002)(82310400003)(1076003)(70586007)(36756003)(83380400001)(54906003)(47076005)(6666004)(6916009)(70206006)(316002)(36906005)(8936002)(8676002)(36860700001); DIR:OUT; SFP:1101; X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Sep 2021 14:36:48.9120 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 677c99be-c4fa-405a-ec0b-08d97d0d3ec3 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.34]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT024.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB3519 Subject: [dpdk-ci] [PATCH v2 08/10] 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" From: Ali Alnubani 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/pw_maintainers_cli.py --type series set_pw_delegate $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 6ac8a61..bf1af70 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