File tree Expand file tree Collapse file tree 3 files changed +61
-7
lines changed Expand file tree Collapse file tree 3 files changed +61
-7
lines changed Original file line number Diff line number Diff line change @@ -5,14 +5,28 @@ dist: trusty
5
5
go :
6
6
- " 1.11.1"
7
7
8
+ os :
9
+ - linux
10
+ - windows
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
+ powershell hack/install-kubelet.ps1
25
+ else
26
+ hack/install-docker.sh
27
+ hack/install-kubelet.sh
28
+ fi
29
+ )
16
30
17
31
install :
18
32
- make install.tools
@@ -21,12 +35,14 @@ jobs:
21
35
include :
22
36
- stage : Static check
23
37
script :
24
- - make lint
25
- - make gofmt
38
+ # Only need to run on Linux.
39
+ - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then make lint; make gofmt; fi
26
40
- stage : Build
27
41
script :
28
- - make release
42
+ # Only need to run on Linux.
43
+ - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then make release; fi
29
44
- stage : Test
30
45
script :
31
46
- make
32
- - sudo env PATH=$PATH GOPATH=$GOPATH hack/run-critest.sh
47
+ # Disable windows test temporarily because windows test images are not ready yet.
48
+ - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo env PATH=$PATH GOPATH=$GOPATH hack/run-critest.sh; fi
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
+ # Install kubelet
16
+ $gopath = [System.Environment ]::GetEnvironmentVariable(" GOPATH" )
17
+ $k8siopath = $gopath + " /src/k8s.io"
18
+ $kubernetespath = $k8siopath + " /kubernetes"
19
+ mkdir - p $k8siopath
20
+ cd $k8siopath
21
+ git clone - c core.symlinks= true https:// github.com / kubernetes/ kubernetes
22
+
23
+ cd $kubernetespath
24
+ $branch = [System.Environment ]::GetEnvironmentVariable(" TRAVIS_BRANCH" )
25
+ if ( ! " $branch " .Equals(" master" ) ) {
26
+ # We can do this because cri-tools have the same branch name with kubernetes.
27
+ git checkout " $branch "
28
+ }
29
+
30
+ # Build kubelet
31
+ go build cmd\kubelet\kubelet.go
32
+ cp .\kubelet.exe " $gopath /bin/"
33
+
34
+ # Dump version
35
+ echo " Kubelet version:"
36
+ kubelet.exe -- version
37
+ echo " Docker version:"
38
+ docker version
39
+
You can’t perform that action at this time.
0 commit comments