forked from k3s-io/cri
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
77 lines (70 loc) · 2.52 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
72
73
74
75
76
77
language: go
sudo: required
services:
- docker
cache:
directories:
- "${HOME}/google-cloud-sdk/"
before_install:
# Workaround to make gsutil work (see travis-ci#7940).
# TODO(random-liu): Remove this after travis-ci#7940 is fixed.
- sudo rm -f /etc/boto.cfg
# libseccomp in trusty is not new enough, need backports version.
- sudo sh -c "echo 'deb http://archive.ubuntu.com/ubuntu trusty-backports main restricted universe multiverse' > /etc/apt/sources.list.d/backports.list"
- sudo apt-get update
# Encrypted data is not available for pull request for security concern.
- if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then
openssl aes-256-cbc -K $encrypted_b5f8c391f742_key -iv $encrypted_b5f8c391f742_iv -in gcp-secret.json.enc -out gcp-secret.json -d;
fi
install:
- sudo apt-get install btrfs-tools
- sudo apt-get install libseccomp2/trusty-backports
- sudo apt-get install libseccomp-dev/trusty-backports
- sudo apt-get install libapparmor-dev
- sudo apt-get install socat
- docker run --rm -v /usr/local/bin:/target jpetazzo/nsenter
# Pull request test doesn't need google cloud sdk.
- if [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ ! -d ${HOME}/google-cloud-sdk ]; then
rm -rf "${HOME}/google-cloud-sdk";
export CLOUDSDK_CORE_DISABLE_PROMPTS=1;
curl https://sdk.cloud.google.com | bash;
gcloud version;
fi
before_script:
- export PATH=$HOME/gopath/bin:$PATH
- if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then
gcloud auth activate-service-account --key-file gcp-secret.json --project=k8s-cri-containerd;
fi
jobs:
include:
- stage: Build
script:
- make install.tools
- make .gitvalidation
- make binaries
go: 1.9.x
- script:
- make install.tools
- make .gitvalidation
- make binaries
go: tip
- stage: Test
script:
- make install.deps
- make test
- make test-integration
- make test-cri
after_script:
# Abuse travis to preserve the log.
- cat /tmp/test-integration/cri-containerd.log
- cat /tmp/test-integration/containerd.log
- cat /tmp/test-cri/cri-containerd.log
- cat /tmp/test-cri/containerd.log
go: 1.9.x
- stage: E2E Test
script:
# Skip node e2e test for pull request.
- test "${TRAVIS_PULL_REQUEST}" != "false" && exit 0 || true
- make install.deps
- UPLOAD_LOG=true make test-e2e-node
go: 1.9.x