-
Notifications
You must be signed in to change notification settings - Fork 44
/
.travis.yml
117 lines (117 loc) · 4.2 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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
---
language: java
jdk: openjdk8
sudo: required
dist: bionic
cache:
directories:
- $HOME/.m2
- $HOME/.gradle
services:
- docker
addons:
apt:
update: true
packages:
- python
- python-pip
- docker-ce
stages:
- name: commit
if: (branch = master || branch = release) && type = pull_request
- name: integration
if: (branch = master || branch = release) && type != pull_request
- name: build
if: (branch = master || branch = release) && type != pull_request
- name: deploy
if: (branch = master || branch = release) && type != pull_request
env:
global:
- _JAVA_OPTIONS=-Xmx6g
- TERM=dumb
- HALE_GRADLE_CONSOLE=plain
notifications:
slack:
# https://docs.travis-ci.com/user/notifications/#configuring-slack-notifications
#
# Using environment variables here is not supported, unfortunately: https://github.com/travis-ci/travis-ci/issues/6387
# With the Travis Ruby gem, the 'secure' value can be generated like this:
#
# > travis encrypt "<team>:<token>" --add notifications.slack
rooms:
- secure: "R12tWxP/LdhD27KVukEMVEkWykw0+mT3Lx2dsOSWjxqVwlhIKZ+2RCR0Q1GD+a/bfnDDX3T5YP5zvVUr/NQi42fkMsIrU37Aj6dIXfoCD18XW6MkeQ2HrNyEHPLsTY8OfEKaNLOmb4qQPQRSfPGEaF7iCUus3ApjLbji1bBgyqI="
on_success: change
on_failure: always
jobs:
include:
- stage: commit
script:
# Output something every minute lest Travis kills the job
- while sleep 1m; do echo "=====[ still running after $SECONDS seconds... ]====="; done &
- ./build.sh commitStage
# Killing background sleep loop
- kill %1
- stage: integration
script:
# Output something every minute lest Travis kills the job
- while sleep 1m; do echo "=====[ still running after $SECONDS seconds... ]====="; done &
# Make Docker daemon listen on TCP port 2375 for container-based integration tests
- 'export DOCKER_SYSTEMD_CONFIG="[Service]\nExecStart=\nExecStart=/usr/bin/dockerd -H fd:// -H tcp://127.0.0.1:2375"'
- sudo mkdir -p /etc/systemd/system/docker.service.d
- echo -e $DOCKER_SYSTEMD_CONFIG | sudo tee /etc/systemd/system/docker.service.d/override.conf > /dev/null
- sudo systemctl daemon-reload
- sudo service docker restart
- sleep 10
- sudo systemctl status docker.service
# Pull Docker images required for integration tests
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- docker pull kartoza/postgis
- ./build.sh integrationStage
# Killing background sleep loop
- kill %1
- &build-hs
stage: build
env:
- PLATFORM=linux PRODUCT=HALE ARCH=x86_64
deploy:
skip_cleanup: true
provider: s3
access_key_id: ${AWS_ACCESS_KEY_ID}
secret_access_key: ${AWS_SECRET_ACCESS_KEY}
bucket: ${AWS_S3_BUCKET}
region: ${AWS_S3_REGION}
upload-dir: ${AWS_S3_BUCKET_TARGET_PATH}/${TRAVIS_BUILD_NUMBER}
local_dir: build/target
script:
# Output something every minute lest Travis kills the job
- while sleep 1m; do echo "=====[ still running after $SECONDS seconds... ]====="; done &
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- mkdir -p build/target
- ./build.sh product -a ${ARCH} -o ${PLATFORM} ${ADDITIONAL_FLAGS} ${PRODUCT}
# Killing background sleep loop
- kill %1
- <<: *build-hs
env:
- PLATFORM=windows PRODUCT=HALE ARCH=x86_64
- <<: *build-hs
env:
- PLATFORM=macosx PRODUCT=HALE ARCH=x86_64
before_install:
- sudo apt -qq update
# genisoimage is required for creating the dmg image
- sudo apt install -y genisoimage
- <<: *build-hs
if: branch = master
env:
- PLATFORM=linux PRODUCT=Infocenter ARCH=x86_64
- <<: *build-hs
if: branch = release
env:
- PLATFORM=linux PRODUCT=Infocenter ARCH=x86_64 ADDITIONAL_FLAGS="--publish --latest"
- stage: deploy
before_install:
- pip install awscli
script:
- cd build && ./upload-site.sh
# - stage: deploy
# - cd build && ./build.sh deployArtifacts