-
Notifications
You must be signed in to change notification settings - Fork 112
/
.travis.yml
35 lines (29 loc) · 2.02 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
dist: focal
language: go
go:
- "1.16.7"
go_import_path: github.com/nats-io/nats-operator
env:
- KUBERNETES_CONFIG_FILE=$HOME/.kube/config CHANGE_MINIKUBE_NONE_USER=true CLUSTER_SCOPED_E2E_NAMESPACE=nats-io NAMESPACE_SCOPED_E2E_NAMESPACE=nats-operator-e2e
before_install:
- sudo apt-get update -y
- sudo apt-get install -y conntrack
install:
- GO111MODULE=off go get -u github.com/cloudflare/cfssl/cmd/cfssl
- GO111MODULE=off go get -u github.com/cloudflare/cfssl/cmd/cfssljson
before_script:
- go version
- docker version
- curl -Lo kubectl https://storage.googleapis.com/kubernetes-release/release/v1.22.2/bin/linux/amd64/kubectl && chmod +x kubectl && sudo mv kubectl /usr/local/bin/
- curl -Lo minikube https://storage.googleapis.com/minikube/releases/v1.22.0/minikube-linux-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/
- curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/v1.31.0/skaffold-linux-amd64 && chmod +x skaffold && sudo mv skaffold /usr/local/bin/
- minikube start --vm-driver=docker --kubernetes-version=v1.22.2 --extra-config=apiserver.service-account-signing-key-file=/var/lib/minikube/certs/sa.key --extra-config=apiserver.service-account-key-file=/var/lib/minikube/certs/sa.pub --extra-config=apiserver.service-account-issuer=api --extra-config=apiserver.service-account-api-audiences=api
- minikube update-context
- JSONPATH='{range .items[*]}{@.metadata.name}:{range @.status.conditions[*]}{@.type}={@.status};{end}{end}'; until kubectl get nodes -o jsonpath="$JSONPATH" 2>&1 | grep -q "Ready=True"; do sleep 1; done
script:
- kubectl cluster-info
- go mod download
- cd $GOPATH/src/github.com/nats-io/nats-operator/ && make e2e FEATURE_GATE_CLUSTER_SCOPED=false NAMESPACE=${NAMESPACE_SCOPED_E2E_NAMESPACE}
- kubectl delete namespace ${NAMESPACE_SCOPED_E2E_NAMESPACE}
- cd $GOPATH/src/github.com/nats-io/nats-operator/ && make e2e FEATURE_GATE_CLUSTER_SCOPED=true NAMESPACE=${CLUSTER_SCOPED_E2E_NAMESPACE}
- kubectl delete namespace ${CLUSTER_SCOPED_E2E_NAMESPACE}