forked from IBM/cloud-operators
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
45 lines (38 loc) · 1.09 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
language: go
go:
- "1.11.x"
dist: xenial
services:
- docker
go_import_path: github.com/ibm/cloud-operators
before_script:
- make deps
before_install:
- source ./tools/travis/travis-env.sh
- source ./hack/latest_tag
- ./tools/travis/k8s-tools.sh
- if [ ! -z "$BLUEMIX_API_KEY" ]; then ./tools/travis/set-kube-config.sh; fi
- if [ ! -z "$BLUEMIX_API_KEY" ]; then ./tools/travis/bx-install.sh; fi
- if [ ! -z "$BLUEMIX_API_KEY" ]; then ./tools/travis/bx-setup.sh; fi
script:
- make generate
- make lintall
- if [ ! -z "$BLUEMIX_API_KEY" ]; then make test; fi
- if [ ! -z "$BLUEMIX_API_KEY" ]; then test/e2e/test.sh; fi
after_success:
- make push
- test "$TRAVIS_EVENT_TYPE" != "pull_request" && make docker-build || echo "success"
# build only master and tagged/branch releases.
branches:
only:
- master
- /^[0-9]+\..*$/
- /^v[0-9]+\..*$/
- /^release-[0-9]+\..*$/
deploy:
skip_cleanup: true
provider: script
script: bash -c "make docker-push"
on:
all_branches: true
condition: $TRAVIS_BRANCH =~ ^master|[0-9]+\..*|v[0-9]+\..*|release-[0-9]+\..*$