forked from operator-framework/community-operators
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
40 lines (34 loc) · 1.44 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
dist: xenial
language: python
os: linux
sudo: required
python:
- "3.6"
env:
- CHANGE_MINIKUBE_NONE_USER=true DISTRO_TYPE=upstream
before_install:
# check-pr needs to be sourced so it can pass the test early.
- source scripts/ci/check-pr $DISTRO_TYPE
install:
- scripts/ci/install-deps $DISTRO_TYPE
before_script:
- eval $(scripts/ci/operators-env) && scripts/ci/verify-operator
- sudo minikube start --memory=4096 --vm-driver=none --kubernetes-version="v1.12.0" --extra-config=apiserver.v=4
- sudo chown -R $USER ${HOME}/.{mini,}kube
- kubectl config use-context minikube
- scripts/ci/install-olm-local
jobs:
include:
- name: Scorecard on minikube
script:
# Since travis conditionals can't operate on bash scripts, the first script
# line will check whether only scripts have been updated, and if so use
# the jaeger operator as an operator to test script correctness.
- |-
if ! git diff --name-only $TRAVIS_COMMIT_RANGE | grep -q '\.yaml'; then \
OPERATORS_UPSTREAM="upstream-community-operators/jaeger:$(yq r --tojson upstream-community-operators/jaeger/jaeger.package.yaml "channels" \
| jq ".[] | .currentCSV" | sort -V | tail -1 | sed -E 's/"[a-zA-Z\-]+\.?v?([0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z0-9]+)?)"/\1/')" \
scripts/ci/test-pr $DISTRO_TYPE && exit 0
fi
# operators-env exports variables containing all operators to be tested.
- eval $(scripts/ci/operators-env) && scripts/ci/test-pr $DISTRO_TYPE