File tree 3 files changed +74
-5
lines changed
3 files changed +74
-5
lines changed Original file line number Diff line number Diff line change @@ -3,30 +3,57 @@ sudo: required
3
3
dist : trusty
4
4
5
5
go :
6
- - " 1.11.1"
6
+ - 1.11.x
7
+
8
+ os :
9
+ - linux
10
+ - windows
7
11
8
12
go_import_path : github.com/kubernetes-sigs/cri-tools
9
13
10
14
services :
11
15
- docker
12
16
13
17
before_install :
14
- - hack/install-docker.sh
15
- - hack/install-kubelet.sh
18
+ - |
19
+ (
20
+ set -Eeuo pipefail
21
+ if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then
22
+ choco install -y make mingw
23
+ export PATH="/c/tools/mingw64/bin:/c/ProgramData/chocolatey/bin;$PATH"
24
+ fi
25
+ )
16
26
17
27
install :
18
28
- make install.tools
19
29
20
30
jobs :
21
31
include :
22
32
- stage : Static check
33
+ os : linux # Only need to run on Linux
23
34
script :
24
35
- make lint
25
36
- make gofmt
26
37
- stage : Build
38
+ os : linux # Only need to run on Linux
27
39
script :
28
- - make release
40
+ - make release
29
41
- stage : Test
42
+ os : linux
30
43
script :
31
44
- make
45
+ - hack/install-docker.sh
46
+ - hack/install-kubelet.sh
32
47
- sudo env PATH=$PATH GOPATH=$GOPATH hack/run-critest.sh
48
+ - stage : Test
49
+ os : windows
50
+ script :
51
+ - make
52
+ - powershell -c "Set-ExecutionPolicy Bypass -Scope CURRENTUSER -Force"
53
+ - powershell hack/install-kubelet.ps1
54
+ # Skip hack/run-critest.sh temporarily.
55
+
56
+ stages :
57
+ - Static check
58
+ - Build
59
+ - Test
Original file line number Diff line number Diff line change @@ -34,4 +34,3 @@ rm -f docker.tgz
34
34
35
35
# Restart docker daemon.
36
36
sudo service docker restart
37
-
Original file line number Diff line number Diff line change
1
+ # Copyright 2017 The Kubernetes Authors.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ # Stop on any error.
16
+ $ErrorActionPreference = " Stop"
17
+ $VerbosePreference = " Continue"
18
+
19
+ # Install kubelet
20
+ $gopath = [System.Environment ]::GetEnvironmentVariable(" GOPATH" )
21
+ $k8siopath = $gopath + " /src/k8s.io"
22
+ $kubernetespath = $k8siopath + " /kubernetes"
23
+ mkdir - p $k8siopath
24
+ cd $k8siopath
25
+ git clone - c core.symlinks= true https:// github.com / kubernetes/ kubernetes
26
+
27
+ cd $kubernetespath
28
+ $branch = [System.Environment ]::GetEnvironmentVariable(" TRAVIS_BRANCH" )
29
+ if ( ! " $branch " .Equals(" master" ) ) {
30
+ # We can do this because cri-tools have the same branch name with kubernetes.
31
+ git checkout " $branch "
32
+ }
33
+
34
+ # Build kubelet
35
+ $version = git describe -- tags -- dirty -- always
36
+ go build - ldflags " -X k8s.io/kubernetes/vendor/k8s.io/client-go/pkg/version.gitVersion=$version -X k8s.io/kubernetes/pkg/version.gitVersion=$version " ./ cmd/ kubelet/ kubelet.go
37
+ cp ./ kubelet.exe " $gopath /bin/"
38
+
39
+ # Dump version
40
+ echo " Kubelet version:"
41
+ kubelet.exe -- version
42
+ echo " Docker version:"
43
+ docker version
You can’t perform that action at this time.
0 commit comments