This repository has been archived by the owner on Apr 4, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
.travis.yml
64 lines (51 loc) · 2.18 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
language: java
# Analyst Server requires Java 8 and Travis doesn't (yet) support OpenJDK 8
jdk:
- oraclejdk8
# Skip install phase. analyst-server now depends on master OTP.
install: true
# Run on container based infrastructure (allows caching &c.)
sudo: false
# remove the now non-existent Codehaus nexus repo from the travis-provided config (https://github.com/travis-ci/travis-ci/issues/4629)
#before_install:
# - sed -i.bak -e 's|https://nexus.codehaus.org/snapshots/|https://oss.sonatype.org/content/repositories/codehaus-snapshots/|g' ~/.m2/settings.xml
# Make a CodeDeploy deployment object
before_deploy:
# build the package, but no need to run tests again
- mvn package -DskipTests
- mkdir shaded
- mkdir deploy
- cd shaded
# get the CodeDeploy appspec and start/stop scripts
- cp -r ../appspec.yml ../scripts .
# and the jar
- mv ../target/analyst-server.jar .
# deploy tags as well
- if [ ! -z $TRAVIS_TAG ]; then RELEASE=$TRAVIS_TAG; else RELEASE=$TRAVIS_BRANCH; fi
# assemble all the parts together
- zip -r ../deploy/analyst-server-${RELEASE}.zip *
# don't confuse travis
- cd ..
# Deploy artifacts to S3
deploy:
provider: s3
bucket: analyst-codedeploy-eu
skip_cleanup: true
region: eu-west-1
# upload from the specialized directory we just made
local_dir: deploy
# deploy all branches . . .
on:
all_branches: true
# . . . but don't deploy pull requests
condition: $TRAVIS_PULL_REQUEST = false
# Encrypted AWS access info
# Travis generates a private key per repository. You can then encrypt values with the public key so only Travis can decrypt them
access_key_id:
secure: O4gTlHPCU8kjEl1MrvYRMsX94mC9H5mSUks6AmnY6vJTc/kYWsCUOdQSo2zjlilM6p20duEiuuLN7uEEq+1Mc99SMR8rN59T/tiobYxJPnRWmUObcgMSznEmxWxXzCkTh7kTVdA0cewLKMpun04+ekvy6CeTeqUo2PPa9eorrbU=
secret_access_key:
secure: bRDOfGvi6DcQZ6BuAIAK/TgVEl4RHltrw8q+bkcExe9PA+eQh809a3LYokIk4DHKLoiYbIKiCvss7argZZEVLIwb55kL5VoL/LPhf5P8Yns63XByiqr7XJJFehJdPaYiMmdPLUOrtgbv9nzD0J/W/NI/E1qfGvegwdEWtm4hSoQ=
# Save the maven cache to speed up builds (without this they take ~20 minutes while Maven downloads all the dependencies for OTP)
#cache:
# directories:
# - "$HOME/.m2/repository"