forked from AtlasOfLivingAustralia/specieslist-webapp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
38 lines (38 loc) · 1.9 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
language: groovy
jdk:
- oraclejdk7
branches:
only:
- master
before_install:
- 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'`
- 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"
script:
- grails clean && grails refresh-dependencies --non-interactive && grails test-app --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'
env:
global:
- secure: IF4jY8XTU5Nmrqs4aja6sIgC93VgBPxw8ylyoMQhePkB35SK2EHZ5cU7Tx3FSvEmDUQk6cq89toZHiiiGCISdCN3lawDpOFIeMZs3g98hc6cMBd4Wx7ncjO3oKDsIn+DFrF11TgMrwtjUUH/4TGpc32kyf0L5J/O+vqUO4vK6gs=
- secure: fRTVEF2L2MOgL1ZSGV2bhclUc+wGyTL7zBwB7qEgMpgXQvQQH8Q869I4G/9sFQdRAhyEYXyEPDtW6eVA93mEAxnelzJ/PbFaaoeRFDdIaqklMkwIaVpuRZiJ7O4dIFAo2Cn4quoJAKez9BPNFpS3h+UpCWdOtaloTTMYKp8YZNU=