File tree Expand file tree Collapse file tree 2 files changed +28
-2
lines changed Expand file tree Collapse file tree 2 files changed +28
-2
lines changed Original file line number Diff line number Diff line change 9
9
- name : prepare-amd64-binaries
10
10
image : ubuntu:20.04
11
11
commands :
12
- - apt-get -y update && apt-get -y install make curl tar
12
+ - apt-get -y update && apt-get -y install make curl tar docker.io
13
+ - curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sh -s -- -b $(pwd)
14
+ - make check-security
13
15
- make k8s-binaries
16
+ privileged : true
17
+ volumes :
18
+ - name : socket
19
+ path : /var/run/docker.sock
14
20
when :
15
21
event :
16
22
- tag
@@ -31,6 +37,10 @@ steps:
31
37
- drone-publish.rancher.io
32
38
event :
33
39
- tag
40
+ volumes :
41
+ - name : socket
42
+ host :
43
+ path : /var/run/docker.sock
34
44
---
35
45
kind : pipeline
36
46
name : linux-arm64
@@ -43,8 +53,14 @@ steps:
43
53
- name : prepare-arm64-binaries
44
54
image : ubuntu:20.04
45
55
commands :
46
- - apt-get -y update && apt-get -y install make curl tar
56
+ - apt-get -y update && apt-get -y install make curl tar docker.io
57
+ - curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sh -s -- -b $(pwd)
58
+ - make check-security
47
59
- make ARCH=arm64 k8s-binaries
60
+ privileged : true
61
+ volumes :
62
+ - name : socket
63
+ path : /var/run/docker.sock
48
64
when :
49
65
event :
50
66
- tag
@@ -65,6 +81,11 @@ steps:
65
81
- drone-publish.rancher.io
66
82
event :
67
83
- tag
84
+
85
+ volumes :
86
+ - name : socket
87
+ host :
88
+ path : /var/run/docker.sock
68
89
---
69
90
kind : pipeline
70
91
name : windows-1809-pr
Original file line number Diff line number Diff line change @@ -10,6 +10,8 @@ K8S_STAGING:=$(shell mktemp -d)
10
10
11
11
K8S_SERVER_TARBALL =kubernetes-server-linux-$(ARCH ) .tar.gz
12
12
13
+ HYPERKUBE_BASE_VERSION = $(shell grep hyperkube-base Dockerfile | awk '{ print $$2 }' )
14
+
13
15
all : all-push
14
16
15
17
sub-build-% :
@@ -55,6 +57,9 @@ build: k8s-binaries
55
57
push : build
56
58
docker push ${IMAGE} :${K8S_VERSION} -${TAGEND} -${ARCH}
57
59
60
+ check-security :
61
+ /drone/src/trivy image -s HIGH,CRITICAL --exit-code 1 $(HYPERKUBE_BASE_VERSION ) || (echo " trivy found issues $$ ?" ; exit 1)
62
+
58
63
.PHONY : all build push clean all-build all-push-images all-push push-manifest k8s-binaries
59
64
60
65
.DEFAULT_GOAL := build
You can’t perform that action at this time.
0 commit comments