From commits-return-5525-archive-asf-public=cust-asf.ponee.io@openwhisk.apache.org Mon Aug 13 15:45:24 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 886CF180629 for ; Mon, 13 Aug 2018 15:45:23 +0200 (CEST) Received: (qmail 37311 invoked by uid 500); 13 Aug 2018 13:45:22 -0000 Mailing-List: contact commits-help@openwhisk.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@openwhisk.apache.org Delivered-To: mailing list commits@openwhisk.apache.org Received: (qmail 37302 invoked by uid 99); 13 Aug 2018 13:45:22 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Aug 2018 13:45:22 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id F122182AB0; Mon, 13 Aug 2018 13:45:21 +0000 (UTC) Date: Mon, 13 Aug 2018 13:45:21 +0000 To: "commits@openwhisk.apache.org" Subject: [incubator-openwhisk] branch master updated: Make gradle and dependency downloads more stable. (#3960) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Message-ID: <153416792149.27212.14815341809742681953@gitbox.apache.org> From: chetanm@apache.org X-Git-Host: gitbox.apache.org X-Git-Repo: incubator-openwhisk X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: 0643d4404afacdab8b3bf9a1800957366d604f91 X-Git-Newrev: 7b5d8057ca9dcae9ae170318c39387a3fb684f67 X-Git-Rev: 7b5d8057ca9dcae9ae170318c39387a3fb684f67 X-Git-NotificationType: ref_changed_plus_diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated This is an automated email from the ASF dual-hosted git repository. chetanm pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk.git The following commit(s) were added to refs/heads/master by this push: new 7b5d805 Make gradle and dependency downloads more stable. (#3960) 7b5d805 is described below commit 7b5d8057ca9dcae9ae170318c39387a3fb684f67 Author: Markus Thömmes AuthorDate: Mon Aug 13 15:45:17 2018 +0200 Make gradle and dependency downloads more stable. (#3960) Gradle wrapper and dependency downloads are subject to intermittent failures. This commit adds the travis caching feature to cache the wrapper and caches. Moreover, it retries those downloads to be resilient against hiccups. --- .travis.yml | 11 +++++++++++ tools/travis/setup.sh | 21 +++++++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/.travis.yml b/.travis.yml index 12551d8..b9056cd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -45,6 +45,17 @@ notifications: # travis2slack webhook to enable DMs on openwhisk-team.slack.com to PR authors with TravisCI results secure: "tYJIDAKtHp+yLw53yB6+TQnNfyNwZDAZyG7QmHbNP5Mf1HR0GLhpe02AjV99NkjAgaGYxngUELMhNOyB8eiyMdxpemwny4oOeyOUQzVmiry/804JnjK2YvHyAGFVGuhV0LZVfCPsPh5x91yKcDPLSqRSTKhZOiJFmDpBy4qzxM4W7IXxAM+yHKrm8cznBRdR5rGxT5IjV58xMB1p69jJy1rxnjtEWmB2z7j/SiKa6IQlVYgr+BgaJxBhy9WYYczvceU+qyrTWpVYy5P3o5+b0MZ/UkyB5CZT9N5LzLGjLRDqNaNYCT3U8ow1H6w+zY7/9KrAf6szT6raN606vN7uv7TqGEugG949JQfRSQNe3Y7IvTAHatI9VAc3opWgy0jm7eBu9pzSECamGGSGGHl18m7oWZypiwB+ooKg7k545XQCoVwlRulBvwnVO8w2HOjkKSds/JnNhdXLtNKRaBaZxhBkk+5b4 [...] +# specific cache configuration for gradle based builds +# see: https://docs.travis-ci.com/user/languages/java/#caching +before_cache: + - rm -f $HOME/.gradle/caches/modules-2/modules-2.lock + - rm -fr $HOME/.gradle/caches/*/plugin-resolution/ + +cache: + directories: + - $HOME/.gradle/caches/ + - $HOME/.gradle/wrapper/ + before_install: - pip install --upgrade pip setuptools six - pip3 install --upgrade pip setuptools six diff --git a/tools/travis/setup.sh b/tools/travis/setup.sh index bc16774..f13b58a 100755 --- a/tools/travis/setup.sh +++ b/tools/travis/setup.sh @@ -16,6 +16,20 @@ # limitations under the License. # +# retries a command for five times and exits with the non-zero exit if even after +# the retries the command did not succeed. +function retry() { + local exitcode=0 + for i in {1..5}; + do + exitcode=0 + "$@" && break || exitcode=$? && echo "$i. attempt failed. Will retry $((5-i)) more times!" && sleep 1; + done + if [ $exitcode -ne 0 ]; then + exit $exitcode + fi +} + sudo gpasswd -a travis docker sudo -E bash -c 'echo '\''DOCKER_OPTS="-H tcp://0.0.0.0:4243 -H unix:///var/run/docker.sock --storage-driver=overlay --userns-remap=default"'\'' > /etc/default/docker' @@ -36,3 +50,10 @@ pip install --user ansible==2.5.2 # Azure CosmosDB pip install --user pydocumentdb + +# Basic check that all code compiles and depdendencies are downloaded correctly. +# Compiling the tests will compile all components as well. +# +# Downloads the gradle wrapper, dependencies and tries to compile the code. +# Retried 5 times in case there are network hiccups. +TERM=dumb retry ./gradlew :tests:compileTestScala