forked from kanisterio/kanister
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
71 lines (66 loc) · 1.63 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
63
64
65
66
67
68
69
70
71
sudo: required
services:
- docker
# Selecting C as the language keeps the container to a minimum footprint. All
# go-specifc code is run in build container.
language: c
branches:
only:
- master
cache:
directories:
- .go/pkg/mod/cache
- .go/cache
jobs:
include:
- stage: test
script:
- make docs
- stage: test
services:
- docker
install:
- make go-mod-download
before_script:
- docker pull kindest/node:v1.21.1
- make start-kind
script:
- make build
# Enable codegen test once we upgrade k8s.io/client-go to work with go1.14
# - make codegen
- make test
before_cache:
- sudo chown -R travis:travis ./.go
after_script:
- make stop-kind
- stage: test
services:
- docker
install:
- make go-mod-download
before_script:
- docker pull kindest/node:v1.21.1
- make start-kind
- make install-minio
script:
- make integration-test
before_cache:
- sudo chown -R travis:travis ./.go
after_script:
- make stop-kind
- stage: test
script:
- make golint
- stage: test
services:
- docker
script:
- set -ev
- make release-snapshot; export EXIT_STATUS=$?
# Push images if PR is merged to master
- |
if [[ "$EXIT_STATUS" -eq 0 ]] && [[ "$TRAVIS_BRANCH" == "master" ]] && [[ "$TRAVIS_PULL_REQUEST" == "false" ]]; then
sudo chown "$USER":"$USER" "$HOME"/.docker -R
docker login ghcr.io -u "$GITHUB_USERNAME" -p "$GITHUB_TOKEN"
./build/push_images.sh
fi