forked from gchq/stroom
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
101 lines (90 loc) · 4.8 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
language: java
dist: trusty
group: edge
jdk: oraclejdk8
sudo: required #to ensure we get a VM rather than a container for more memory and for all the apt-get stuff
env:
global:
- DOCKER_COMPOSE_VERSION=1.13.0
# $TAGPERM environment variable
# generate a token at https://github.com/settings/tokens and encrypt it
# with `travis encrypt TAGPERM=<yoursecrettoken>`
# also see: https://docs.travis-ci.com/user/encryption-keys/#Usage
# and: https://docs.travis-ci.com/user/best-practices-security/
- secure: "afb4Uu7C+f3DzugpcWGdL+IeW2Nlp6f/yZYd+1gOlOXEOjdF4cxnv8ENpApc6YgfJXhzZB/gBXx4EzcJwDnm/6ehBoPp9vqRd6zukkB9IcctjvL/0wSuoXnyagVjxZkpA8Jjv2z/tOLNppPbbTkS8gNqdN2ODCYbFos9oDH92h9b8pT6XUe3kfuqkw71+lLsK0xqXWWHprn5s6vjWOq6qGn0v7fwAIhRTT36/29IXuBB2hqzmzypq2U06nDGQ1HBfQhr/N7HMaZlQ2w5VGw3LgpEtc37JR5T4lvFso50dP3pmsfwUFdt+m08gxc4jPiaG+KFOFSi1MIXJxWec9sTf+HudfdO1LrsyqMHvY0i/ylL+9Qb3xqpWJ2g6RipHFKUyXyWbulSo5j94tuULxbjjoBrsoSfKZSO+jtFWdbKnQOsy5g9W7YuQ0m9hSmWji93pvDWq0N6ZLI6b5KA3vvHVgzbRZEKeYLdyDhFiGNxGhzBtWtGKp6qs5IKCKWvVx9jyt0Xgr+JsxNe3EY5S45xH6a4hoR3ZwMS0vxWJP/woHvfxZYz6LQl4gat3nUtSXyN4vxnFHSRaIDX0P5D6nH47kaEa7sjWBAch9gxIEXJg6aj/K+c6eNiXD3B5MN1FLbv2rico4AovAakOb+P1Po5WctcSFdEukVOhq5mUyml9Mk="
before_install:
#Print out the current versions before we change them
- docker --version
- docker-compose --version
#remove the old docker version
- sudo apt-get -y remove docker docker-engine
#extra stuff required for docker CE
- curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
#Add the apt repo for docker
- sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
- sudo apt-get update
- sudo apt-get -y install linux-image-extra-$(uname -r) linux-image-extra-virtual apt-transport-https ca-certificates curl software-properties-common docker-ce
- docker --version
#remove the old docker-compose
- sudo rm /usr/local/bin/docker-compose
- curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose
- chmod +x docker-compose
- sudo mv docker-compose /usr/local/bin
- docker-compose --version
# We run a script to build dependencies and do database setup
#install: "./.travis.install.sh"
install: echo "skip 'gradle assemble' step to speed up build"
# Increase the size of the heap
before_script:
- echo $JAVA_OPTS
- export JAVA_OPTS=-Xmx1024m
- mkdir -p ../git_work
- pushd ../git_work
- git clone https://github.com/gchq/urlDependencies-plugin.git
- pushd urlDependencies-plugin
- ./gradlew clean build publishToMavenLocal
- popd
- git clone https://github.com/gchq/stroom-resources.git
- pushd stroom-resources/dev-resources/compose
#start all the services we need to run the integration tests in stroom
- docker-compose -f kafka-stroomDb-stroomStatsDb-zk.yml up -d
- popd
- popd
- mkdir -p ~/.stroom/
- cp stroom.conf.example ~/.stroom/stroom.conf
# Use 1 local worker to avoid using too much memory as each worker will chew up ~500Mb ram
script: ./gradlew -Pversion=$TRAVIS_TAG -PgwtCompilerWorkers=1 downloadUrlDependencies clean build shadowJar
# Conditionally tag git and build docker image.
after_success: "./travis.after_success.sh"
# Deploy the swagger-ui content and swagger specs to gh-pages
# Push to GitHub releases for any tagged commit - the key was generated by the Travis CLI.
deploy:
- provider: pages
skip_cleanup: true
github_token: $GITHUB_TOKEN
local_dir: gh-pages
target_branch: gh-pages
on:
branch: master
- provider: releases
api_key:
secure: xUPJboaSjxs3lKCqXu5zYzdV75S+lu5EZ6RD+RigmQ5MSjeuFBhoBKYaJUz+ejaoFLfF8WSUbmlgTeRMK7QI4MtCqjy08uREext8sm0behMREz4mmPEb9eTLu+WfIXFbnOPG4pKzkAtHA3x+hNQN3EWga1Xa2WXGYdOuK1B7vnrYOPo9D2zI12JCaoXt0KUQ70LwE07uwBIuDn+0EbVsAftFatJh7jZXeMsE8GmdcwsM/DObKjtTLBH3bpE8pPPJ8H0ssuIsQk2jHg91cTgrlB0q0K1a5TjeKKMGPMY6S6UR9cB7l7FqCVEsOd7T/ExdKp1TflMRyuuKG9ACBXTaegfBt7pP7KYEpYtidC5p/b1J4cYvazVTIfo6m93wnOJAdcD1XeMqNIQZVSxNuflmgM8xZz+UuqPBF4dk3Z5Eoh4sTH+t6WmZY6YoIt6tRMQ8xRyvkTfzsfYUtsV4csyeB2oy5s/GJmYGtR5GjjK6T+mh8RmI/DVWW50ubdFaAYYdz+LSgfpGhBXEBkYPghMSjYiPDsJStXsOwRSQbR9LmRO7jk08PxxT33pLr8Ct0HoQPpSP8Fom4q1ntrZBDjeHL8/2cQtRKqUg3X9G0sU7aW5i0G4U7BE42Xkcc/VVJhFrVbRj5+xQq70uMyUmHi2Wh+mBQSY+ZlBrvr6FRcKj42E=
file:
- stroom-app/build/libs/stroom-app-all.jar
- stroom-app/build/swagger/swagger.json
- stroom-app/build/swagger/swagger.yaml
skip_cleanup: true
on:
tags: true
#clean out gradle caches as per travis docs
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
# Cache dependencies to speed up the build
cache:
directories:
- .autoconf
- $HOME/.m2
- libs
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/