forked from openshift/elasticsearch-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
45 lines (45 loc) · 2.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
sudo: required
language: go
go:
- '1.10'
services:
- docker
env:
global:
- secure: VPl3TGj9cNWdsOIpvUHva1cp8gjlzL2T2ZASlf2RLpFnHn8ggCRhFc9QkSLxz6wLv155nCeLCkW3Pp7OZOXH9Q4EZDX3kBzuQisDaUNuzpaXz0w9XWE5U/SW4uGGpN2p1EZH61FW0Mi2o+vHp79gS+cdfa2fnNy1uz+4u57Ij3HbQeN28vETe9QNHu9VhS7vHMqOEBUTEaXTZGUgZ56bA9uQfudYZymN+EFPrWjGrMGNSnzEPoNq8yEoEqsGbZbdaKXWP9RCdcM4huWytme3EN775jWzt8TTPtPbNQJKiD1tiDToz0dCCvn0i4G/cuJa3NgBSi08f3JfC2ekKKTzpWdtoh8nsLvnPw1lpMZzNoTXY4yHffraat7i9kxaXa45PzM5w8t0HWzaMgY0IU3hVA6ot2eu9r8h7d77KvedluWHqjq7ATCr6QzWWMZAd7GVOmM/j10usOeKHZlvQtUsBCoghKN78qAqJdfPwtPQqsJ4RY42XPoQjRVAwzhTzTWsfdryDim+120wrDKBp5k8/6ugJMebz1PM1U1BjTvNN4RLCkimkjWRkKzZRId3mcsa9e5vke6wkXg/swRge0X4Wtdlxp2N7cIkuKy2F3LA5U8b+qvDwn/SzGPo5DAILQchC4bm1VIdxF7h305F/dtqdSpCoj9rkNKI+kGVLF27a0k=
- secure: DEg+zxj3dVyK/iT42tUO1IjctDUJ67ts3XKSGDRE7xOd5K6anIVjb4kf3OIuhB3UOGYJnRmpo3y74Tml1S5dTFcu2hYCf7+KMv9Tzwzp7SDZ2P7Y9S8iA0fdz+gCI8dsNEoRBKVYtWktq+D3SZxPit+Tw3QxA+XubrV1CSlf++SCOYrjSahA75BCdMer+g2BL382zB0y4rvdQ+qTYAk37BdyyA55P2XjcwhrzyclDcSf+ZtVYYIl8mIqvDNBCMeFz7dy6UJrF6NYcwTUybl7IrL2CzAgQDrFwgmb72kqqYbrnWUG9TVY9UPY0D6/fM9kZMc4tk7y9q8E67cLE3lHp3aOluI22OjWyAX+oekkUVv3mC0MbuXlDn75bhDIHSXzlsycwfOX8f9b0o3K1HtU9SrfkCx9HfLBOeF6GJcGDPLBhq3l1kf/pO+O+ruAU21jzIQkx8QFfwQMIhVMMFObb86CF5JiapfMCh2Cbo5ztwNj/IVduCRO6AILJc9NwV7vojcs+xB8exB0W2Fk8r+HIAfE8Q76qgu5IHGDrQsWb8Kb62AU2pkOh8ToaTd9elK7QFgxLO66ctduAuGfbfUk2JhsLhaBYUZNPAYBKTCMVdA3NTS6pn/Dh+++0osxdTc18ulreo4Uzks+fgWwdw0j21dt8XS3p8r137a1avSyMqw=
- KUBERNETES_CONFIG=${HOME}/.kube/config
matrix:
- CHANGE_MINIKUBE_NONE_USER=true
jobs:
include:
- stage: build and test
script:
- ./.travis/prepare-environment.sh
- go get -t -d ./...
- go test ./...
- go vet ./...
- operator-sdk build quay.io/t0ffel/elasticsearch-operator
- 'sed -i -e ''s/imagePullPolicy: Always/imagePullPolicy: Never/g'' deploy/deployment.yaml'
- kubectl create -f deploy/rbac.yaml
- kubectl create -f deploy/crd.yaml
- ./tests/wait-for-operator.sh
- CLUSTER_NAME=elastic1 ./tests/test-insecure-cdm.sh
- CLUSTER_NAME=elastic1 ./tests/test-secure-cdm.sh
- kubectl delete -f deploy/deployment.yaml
- stage: push to quay.io
script:
- go get -u github.com/operator-framework/operator-sdk/commands/operator-sdk
- operator-sdk build quay.io/t0ffel/elasticsearch-operator
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin quay.io
- docker push quay.io/t0ffel/elasticsearch-operator
stages:
- build and test
- name: push to quay.io
if: branch = master AND type != pull_request
after_success:
- echo 'Build succeeded, Elasticsearch operator is running on minikube, and unit/integration
tests pass'
after_failure:
- echo 'Build failed, Elasticsearch operator is not running on minikube, or unit/integration
tests failed'