-
Notifications
You must be signed in to change notification settings - Fork 10
/
.travis.yml
62 lines (59 loc) · 2.04 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
dist: xenial # required for Python >= 3.7
language: minimal
stages:
- "unit tests"
- "end-to-end tests"
- name: "build image"
if: branch = master
jobs:
include:
- stage: "unit tests"
language: python
python:
- "3.7"
install:
- pip install -r requirements.txt
- pip install -r test-requirements.txt
env:
- ITER8_ANALYTICS_METRICS_BACKEND_URL="http://localhost:9090"
script:
- make test # Run unit tests
- &endtoend
stage: "end-to-end tests" # Parallel jobs for testing different version combinations
sudo: required
install:
- git clone https://github.com/iter8-tools/e2e-tests.git
script:
- e2e-tests/e2etests.sh # Run end-to-end tests
env:
- CHANGE_MINIKUBE_NONE_USER=true KUBE_VERSION=1.15.10 ISTIO=1.4.3
- <<: *endtoend
env:
- CHANGE_MINIKUBE_NONE_USER=true KUBE_VERSION=1.15.10 ISTIO=1.4.6
- <<: *endtoend
env:
- CHANGE_MINIKUBE_NONE_USER=true KUBE_VERSION=1.16.0 ISTIO=1.4.3
- <<: *endtoend
env:
- CHANGE_MINIKUBE_NONE_USER=true KUBE_VERSION=1.16.0 ISTIO=1.4.6
- stage: "build image"
script:
- if [ "$TRAVIS_BRANCH" == "master" ]; then
echo $DOCKERHUB_TOKEN | docker login -u $DOCKERHUB_USERNAME --password-stdin;
if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
export IMG="iter8/iter8-analytics:$TRAVIS_BUILD_NUMBER-PR_$TRAVIS_PULL_REQUEST";
echo "Building PR Docker image - $IMG";
make docker-build;
make docker-push;
else
export IMG="iter8/iter8-analytics:$TRAVIS_BUILD_NUMBER-$TRAVIS_COMMIT";
echo "Building Docker image - $IMG";
make docker-build;
make docker-push;
LATEST="iter8/iter8-analytics:latest";
echo "Tagging image as latest - $LATEST";
docker tag $IMG $LATEST;
export IMG=$LATEST;
make docker-push;
fi
fi