forked from submariner-io/submariner
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
62 lines (56 loc) · 1.97 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
language: go
branches:
only:
- master
- /^v\d+\.\d+\.\d+.*$/
- /^release-\d+.\d+.*$/
git:
depth: false
jobs:
include:
- env: CMD="make test validate codegen"
- env: CMD="make e2e" DEPLOY=true
- env: CMD="make e2e deploytool=helm globalnet=true"
install:
- sudo apt-get install moreutils # make ts available
- sudo add-apt-repository -y ppa:wireguard/wireguard # add WireGuard support
- sudo apt-get update
- sudo apt-get install wireguard -y
services:
- docker
before_script:
- CHANGED_FILES_PR=$(git diff --name-only HEAD $(git merge-base HEAD $TRAVIS_BRANCH))
script:
- set -o pipefail;
$CMD 2>&1 | ts '[%H:%M:%.S]' -s
after_success:
- if [[ $CMD =~ "e2e" &&
(
("${CHANGED_FILES_PR[@]}" =~ "scripts/kind-e2e/e2e.sh") ||
($CMD =~ "helm" && "${CHANGED_FILES_PR[@]}" =~ "scripts/kind-e2e/lib_helm_deploy_subm.sh") ||
(! $CMD =~ "helm" && "${CHANGED_FILES_PR[@]}" =~ "scripts/kind-e2e/lib_operator_deploy_subm.sh")
) ]]; then
echo "scripts/kind-e2e/*.sh files used by this job were modified, testing recurring run on already deployed infrastructure.";
set -o pipefail;
$CMD 2>&1 | ts '[%H:%M:%.S]' -s;
fi;
echo "Testing cleaning up clusters";
set -o pipefail;
make cleanup 2>&1 | ts '[%H:%M:%.S]' -s
deploy:
- provider: script
script: make images images_flags="--nocache" release release_images="submariner submariner-route-agent submariner-globalnet"
on:
branch: master
condition: $DEPLOY = true
- provider: script
script: make images images_flags="--nocache" release release_images="submariner submariner-route-agent submariner-globalnet"
on:
branch: /^release-\d+.\d+.*$/
- provider: script
script: make images images_flags="--nocache" release release_images="submariner submariner-route-agent submariner-globalnet" release_tag="$TRAVIS_TAG"
skip_cleanup: true
on:
tags: true
condition: $DEPLOY = true