forked from kubeedge/kubeedge
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
168 lines (156 loc) · 5.81 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
language: go
git:
depth: false
os: linux
dist: focal
services:
- docker
go:
- 1.14
env:
- HOME=/home/travis
cache:
directories:
- $HOME/.cache/go-build
- $HOME/gopath/pkg/mod
before_install:
- |
if ! git diff --name-only $TRAVIS_COMMIT_RANGE | grep -qvE '(\.md)|(\.png)|(\.pdf)|(\.html)|^(LICENSE)|^(docs)|^(OWNERS)|^(MAINTAINERS)'
then
echo "Only doc files were updated, skip running the CI."
travis_terminate 0
fi
install: skip
jobs:
include:
- stage: "Verify vendor, licenses, do lint"
name: "Verify vendor, licenses, do lint"
before_script:
- curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | BINARY=golangci-lint sh -s -- -d -b $(go env GOPATH)/bin v1.23.7
- export GO111MODULE=on
- export GOFLAGS=-mod=mod
- sudo apt-get install jq -y
script:
- make verify
- make lint
- stage: "Test on amd64"
name: "build, smallbuild, crossbuild"
arch: amd64
before_script:
- sudo apt-get install upx-ucl -y
- sudo apt-get install gcc-aarch64-linux-gnu -y
- sudo apt-get install libc6-dev-arm64-cross -y
- sudo apt-get install gcc-arm-linux-gnueabi -y
- sudo apt-get install libc6-dev-armel-cross -y
- export GOFLAGS=-mod=vendor
script:
- make
- make bluetoothdevice
- make smallbuild
- make crossbuild
- make crossbuild GOARM=GOARM7
- name: "unit test, integration test edge"
arch: amd64
before_script:
- go get github.com/onsi/ginkgo/ginkgo
- export GOFLAGS=-mod=mod
script:
- make test
- make integrationtest
- name: "e2e test"
arch: amd64
before_script:
- go get github.com/onsi/ginkgo/ginkgo
- go get sigs.k8s.io/[email protected]
- go mod vendor
- export GOFLAGS=-mod=vendor
- sudo apt-get update && sudo apt-get install -y apt-transport-https
- curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
- echo "deb https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee -a /etc/apt/sources.list.d/kubernetes.list
- sudo apt-get update
- sudo apt-get install -y kubectl
script:
- travis_retry make e2e
- name: "keadm e2e test"
arch: amd64
before_script:
- go get github.com/onsi/ginkgo/ginkgo
- go get sigs.k8s.io/[email protected]
- go mod vendor
- export GOFLAGS=-mod=vendor
- sudo apt-get update && sudo apt-get install -y apt-transport-https
- curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
- echo "deb https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee -a /etc/apt/sources.list.d/kubernetes.list
- sudo apt-get update
- sudo apt-get install -y kubectl
- export RELEASE_VERSION=$(wget -qO - https://kubeedge.io/latestversion | cat)
- travis_retry sudo wget -qP /etc/kubeedge https://github.com/kubeedge/kubeedge/releases/download/${RELEASE_VERSION}/checksum_kubeedge-${RELEASE_VERSION}-linux-amd64.tar.gz.txt
- travis_retry sudo wget -qP /etc/kubeedge https://github.com/kubeedge/kubeedge/releases/download/${RELEASE_VERSION}/kubeedge-${RELEASE_VERSION}-linux-amd64.tar.gz
- echo "$(cat /etc/kubeedge/checksum_kubeedge-${RELEASE_VERSION}-linux-amd64.tar.gz.txt) /etc/kubeedge/kubeedge-${RELEASE_VERSION}-linux-amd64.tar.gz" | sha512sum -c || exit 1
script:
- make keadm_e2e
- name: "build docker images on amd64"
arch: amd64
script:
- make cloudimage
- make admissionimage
- make edgeimage ARCH="amd64"
- make edgesiteimage ARCH="amd64"
- make bluetoothdevice_image
- stage: "Test on arm64"
name: "build, smallbuild"
arch: arm64
before_script:
- export GOFLAGS=-mod=vendor
- sudo apt-get install upx-ucl -y
script:
- make
- make bluetoothdevice
- make smallbuild
- name: "unit test, integration test edge"
arch: arm64-graviton2
virt: vm
before_script:
- go get github.com/onsi/ginkgo/ginkgo
- export GOFLAGS=-mod=mod
script:
- make test
- make integrationtest
- name: "e2e test"
arch: arm64-graviton2
virt: vm
before_script:
- go get github.com/onsi/ginkgo/ginkgo
- go get sigs.k8s.io/[email protected]
- go mod vendor
- export GOFLAGS=-mod=vendor
- sudo apt-get update && sudo apt-get install -y apt-transport-https
- curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
- echo "deb https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee -a /etc/apt/sources.list.d/kubernetes.list
- sudo apt-get update
- sudo apt-get install -y kubectl
script:
- travis_retry make e2e
- name: "keadm e2e test"
arch: arm64-graviton2
virt: vm
before_script:
- go get github.com/onsi/ginkgo/ginkgo
- go get sigs.k8s.io/[email protected]
- go mod vendor
- export GOFLAGS=-mod=vendor
- sudo apt-get update && sudo apt-get install -y apt-transport-https
- curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
- echo "deb https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee -a /etc/apt/sources.list.d/kubernetes.list
- sudo apt-get update
- sudo apt-get install -y kubectl
script:
- travis_retry make keadm_e2e
- name: "build docker images on arm64"
arch: arm64
script:
- make cloudimage
- make admissionimage
- make edgeimage ARCH="arm64v8"
- make edgesiteimage ARCH="arm64v8"
- make bluetoothdevice_image