Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 25180200D0C for ; Wed, 20 Sep 2017 18:48:23 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 239C21609E2; Wed, 20 Sep 2017 16:48:23 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 630EB1609D8 for ; Wed, 20 Sep 2017 18:48:22 +0200 (CEST) Received: (qmail 85405 invoked by uid 500); 20 Sep 2017 16:48:21 -0000 Mailing-List: contact commits-help@yetus.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@yetus.apache.org Delivered-To: mailing list commits@yetus.apache.org Received: (qmail 85394 invoked by uid 99); 20 Sep 2017 16:48:21 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Sep 2017 16:48:21 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 616A4F5661; Wed, 20 Sep 2017 16:48:21 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: aw@apache.org To: commits@yetus.apache.org Message-Id: <9a8bc79817cc4a86b174326a1b815144@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: yetus git commit: YETUS-536 Jira plugin should output the information about curl failure in debug mode. Date: Wed, 20 Sep 2017 16:48:21 +0000 (UTC) archived-at: Wed, 20 Sep 2017 16:48:23 -0000 Repository: yetus Updated Branches: refs/heads/master 4315582d4 -> 8343bd0fe YETUS-536 Jira plugin should output the information about curl failure in debug mode. Signed-off-by: Allen Wittenauer Project: http://git-wip-us.apache.org/repos/asf/yetus/repo Commit: http://git-wip-us.apache.org/repos/asf/yetus/commit/8343bd0f Tree: http://git-wip-us.apache.org/repos/asf/yetus/tree/8343bd0f Diff: http://git-wip-us.apache.org/repos/asf/yetus/diff/8343bd0f Branch: refs/heads/master Commit: 8343bd0fe6f9ea14461076a57b21e6d857aad3f0 Parents: 4315582 Author: Mano Kovacs Authored: Fri Aug 18 12:08:57 2017 +0200 Committer: Allen Wittenauer Committed: Wed Sep 20 09:48:12 2017 -0700 ---------------------------------------------------------------------- precommit/test-patch.d/jira.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/yetus/blob/8343bd0f/precommit/test-patch.d/jira.sh ---------------------------------------------------------------------- diff --git a/precommit/test-patch.d/jira.sh b/precommit/test-patch.d/jira.sh index cce82a0..eedb1ff 100755 --- a/precommit/test-patch.d/jira.sh +++ b/precommit/test-patch.d/jira.sh @@ -97,6 +97,7 @@ function jira_http_fetch { declare input=$1 declare output=$2 + declare ec yetus_debug "jira_http_fetch: ${JIRA_URL}/${input}" if [[ -n "${JIRA_USER}" @@ -112,6 +113,27 @@ function jira_http_fetch --location \ "${JIRA_URL}/${input}" fi + ec=$? + case "${ec}" in + "0") + ;; + "1") + yetus_debug "jira_http_fetch: Unsupported protocol. Maybe misspelled jira's url?" + ;; + "3") + yetus_debug "jira_http_fetch: ${JIRA_URL}/${input} url is malformed." + ;; + "6") + yetus_debug "jira_http_fetch: Could not resolve host in URL ${JIRA_URL}." + ;; + "22") + yetus_debug "jira_http_fetch: ${JIRA_URL}/${input} returned 4xx status code. Maybe incorrect username/password?" + ;; + *) + yetus_debug "jira_http_fetch: ${JIRA_URL}/${input} returned $ec error code. See https://ec.haxx.se/usingcurl-returns.html for details." + ;; + esac + return ${ec} } function jira_locate_patch