This repository has been archived by the owner on Mar 18, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
/
.travis.yml
93 lines (84 loc) · 6.76 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
sudo: required
language: java
jdk:
- oraclejdk8
cache:
directories:
- $HOME/.m2
env:
global:
# GITHUB_ACCESS_TOKEN
- secure: "kXMYdRPH2jqBCihxuwILnDkqUBv1IaxvJVwzg9r3j+baC9lu7fcExTMv/sDAS19mgq3tlc8nN/Yb1nWPA4rDPfMqs3yBghWaMoYNH3O3qV4nsmeJgG9H/A7GTdwwbit4Em+tF6agrpohu7DFP+UtkpltFJKW5xGapRbV4APoRLvnC6fHrFyTgfqcVjKtVFq57bL4i5XvBjz6LIw7bZ/cN6lj9BWnPq7zVJ7D2eji/ev1foI3wOY07GulW6B9Cp/vvIk8D5Txp6J+9Z3Ag1XHyqPeOrASIlVQOdcvNQab4/b3/Ml2qO9zh+2oJsaZrmhFsFPF8BMlI9GUPNp98AEiApkSyYl7VnoC7r4+9quYyd/CtaWlMnZWN5EFpKfSryY0vCzAxgKT66Yx3IgcB9iV7/P99KNMqbLTwynLgg7R0+efAO9zYY8HjKnbemoU9itpIlY7TXNWnjh/1NjPYaP78eMCbtIdXOUBkIgZ44NnmgQDDWTiMGBZfg/ai0QPPXX6ipg8li+syKV+J0p4n1lW0IAUZl58k28ucCwniENRXQ8sI/kf8uRcJeaCaxWfVYcCbwoy3SK8fesP0XvQ0VSoLJm2W2NDZ0TTAJVqvBUKF7ZV5pfrZ42ErPa0Yh3E76LWyDpcjMv3QH5RwbM8MUVAomO5myjX9XZFMKFvD5CwnlU="
# GITHUB_USERNAME
- sec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q++2tTBCvkEr3yb6dLj+iJWOEe0zboD+M0Y56ldasXvTBrFKaygn97msSplPPwk2grjfFhiVC/S6m1oUiIHjufILTgLSsf7AC0vZ3gCpHV5iRsGTg3aYCpr+RLg5WH8tgg7XetKmGGMBsPex5Oh+w2cW7i5cG+66z2ydTzcUdBIz+hjSFikCb2zYuPj/Mo8PuM2VX94h4OhkP+qXT55rgFO/H3/4xnQoOMs2H8KEsrptOUiwwU98w1QVoFM/azaUoHbJFvrr0IZlsCorAFieEoOx9kwWIB0b3GDWT7c9N8sxRYs0jTLSUvhdMHSh974UPAH70mAAZ8mKi4Z0ns5hBKezKOBkALKyMAuflB+G4mI7SJbHu4B9sJuZEpEuAXIGwTeJaj9rN73At2PUZQGPyFRajSR0IWOFKbryGQV/lfpYIvRQOVfUr9IkD9e0mYqAhzWx8wGLL0Ef3w4M/8LnlMTVaDgSS3qORapxSYz68MiMtY/qh5Lz+GlzJlET77OOEMaRBx/SCyQrQWbtIEgxiqOyrJIpL85fYCY9cm86iF26imoqn+fCH5Rn943dc2SS3xLh67y2S5ShhJWUjlYRYkb0QqBBKoCJBbEnZKqQOZgEfizR6dWcmcF462rn0ZVdFCd/FUsJW8yusH3HKvhvl05KjHT1+9Cj/Q="
matrix:
- OPENSHIFT_VERSION="v3.9.0" OPENSHIFT_OC_VERSION="v3.9.0" OPENSHIFT_OC_COMMIT_ID="191fece" ASSET_EXTENSION="tar.gz"
- OPENSHIFT_VERSION="v3.10.0" OPENSHIFT_OC_VERSION="v3.10.0" OPENSHIFT_OC_COMMIT_ID="dd10d17" ASSET_EXTENSION="tar.gz"
- OPENSHIFT_VERSION="v3.11.0" OPENSHIFT_OC_VERSION="v3.11.0" OPENSHIFT_OC_COMMIT_ID="0cbc58b" ASSET_EXTENSION="tar.gz"
before_install:
- openssl aes-256-cbc -K $encrypted_aac50e078c1d_key -iv $encrypted_aac50e078c1d_iv -in .travis/gpg_secret_key.enc -out /tmp/gpg_secret_key -d
- gpg_secret_key=$(< /tmp/gpg_secret_key)
- if [ ! -z "$gpg_secret_key" ]; then echo $gpg_secret_key | base64 --decode | gpg --import; fi
- if [ ! -z "$GPG_OWNERTRUST" ]; then echo $GPG_OWNERTRUST | base64 --decode | gpg --import-ownertrust; fi
install: true
before_script:
# credit to https://travis-ci.org/bucharest-gold/mean-booster/jobs/331001570/config for the basic OpenShift configuration
- sudo mount --make-shared /
- sudo service docker stop
- sudo sed -i 's/DOCKER_OPTS=\"/DOCKER_OPTS=\"--insecure-registry 172.30.0.0\/16 /' /etc/default/docker
- sudo service docker start
- wget https://github.com/openshift/origin/releases/download/${OPENSHIFT_OC_VERSION}/openshift-origin-client-tools-${OPENSHIFT_OC_VERSION}-${OPENSHIFT_OC_COMMIT_ID}-linux-64bit.${ASSET_EXTENSION}
- tar xvzOf openshift-origin-client-tools-${OPENSHIFT_OC_VERSION}-${OPENSHIFT_OC_COMMIT_ID}-linux-64bit.${ASSET_EXTENSION} > oc.bin || tar xvOf openshift-origin-client-tools-${OPENSHIFT_OC_VERSION}-${OPENSHIFT_OC_COMMIT_ID}-linux-64bit.${ASSET_EXTENSION} > oc.bin
- sudo mv oc.bin /usr/bin/oc
- sudo chmod 755 /usr/bin/oc
# Thanks to https://github.com/redhat-cop/openshift-applier/pull/78
- |
set +e
built=false
while true; do
IP_ADDR=$(ifconfig eth0 | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}')
oc cluster up --public-hostname=${IP_ADDR} --routing-suffix=${IP_ADDR}.nip.io --base-dir=/home/travis/ocp
if [ "$?" -eq 0 ]; then
built=true
break
fi
echo "Retrying oc cluster up after failure"
oc cluster down
sleep 5
done
echo "OpenShift Cluster Running"
- oc login -u system:admin
- oc new-project scdf
- oc adm policy add-scc-to-user hostaccess -z default
script:
- |
# run OpenShift deployer tests
export KUBERNETES_NAMESPACE=scdf
./mvnw --batch-mode test \
-Dspring.cloud.deployer.openshift.limits.memory=0Mi \
-Dspring.cloud.deployer.openshift.limits.cpu=0m \
-Dspring.cloud.deployer.openshift.livenessProbeDelay=20 \
-Dspring.cloud.deployer.openshift.readinessProbeDelay=20 \
-Dmaven.test.redirectTestOutputToFile=false
after_success:
- bash <(curl -s https://codecov.io/bash)
deploy:
provider: script
# see https://github.com/travis-ci/travis-ci/issues/5538
script: chmod +x .travis/release.sh && .travis/release.sh
skip_cleanup: true
on:
jdk: oraclejdk8
tags: true
condition: "$OPENSHIFT_VERSION = v3.9.0"
after_failure:
- oc login -u system:admin
- oc get all -n scdf -o yaml
- oc get events --all-namespaces --sort-by='.metadata.creationTimestamp'
- docker logs origin