-
Notifications
You must be signed in to change notification settings - Fork 4
/
.travis.yml
117 lines (117 loc) · 3.41 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
sudo: required
env:
global:
- CLOUDSDK_CORE_DISABLE_PROMPTS: 1
- GCLOUD_PROJECT: strapdata-gcp-partnership
- GCLOUD_ZONE: europe-west1-b
- IMAGE_SUFFIX=-staging
- PULL_SECRET=nexus-registry
- MEMORY_REQUEST=2048Mi
- MEMORY_LIMIT=2048Mi
- HELM_URL=https://get.helm.sh
- HELM_TGZ=helm-v2.14.3-linux-amd64.tar.gz
- K8S_FLAVOR=kind
- REGISTRY_URL=localhost:5000
language:
- java
- bash
- python
python: 3
addons:
apt:
update: true
packages:
- jq
- bash
- python3-pip
jdk:
- openjdk8
services:
- docker
cache:
directories:
- "$HOME/.gradle/caches/"
- "$HOME/.gradle/wrapper/"
- "$HOME/google-cloud-sdk/"
before_install:
# Enable swap
- sudo fallocate -l 6G /swapfile
- sudo chmod 600 /swapfile
- sudo mkswap /swapfile
- sudo swapon /swapfile
- sudo sysctl vm.swappiness=10
# log to remote registry
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- echo "$NEXUS_PASSWORD" | docker login -u "$NEXUS_USERNAME" --password-stdin https://docker.repo.strapdata.com
- echo "$ACR_PASSWORD" | docker login -u "$ACR_USERNAME" --password-stdin https://strapdata.azurecr.io
# Install kubectl
- curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.15.0/bin/linux/amd64/kubectl
- chmod +x ./kubectl
- sudo mv ./kubectl /usr/local/bin/
# Installing Kind
- curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.8.1/kind-$(uname)-amd64
- chmod +x ./kind
- sudo mv kind /usr/local/bin/
- kind version
# Installing Helm
- wget -q ${HELM_URL}/${HELM_TGZ}
- tar xzfv ${HELM_TGZ}
- export PATH=$PATH:$PWD/linux-amd64/
# Install sphinx
- pip3 install setuptools
- pip3 install sphinx~=2.4.4 sphinx_rtd_theme sphinx-jsonschema
install:
- cd ${TRAVIS_BUILD_DIR}
- ./gradlew --version
# Create Kind cluster and a local registry
- helm init --client-only
- integ-test/setup-cluster.sh
- kind get clusters
- docker ps -a
before_script:
- ./gradlew java:edctl:buildExec :java:operator:jib dockerPushAllVersions :reaper:pushImage -PregistryUrl=${REGISTRY_URL} -PregistryInsecure
- curl http://${REGISTRY_URL}/v2/_catalog
- integ-test/install_elassandra_operator.sh
script:
#- (cd docs; make clean html SPHINXOPTS="-W"; touch build/html/.nojekyll )
- (cd docs; make clean html; touch build/html/.nojekyll )
- integ-test/test-admission.sh
- integ-test/test-hostnetwork.sh
- integ-test/test-reaper-registration.sh
- integ-test/test-scaleup-park-unpark.sh
- integ-test/test-multiple-dc-1ns.sh
- integ-test/test-multiple-dc-2ns.sh
- integ-test/test-replace-pvc.sh
#- integ-test/test-rolling-upgrade.sh # to much for travis !
deploy:
- provider: releases
overwrite: true
draft: false
api_key: $GITHUB_TOKEN
file:
- java/edctl/build/libs/edctl
skip_cleanup: true
on:
tags: true
branch: master
# publish docker images, and license report
- provider: script
skip_cleanup: true
script: >-
./gradlew :java:operator:jib dockerPushAllVersions :reaper:pushImage -PregistryUsername=$DOCKER_USERNAME -PregistryPassword=$DOCKER_PASSWORD -PregistryUrl=docker.io &&
./gradlew java:model:publish -PrepoUsername=$NEXUS_USERNAME -PrepoPassword=$NEXUS_PASSWORD
on:
tags: true
branch:
- master
# publish doc on github page
- provider: pages
local_dir: docs/build/html
skip_cleanup: true
fqdn: operator.elassandra.io
deployment_file: true
github_token: $GITHUB_TOKEN
keep_history: true
verbose: true
on:
branch: master