forked from lucasponce/iter8-controller
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
61 lines (58 loc) · 1.94 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
language: go
go:
- "1.15"
stages:
- "unit tests"
- "end-to-end tests"
- "build image"
- "release"
# Define yaml anchor to be reused across testing matrix
_end_to_end_script: &end_to_end_script
if: (type = pull_request) AND (head_branch != master) AND (head_branch !~ /^v[0-9]+\.[0-9]+$/)
script:
- test/e2e/install-minikube.sh
- test/e2e/sanity-check.sh
- test/e2e/install-istio.sh
- test/e2e/e2e-local.sh
- test/e2e/install-iter8.sh
- test/e2e/e2e-test.sh
jobs:
include:
- stage: "unit tests"
go_import_path: github.com/iter8-tools/iter8-istio/
before_install:
- ./test/scripts/tools.sh
if: (type = pull_request) AND (head_branch != master) AND (head_branch !~ /^v[0-9]+\.[0-9]+$/)
script:
- go test ./test/.
- stage: "end-to-end tests"
env: KUBE_VERSION=v1.17.7 ISTIO_VERSION=1.4.10
<<: *end_to_end_script
- env: KUBE_VERSION=v1.17.7 ISTIO_VERSION=1.6.9
<<: *end_to_end_script
- env: KUBE_VERSION=v1.17.7 ISTIO_VERSION=1.7.2
<<: *end_to_end_script
- stage: "build image"
# only build images for master and release branches + tagged releases
if: (type = push) AND (branch = master OR branch =~ /^v[0-9]+\.[0-9]+(\.[0-9]+)*.*$/)
script:
- test/e2e/build-image.sh
- stage: "release"
script: skip
# only do release for tagged releases
if: (type = push) AND (branch =~ /^v[0-9]+\.[0-9]+\.[0-9]+.*$/)
before_deploy:
- make ver=${TRAVIS_BRANCH} changelog > release.note
- tar cvzf iter8-controller.tgz install/helm/iter8-controller/
deploy:
provider: releases
# use developer preview version as 'body' doesn't work with multiple lines
edge: true
api_key: ${GITHUB_TOKEN}
file: iter8-controller.tgz
release_notes_file: release.note
name: ${TRAVIS_BRANCH}
draft: false
skip_cleanup: true
on:
tags: true