File tree Expand file tree Collapse file tree 3 files changed +62
-7
lines changed Expand file tree Collapse file tree 3 files changed +62
-7
lines changed Original file line number Diff line number Diff line change @@ -5,14 +5,29 @@ 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 -c "Set-ExecutionPolicy Bypass -Scope CURRENTUSER -Force"
25
+ powershell hack/install-kubelet.ps1
26
+ else
27
+ hack/install-docker.sh
28
+ hack/install-kubelet.sh
29
+ fi
30
+ )
16
31
17
32
install :
18
33
- make install.tools
@@ -21,12 +36,14 @@ jobs:
21
36
include :
22
37
- stage : Static check
23
38
script :
24
- - make lint
25
- - make gofmt
39
+ # Only need to run on Linux.
40
+ - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then make lint; make gofmt; fi
26
41
- stage : Build
27
42
script :
28
- - make release
43
+ # Only need to run on Linux.
44
+ - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then make release; fi
29
45
- stage : Test
30
46
script :
31
47
- make
32
- - sudo env PATH=$PATH GOPATH=$GOPATH hack/run-critest.sh
48
+ # Disable windows test temporarily because windows test images are not ready yet.
49
+ - 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