From 56f35d2fa8eaacdecea72835bf7f87d133183e8c Mon Sep 17 00:00:00 2001 From: Dave Martin Date: Sun, 18 Oct 2015 10:43:37 +0100 Subject: [PATCH] Update .travis.yml --- .travis.yml | 39 +++++++++------------------------------ 1 file changed, 9 insertions(+), 30 deletions(-) diff --git a/.travis.yml b/.travis.yml index aab09068..d6b31157 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,41 +1,20 @@ language: groovy -sudo: false jdk: - oraclejdk7 +sudo: false branches: only: - master before_install: -- export TZ=Australia/Canberra -- date -- rm -rf ~/.gvm -- curl -s get.gvmtool.net > ~/install_gvm.sh -- chmod 775 ~/install_gvm.sh -- ~/install_gvm.sh -- echo "gvm_auto_answer=true" > ~/.gvm/etc/config -- source ~/.gvm/bin/gvm-init.sh -- GRAILS_VERSION=`grep '^\s*app.grails.version' application.properties | sed -e 's/^\s*app\.grails\.version=//g' - | tr -d "\r"` -- echo "GRAILS_VERSION:$GRAILS_VERSION" -- gvm install grails $GRAILS_VERSION || true -before_script: -- GRAILS_VERSION_NUMBER=`echo $GRAILS_VERSION | sed -e 's/\.[0-9]*$//g' -e 's/\.//g' - | tr -d "\r"` -- echo "GRAILS_VERSION_NUMBER:$GRAILS_VERSION_NUMBER" -- GRAILS_SETTINGS_FILE="travis_grails_settings_new.groovy" -- if [ "$GRAILS_VERSION_NUMBER" -lt "23" ]; then GRAILS_SETTINGS_FILE="travis_grails_settings_old.groovy"; - fi; -- echo "GRAILS_SETTINGS_FILE:$GRAILS_SETTINGS_FILE" -- mkdir -p ~/.grails; wget -q -O ~/.grails/settings.groovy https://raw.githubusercontent.com/AtlasOfLivingAustralia/travis-build-configuration/master/$GRAILS_SETTINGS_FILE -- MAVEN_REPO="ala-repo-snapshot" -- grep '^\s*app\.version=' ./application.properties | grep -q "\-SNAPSHOT"; if [ "$?" - = "1" ]; then MAVEN_REPO="ala-repo-release"; fi; -- echo "MAVEN_REPO:$MAVEN_REPO" +- wget -q https://raw.githubusercontent.com/AtlasOfLivingAustralia/travis-build-configuration/master/ala_common.sh +- chmod +x ala_common.sh +- source ./ala_common.sh + +- ala_travis_grails_setup_env + script: -- grails clean && grails refresh-dependencies --non-interactive && grails prod war - --non-interactive && grails prod maven-install --non-interactive -after_success: '[ "${TRAVIS_PULL_REQUEST}" = "false" ] && grails prod maven-deploy - --repository=$MAVEN_REPO --non-interactive' +- ala_travis_grails_build + env: global: - secure: M5RdnCEQHqRvytpOCDWhxSw6oOZLGYODdhHkmCy+5z8zKLWYchwcCSOdGgmEGU9oeEndg1erPKXuvRlpjWHq2VnaFh2EVg8rA82LoB4PkOzqwmCevLdTL6R+ePO/ZHoZo2PoLSbGHV38RkhFI+GTa9s+4/JZjNrm45a2eJx+GaU=