-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
68 lines (68 loc) · 3.96 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
65
66
67
68
language: java
jdk:
- oraclejdk8
install: mvn --version
sudo: false
env:
global:
- APP_NAME=suripu-workers
- BUILD_NUMBER=0.7.$TRAVIS_BUILD_NUMBER
- secure: Btv6ehYfQHCRaISsVb/XeWlNzt7f4TDfwqLh0EyniAvBTAVWsKpD/izzqTG9Vj81Np5k+GA/YDVF5ALaP2PoJ1i0xANq3dimaxTD6HbVSIrMzgCCU7Y31FQX1mU8ULaQkOwde/UJUaNdH3NKCawFs6Kqyv8ba5watp4V+WMmbF+dcE/LYG6uGPSjvGlKmHHK6uIoQ8JnsR+kuJAGG2VcgkjjpOGeHpMP6AXDOa6s2Y7Xiioiw88bfucEuHM8GGLPCWOvQ0Kz1barSJkPICTOE5OJiJHSZPnr60o/Czk6xq7HVx8b6hUn6kVnuHgc0sX5czuhoeAoc3IUBGEVgZ48iiUANjrNX1sKg4vAmtolzbAUA6Blc80BCho0X2jqCsbA7csCJoEfhV/rLhBJwDbFkgx9vpA5DciNy6Wy1sO0t1p+QvriEU+GC2Fk2vhaHnvpwRi1aLLNpArfQRxW75t7fQs3IA/clTvqTxYacN8Y6fL5+u25OGZgRqwy7A7+4dIxvHwNsWKwfeKv3LZopcAAGCpxqGxcFooHwJuaOlAVBpN9dBexT/Xx10PHyVoeHps8/8yI/EIpWtIPenTgB4NG98gXA9wu+I0RlYl0vjzKbIkjmhyEpkaupQ7YryYL+fqoVGuuqNNdZFw9m4HbJXd/penCuS0HXbmJesmm7nuRWgA=
- secure: NL797PrNxTgfK0/yvo5EIqyfhDCfGRX4I8MY6XIGBY4LD8K3a8OwQYFM9IAm232uvtUgIzF1ESH3pnIyESp+rwummPZd5f4qtcyUTxfMMP/zVY6bKaU/ygATImWBwMu2dyGgKS7t979FdcfWY9FtkMzIBpUk7MEqXOlyX+GpukKjrXWxile2O3AvJ6XprrLzllNh1WpxEeIaM77mNVSZklJrgpo8z0KvcamaG2WYVLS8F1zfeu35yaRbwj07Qa5yLdhoXl4aRgKqQpaOa73T3PjKLadvE7rcVgdS1z0G2XgGG8OkV36P64kpEP9P2hRTvH0b89nL9PSR2M7KSdLaRc7N8gVE97VPfpXQgh/9XHURxWMwDOg8LavfEUO+IHPulSCSIiJq+nLel2YuUkfSsXbx2jpT4L12EDctC0+EJLgACGMw/UWpO878cVgXWttX5FFOqkEHnT1bWnGcVyG6P3ieKkHu8oq0qFoURnsOqZoenwEYAM3x1CN4oJefJvbpihwIrZd/UfWnMqCBPRvbFXnsXKNMQizH57vQdSrwSM1Yh0aq4J6n2Fk0LbhFr+xO4buqFMWNXIvAgoqofDeafzmg6ZokaBtHEwnovCs+jeFqCTeRkIT0VsA02HVTScWbDlLxO4cLd+o+v9IEv1GXIZmKpp2fXu11Ht8T4pxQZmo=
script:
- echo "MAVEN_OPTS='-Xmx2g -XX:MaxPermSize=512m'" > ~/.mavenrc
- export TEMP_DIR="/tmp/$APP_NAME"
- mkdir -p $TEMP_DIR/opt/hello
- mkdir -p $TEMP_DIR/etc/hello
- mkdir -p $TEMP_DIR/etc/init/
- mkdir deb-pkg
- cp configs/alarm/alarm_worker.prod.yml $TEMP_DIR/etc/hello/alarm_worker.yml
- cp configs/insights/insights_generator.prod.yml $TEMP_DIR/etc/hello/insights_generator.yml
- cp configs/insights/aggstats_generator.prod.yml $TEMP_DIR/etc/hello/aggstats_generator.yml
- cp configs/logs/index_logs_worker.prod.yml $TEMP_DIR/etc/hello/index_logs_worker.yml
- cp configs/logs/timeline_logs.prod.yml $TEMP_DIR/etc/hello/timeline_logs.yml
- cp configs/pill/pill_save_ddb.prod.yml $TEMP_DIR/etc/hello/pill_save_ddb.yml
- cp configs/push/push-notifications.prod.yml $TEMP_DIR/etc/hello/push-notifications.yml
- cp configs/sense/sense_last_seen.prod.yml $TEMP_DIR/etc/hello/sense_last_seen.yml
- cp configs/sense/sense_save_ddb.prod.yml $TEMP_DIR/etc/hello/sense_save_ddb.yml
- cp configs/fanout/sense_stream_fanout.prod.yml $TEMP_DIR/etc/hello/sense_stream_fanout.yml
- cp configs/expansions/alarm_actions.prod.yml $TEMP_DIR/etc/hello/alarm_actions.yml
- cp configs/supichi/supichi-worker.prod.yml $TEMP_DIR/etc/hello/supichi.yml
- cp configs/export/export.prod.yml $TEMP_DIR/etc/hello/export.yml
- cp init/*.conf $TEMP_DIR/etc/init/
- mvn --settings settings.xml clean test
before_deploy:
- mvn clean
- mvn versions:set -DnewVersion=$BUILD_NUMBER
- mvn versions:commit
- mvn --settings settings.xml -DskipITs deploy
- gem install json -v 1.8.3
- gem install fpm
- cp target/$APP_NAME-$BUILD_NUMBER.jar $TEMP_DIR/opt/hello/$APP_NAME.jar
- fpm --force -s dir -C $TEMP_DIR -t deb --name "$APP_NAME" --version $BUILD_NUMBER
--config-files etc/hello .
- cp ${APP_NAME}_${BUILD_NUMBER}_amd64.deb configs/
after_deploy:
- git config --global user.email "[email protected]"
- git config --global user.name "Travis CI"
- export GIT_TAG=$APP_NAME-$TRAVIS_BRANCH-$BUILD_NUMBER
- git tag $GIT_TAG -a -m "Generated tag from TravisCI build $TRAVIS_BUILD_NUMBER"
- git push --quiet [email protected]:hello/suripu-workers.git --tags
deploy:
- provider: s3
access_key_id: $CI_DEPLOY_USERNAME
secret_access_key: $CI_DEPLOY_PASSWORD
bucket: hello-deploy
skip_cleanup: true
local_dir: configs
upload-dir: packages/com/hello/suripu/$APP_NAME/$BUILD_NUMBER
region: us-east-1
on:
tags: false
branch: master
branches:
only:
- master
notifications:
email: