forked from percona/percona-server-mongodb-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
69 lines (69 loc) · 2.48 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
language: minimal
sudo: required
services:
- docker
addons:
apt:
packages:
- realpath
cache:
directories:
- $HOME/google-cloud-sdk
env:
global:
- CLOUDSDK_CORE_DISABLE_PROMPTS=1
- VERSION=$TRAVIS_PULL_REQUEST_BRANCH
- CLUSTER_NAME=travis-psmdb-${TRAVIS_COMMIT:0:7}-$RANDOM
before_install:
- echo '{"experimental":true}' | sudo tee /etc/docker/daemon.json
- sudo service docker restart
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- if [ ! -d $HOME/google-cloud-sdk/bin ]; then
rm -rf $HOME/google-cloud-sdk;
curl https://sdk.cloud.google.com | bash;
fi
- source $HOME/google-cloud-sdk/path.bash.inc
- gcloud components update kubectl
- gcloud version
- openssl aes-256-cbc -K $encrypted_f65a3d114e3c_key -iv $encrypted_f65a3d114e3c_iv
-in .client-secret.json.enc -out client-secret.json -d
- openssl aes-256-cbc -K $encrypted_f65a3d114e3c_key -iv $encrypted_f65a3d114e3c_iv
-in .cloud-secret.yml.enc -out e2e-tests/conf/cloud-secret.yml -d
- gcloud auth activate-service-account --key-file client-secret.json
- gcloud config set project $GCP_PROJECT
- curl -s https://storage.googleapis.com/kubernetes-helm/helm-v2.12.1-linux-amd64.tar.gz | sudo tar -C /usr/local/bin --strip-components 1 -zvxpf -
- curl -s -L https://github.com/openshift/origin/releases/download/v3.11.0/openshift-origin-client-tools-v3.11.0-0cbc58b-linux-64bit.tar.gz
| sudo tar -C /usr/local/bin --strip-components 1 --wildcards -zxvpf - '*/oc'
before_script:
- gcloud container clusters create --zone us-central1-a $CLUSTER_NAME
--cluster-version 1.11 --machine-type n1-standard-4 --preemptible --num-nodes=3
- kubectl create clusterrolebinding cluster-admin-binding --clusterrole cluster-admin
--user travis-ci@$GCP_PROJECT.iam.gserviceaccount.com
jobs:
include:
- stage: "Build"
script:
- ./e2e-tests/build
- stage: "E2E"
script:
- ./e2e-tests/init-deploy/run
- ./e2e-tests/limits/run
- ./e2e-tests/scaling/run
- stage: "E2E"
script:
- ./e2e-tests/storage/run
- ./e2e-tests/monitoring/run
- ./e2e-tests/arbiter/run
- ./e2e-tests/service-per-pod/run
- stage: "E2E"
script:
- ./e2e-tests/self-healing/run
- ./e2e-tests/operator-self-healing/run
- stage: "E2E"
script:
- ./e2e-tests/demand-backup/run
- ./e2e-tests/scheduled-backup/run
after_success:
- gcloud container clusters delete --zone us-central1-a $CLUSTER_NAME
after_failure:
- gcloud container clusters delete --zone us-central1-a $CLUSTER_NAME