-
Notifications
You must be signed in to change notification settings - Fork 200
/
.travis.yml
137 lines (122 loc) · 7.17 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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
sudo: required
env:
global:
- JAVA8_HOME=/usr/lib/jvm/java-8-openjdk-amd64
- CASSANDRA_JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
- JAVA9_HOME=/home/travis/jdk-9.0.4
- JAVA12_HOME=/home/travis/jdk-12.0.2
# this variable determine when docker images are tagged 'latest'
- LATEST_VERSION=6.8.4
# Make sure gcloud command is on our PATH and the App Engine SDK is in the Python path
- GAE_PYTHONPATH=${HOME}/.cache/google_appengine PATH=$PATH:${HOME}/google-cloud-sdk/bin PYTHONPATH=${PYTHONPATH}:${GAE_PYTHONPATH} CLOUDSDK_CORE_DISABLE_PROMPTS=1
- secure: "DtiNCwqKF39c9Ivv2O+7U0RK0u3qKvK1YhiYUtBkEm/1qFLvNTZNNcFA6ek6nO4Q5zpfvZvFEsM9NW3p14b+GYbZzLoUFxSZy24gZGJUt1LMiSlaRNE/7phPX+WdjN8IF6OXqdfAol31VRKUvwbvv8IxRVckUoBcgp304BASDoOUrQZxnd3MfpfWqbXeOvYYYa/xkq8kZHIy9hi+2TQbm/2/P3xc/rk7yQzewzpWZOQaoIexyYyPzLzNYVpRT5QSvEZn1hFKH6Hg8BvTVBrDKLj+KTrEHSge1ICW6rET5ZTcIimHCofRL+0/DUGx0RH5tYR0LM7NXrFXGDDMC73A6KKWmlaC3hPuWD9uLLAwLC3Dg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0CQE8LIBL2YRmdYgchEnG1pKlQ+90gJg0hDL7V/2khBtq75BLl7csfNd/+/XK+ISqz/K7+U+kaZ2fD8AD7a59IGgWL4U8tcuDsnRyL8uniwMENdEAL7n1dQztkF1uILcKpBa4THwPkVq26SIsaBDmF0dNH1z4aqk8ru/NPF7MPL3PMby1ax07tcp8ad0MQ5Qbqw8g+8ZevTu+h5UQopMSM2SDNPrxIlilt+n5EGZlJroti68i88s6WFsysYbmeMV/mKyoG7/wOgGQLwR/WTAJTUN0FFFLXSO7IgmgPLXU3KB23oqFGlbgDSldMws5U/F+qCe8GPlHe98kikp8mwxYp481oBHfCFDhq43FVDx7Blxgkn2d3NB/ZnOrVOd9aiUJqNyAgBw9utxwquZwM8Q3tdYyj2IuLG1bR9Dx63Sbhnt1bTD0DgERaALi80VRQYBqyY2dHq/na0bG4L6b032KCRuVsrVly/B30Il+hrj/hYjblRLQPKlSYVgg15vlCTXkXFUpWrAOrnqXnw0yBQ9kfpUhl9HPU0s15K/OChm/EOHA9OXrBhdRpZOaEuloFyhGrN5ndiZEkNbDMAf6R7DV4njNq75r3/2EtZ4JajX+m3fY="
language:
- java
- bash
- python
python: 3
addons:
apt:
update: true
packages:
- jq
- bash
- python3-pip
- python3-setuptools
- python3-wheel
jdk:
- openjdk8
services:
- docker
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
cache:
directories:
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
# Cache our Gcloud SDK between commands
- $HOME/google-cloud-sdk/
- $HOME/.cache/pip
before_install:
- wget -qO ecm-ccm-elassandra.zip https://github.com/strapdata/ecm/archive/ccm-elassandra.zip
- unzip ecm-ccm-elassandra.zip && cd ecm-ccm-elassandra && sudo ./setup.py install
#- pip3 install wheel sphinx~=1.8.5 sphinx_rtd_theme
- sudo fallocate -l 4G /swapfile
- sudo chmod 600 /swapfile
- sudo mkswap /swapfile
- sudo swapon /swapfile
- sudo sysctl vm.swappiness=10
install:
- cd ${TRAVIS_BUILD_DIR}
- ./.travis/install-jdk.sh -v -e -f 9 && rm -f *.tar.gz
- ./.travis/install-jdk.sh -v -e -f 12 && rm -f *.tar.gz
- export JAVA_HOME=$JAVA12_HOME
- java -version
- ant -version
- ./gradlew --version
- env
script:
#- (cd docs/elassandra; make clean html SPHINXOPTS="-W")
- JAVA_HOME=$JAVA12_HOME ./gradlew server:test -Dbuild.snapshot=false
- JAVA_HOME=$JAVA12_HOME ./gradlew assemble -Dbuild.snapshot=false
- JAVA_HOME=$JAVA8_HOME ./integ-test/test-cleanup-repair.sh $(ls distribution/archives/tar/build/distributions/elassandra-*.tar.gz)
- JAVA_HOME=$JAVA8_HOME ./integ-test/test-datacenter-groups.sh $(ls distribution/archives/tar/build/distributions/elassandra-*.tar.gz)
before_deploy:
- export TARBALL=$(ls distribution/archives/tar/build/distributions/elassandra-*.tar.gz)
- export ZIPBALL=$(ls distribution/archives/zip/build/distributions/elassandra-*.zip)
- export DEBPKG=$(ls distribution/packages/deb/build/distributions/elassandra_*.deb)
- export RPMPKG=$(ls distribution/packages/rpm/build/distributions/elassandra-*.rpm)
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
deploy:
# build github release
- provider: releases
overwrite: true
draft: false
api_key:
secure: "MFhecFMYXJRTZYYTY0zrvQyDoTUXtaODNuF/Im7pFZDbC7aWgo5s8HFmyzNpJADKwydO1RLFPpEhJGTJ/FbuTDvshc/PirzVbrVr4jK0hnNCFaYEBqOypJzoR1j5bdivmMWxaHVvKEfAr+iNs9fwEVeb3uS+JrsZspImBkDbbeuOq0SKyxl1CrE1KF3aZJWOv50zKJaGyre9dKUq9JL8Js2dNKpebYhP8tjhD7iShD344I00br9qu3ThZ3rG6LTv4c3llI0ZRhWb644iNFtz9CoKQXK30ATjh1avT1wZr6Ci+62kYAePBToagbHd5xs8S78hFkUcm7Z0/8XX8m5KJNyJl+MSh0F/vkEpBJaLSqwUPcgbEB5wqYvWDTWADY9rQ80Mv6I97kmxpYPGpRLONBxjDby2fUVGnyr+7tWhAmAXOomtMXMl6LOLHCp0gNFMO2Twp77vTRz8e38B2dJ5vg155bGNHM7kBwP3EuiKiKFwA+RUpukVLQon7foGvikEsB1HLrNoOg44QEzrcEL6UP9tHyEFWWfwSnD3q7ybQ7bjzFC4N9F1t/NpYI2icR8X/3dRrj4GjWMCMWK75HZWjycrfd0nNLdhKyGAw2rlTmgq6Sypm3g80aq3LvGJ+Pnb7s6B2IAzNgOyhT8TKlIILZ3wQlYMrVBaVaMTmRItHWY="
file:
- "$TARBALL"
- "$ZIPBALL"
- "$RPMPKG"
- "$DEBPKG"
skip_cleanup: true
on:
tags: true
branch: v6.8.4-strapdata
repo: strapdata/elassandra
# build, test and push docker hub images
- provider: script
skip_cleanup: true
script: ELASSANDRA_TAG=${TRAVIS_TAG:1} ./ci/docker.sh
on:
tags: true
branch: v6.8.4-strapdata
repo: strapdata/elassandra
# bump and push to gke marketplace repo, build gke images, push to gcr.io
# - provider: script
# skip_cleanup: true
# script: bash ./ci/gke-marketplace.sh
# on:
# tags: true
# repo: strapdata/elassandra
# publish snapshot artifact in private strapdata nexus
#- provider: script
# skip_cleanup: true
# script: JAVA_HOME=$JAVA12_HOME ./gradlew publishNebulaPublicationToTargetRepository -PrepoUsername="${NEXUS_USERNAME}" -PrepoPassword="${NEXUS_PASSWORD}" -PrepoUrl="$NEXUS_URL/maven-snapshots/"
# on:
# tags: false
# branch: v6.8.4-strapdata
# publish release artifact in strapdata nexus
#- provider: script
# skip_cleanup: true
# script: >-
# JAVA_HOME=$JAVA12_HOME ./gradlew publishNebulaPublicationToTargetRepository -Dbuild.snapshot=false -PrepoUsername="${NEXUS_USERNAME}" -PrepoPassword="${NEXUS_PASSWORD}" -PrepoUrl="$NEXUS_URL/maven-releases-public/" &&
# curl -v --user ${NEXUS_USERNAME}:${NEXUS_PASSWORD} --upload-file ${RPMPKG} "${NEXUS_URL}/$(basename ${RPMPKG})" &&
# curl -v --user ${NEXUS_USERNAME}:${NEXUS_PASSWORD} -X POST -H 'Content-Type: multipart/form-data' --data-binary "@${DEBPKG}" "${NEXUS_URL}/apt-releases/"
# on:
# tags: true
# branch: v6.8.4-strapdata
# repo: strapdata/elassandra