@@ -32,41 +32,6 @@ linuxkit_pkg_build: &linuxkit_pkg_build
32
32
root : /workspace
33
33
paths : packages
34
34
35
- image_cache_build : &image_cache_build
36
- docker :
37
- - image : debian:stretch
38
- steps :
39
- - run :
40
- name : Configure $PATH
41
- command : echo 'export PATH=/workspace/bin:$PATH' >> $BASH_ENV
42
- - run :
43
- name : Install packages
44
- # ca-certificates are needed for attach_workspace (and git over https)
45
- command : apt-get update && apt-get install -y ca-certificates git make openssh-client
46
- - attach_workspace :
47
- at : /workspace
48
- - checkout
49
- - setup_remote_docker :
50
- version : 17.06.1-ce
51
- - run :
52
- name : Docker version
53
- command : |
54
- docker version
55
- - run :
56
- name : Building package
57
- command : |
58
- CACHE=${CIRCLE_JOB#pkg-image-cache-}
59
- PKG=kubernetes-docker-image-cache-$CACHE
60
- mkdir /workspace/packages
61
- make --no-print-directory -C pkg/image-cache build-$CACHE
62
- make --no-print-directory -C pkg/image-cache show-tag-$CACHE > /workspace/packages/$PKG.tag
63
- echo
64
- docker image ls --all
65
- docker image save -o /workspace/packages/$PKG.tar linuxkit/$PKG
66
- - persist_to_workspace :
67
- root : /workspace
68
- paths : packages
69
-
70
35
image_build : &image_build
71
36
docker :
72
37
- image : debian:stretch
129
94
command : |
130
95
curl -fsSL -o /tmp/docker.tgz https://download.docker.com/linux/static/stable/x86_64/docker-17.06.2-ce.tgz
131
96
tar xfO /tmp/docker.tgz docker/docker > /workspace/bin/docker
132
- curl -fsSL -o /workspace/bin/linuxkit https://215 -46932243-gh.circle-artifacts.com/0/linuxkit-linux-amd64
97
+ curl -fsSL -o /workspace/bin/linuxkit https://253 -46932243-gh.circle-artifacts.com/0/linuxkit-linux-amd64
133
98
curl -fsSL -o /workspace/bin/manifest-tool https://github.com/estesp/manifest-tool/releases/download/v0.7.0/manifest-tool-linux-amd64
134
99
curl -fsSL -o /workspace/bin/notary https://github.com/theupdateframework/notary/releases/download/v0.4.3/notary-Linux-amd64
135
100
@@ -140,7 +105,7 @@ jobs:
140
105
echo "Checking checksums"
141
106
sha256sum -c <<EOF
142
107
6af40e74b2dbb2927882acab52d50bfc72551779d541957fc70b6adc325ee5ef /workspace/bin/docker
143
- 1f39537da2b83fa618cbba110ede937fa7b34577026cf1369d280fd372c8efc1 /workspace/bin/linuxkit
108
+ 200099591f3ee30ffb8915bea2d09995a6fe31bb933ceab0d700f3c1440baba8 /workspace/bin/linuxkit
144
109
e4ca2ef0015a4be8597d31d9e3e70d88da33924ae72b0999e9f3b79304d4710d /workspace/bin/manifest-tool
145
110
06cd02c4c2e7a3b1ad9899b03b3d4dde5392d964c675247d32f604a24661f839 /workspace/bin/notary
146
111
EOF
@@ -155,7 +120,7 @@ jobs:
155
120
root : /workspace
156
121
paths : bin
157
122
158
- check-hashes :
123
+ lint :
159
124
docker :
160
125
- image : debian:stretch
161
126
steps :
@@ -168,26 +133,64 @@ jobs:
168
133
command : apt-get update && apt-get install -y ca-certificates git make openssh-client
169
134
- attach_workspace :
170
135
at : /workspace
136
+ - setup_remote_docker :
137
+ version : 17.06.1-ce
138
+ - run :
139
+ name : Docker version
140
+ command : |
141
+ docker version
171
142
- checkout
172
143
- run :
173
- name : Check hashes
144
+ name : Check YML hashes
174
145
command : |
146
+ # Check yml hashes are up to date.
175
147
make update-hashes
176
148
if ! git diff --exit-code ; then
177
149
echo ""
178
150
echo "*** Hashes are not up to date."
179
151
exit 1
180
152
fi
153
+ - run :
154
+ name : Check image-cache similarity
155
+ command : |
156
+ kdicc=pkg/kubernetes-docker-image-cache-common
157
+ kdiccp=pkg/kubernetes-docker-image-cache-control-plane
158
+ # Check that the image cache build files have not drifted apart
159
+ if ! diff $kdicc/Dockerfile $kdiccp/Dockerfile ; then
160
+ echo ""
161
+ echo "*** image-cache Dockerfiles do not match."
162
+ exit 1
163
+ fi
164
+ # These differ in one expected way, the name
165
+ sed -e 's/^image: kubernetes-docker-image-cache-common$/image: kubernetes-docker-image-cache/' <$kdicc/build.yml >$kdicc/build.yml.for-lint
166
+ sed -e 's/^image: kubernetes-docker-image-cache-control-plane$/image: kubernetes-docker-image-cache/' <$kdiccp/build.yml >$kdiccp/build.yml.for-lint
167
+ if ! diff $kdicc/build.yml.for-lint $kdiccp/build.yml.for-lint ; then
168
+ echo ""
169
+ echo "*** image-cache build.yml files do not match."
170
+ exit 1
171
+ fi
172
+ rm -f $kdicc/build.yml.for-lint $kdiccp/build.yml.for-lint
173
+ - run :
174
+ # This one potentially does a lot of docker pull, leave it until last.
175
+ name : Check image cache images
176
+ command : |
177
+ # Check pkg/kubernetes-docker-image-cache-*/image.lst are up to date
178
+ make refresh-image-caches
179
+ if ! git diff --exit-code ; then
180
+ echo ""
181
+ echo "*** image cache lists are not up to date."
182
+ exit 1
183
+ fi
181
184
182
185
pkg-cri-containerd :
183
186
<< : *linuxkit_pkg_build
184
187
pkg-kubelet :
185
188
<< : *linuxkit_pkg_build
186
189
187
- pkg-image-cache-common :
188
- << : *image_cache_build
189
- pkg-image-cache-control-plane :
190
- << : *image_cache_build
190
+ pkg-kubernetes-docker- image-cache-common :
191
+ << : *linuxkit_pkg_build
192
+ pkg-kubernetes-docker- image-cache-control-plane :
193
+ << : *linuxkit_pkg_build
191
194
192
195
image-docker-weave :
193
196
<< : *image_build
@@ -266,7 +269,7 @@ workflows:
266
269
build :
267
270
jobs :
268
271
- dependencies
269
- - check-hashes :
272
+ - lint :
270
273
requires :
271
274
- dependencies
272
275
@@ -276,25 +279,25 @@ workflows:
276
279
- pkg-cri-containerd :
277
280
requires :
278
281
- dependencies
279
- - pkg-image-cache-common :
282
+ - pkg-kubernetes-docker- image-cache-common :
280
283
requires :
281
284
- dependencies
282
- - pkg-image-cache-control-plane :
285
+ - pkg-kubernetes-docker- image-cache-control-plane :
283
286
requires :
284
287
- dependencies
285
288
286
289
- image-docker-weave :
287
290
requires :
288
291
- dependencies
289
292
- pkg-kubelet
290
- - pkg-image-cache-common
291
- - pkg-image-cache-control-plane
293
+ - pkg-kubernetes-docker- image-cache-common
294
+ - pkg-kubernetes-docker- image-cache-control-plane
292
295
- image-docker-bridge :
293
296
requires :
294
297
- dependencies
295
298
- pkg-kubelet
296
- - pkg-image-cache-common
297
- - pkg-image-cache-control-plane
299
+ - pkg-kubernetes-docker- image-cache-common
300
+ - pkg-kubernetes-docker- image-cache-control-plane
298
301
- image-cri-containerd-weave :
299
302
requires :
300
303
- dependencies
@@ -311,11 +314,11 @@ workflows:
311
314
# tedious. Some of these are already covered transitively,
312
315
# but be more explicit.
313
316
requires :
314
- - check-hashes
317
+ - lint
315
318
- pkg-kubelet
316
319
- pkg-cri-containerd
317
- - pkg-image-cache-common
318
- - pkg-image-cache-control-plane
320
+ - pkg-kubernetes-docker- image-cache-common
321
+ - pkg-kubernetes-docker- image-cache-control-plane
319
322
- image-docker-weave
320
323
- image-docker-bridge
321
324
- image-cri-containerd-weave
0 commit comments