@@ -102,49 +102,6 @@ LABEL name="barbican-kms-plugin" \
102102
103103CMD ["sh" , "-c" , "/bin/barbican-kms-plugin --socketpath ${socketpath} --cloud-config ${cloudconfig}" ]
104104
105- # #
106- # # cinder-csi-plugin
107- # #
108-
109- # step 1: copy all necessary files from Debian distro to /dest folder
110- # all magic happens in tools/csi-deps.sh
111- FROM ${DEBIAN_IMAGE} AS cinder-csi-plugin-utils
112-
113- RUN clean-install bash rsync mount udev btrfs-progs e2fsprogs xfsprogs util-linux
114- COPY tools/csi-deps.sh /tools/csi-deps.sh
115- RUN /tools/csi-deps.sh
116-
117- # step 2: check if all necessary files are copied and work properly
118- # the build have to finish without errors, but the result image will not be used
119- FROM ${DISTROLESS_IMAGE} AS cinder-csi-plugin-utils-check
120-
121- COPY --from=cinder-csi-plugin-utils /dest /
122- COPY --from=cinder-csi-plugin-utils /bin/sh /bin/sh
123- COPY tools/csi-deps-check.sh /tools/csi-deps-check.sh
124-
125- SHELL ["/bin/sh" ]
126- RUN /tools/csi-deps-check.sh
127-
128- # step 3: build tiny cinder-csi-plugin image with only necessary files
129- FROM ${DISTROLESS_IMAGE} AS cinder-csi-plugin
130-
131- # Copying csi-deps-check.sh simply ensures that the resulting image has a dependency
132- # on cinder-csi-plugin-utils-check and therefore that the check has passed
133- COPY --from=cinder-csi-plugin-utils-check /tools/csi-deps-check.sh /bin/csi-deps-check.sh
134- COPY --from=cinder-csi-plugin-utils /dest /
135- COPY --from=builder /build/cinder-csi-plugin /bin/cinder-csi-plugin
136- COPY --from=certs /etc/ssl/certs /etc/ssl/certs
137-
138- LABEL name="cinder-csi-plugin" \
139- license="Apache Version 2.0" \
140- maintainers="Kubernetes Authors" \
141- description="Cinder CSI Plugin" \
142- distribution-scope="public" \
143- summary="Cinder CSI Plugin" \
144- help="none"
145-
146- CMD ["/bin/cinder-csi-plugin" ]
147-
148105# #
149106# # k8s-keystone-auth
150107# #
@@ -221,3 +178,47 @@ LABEL name="octavia-ingress-controller" \
221178 help="none"
222179
223180CMD ["/bin/octavia-ingress-controller" ]
181+
182+ # # SKE: Concourse only pushes the last built image. Therefore we have to move this to the bottom.
183+ # #
184+ # # cinder-csi-plugin
185+ # #
186+
187+ # step 1: copy all necessary files from Debian distro to /dest folder
188+ # all magic happens in tools/csi-deps.sh
189+ FROM ${DEBIAN_IMAGE} AS cinder-csi-plugin-utils
190+
191+ RUN clean-install bash rsync mount udev btrfs-progs e2fsprogs xfsprogs util-linux
192+ COPY tools/csi-deps.sh /tools/csi-deps.sh
193+ RUN /tools/csi-deps.sh
194+
195+ # step 2: check if all necessary files are copied and work properly
196+ # the build have to finish without errors, but the result image will not be used
197+ FROM ${DISTROLESS_IMAGE} AS cinder-csi-plugin-utils-check
198+
199+ COPY --from=cinder-csi-plugin-utils /dest /
200+ COPY --from=cinder-csi-plugin-utils /bin/sh /bin/sh
201+ COPY tools/csi-deps-check.sh /tools/csi-deps-check.sh
202+
203+ SHELL ["/bin/sh" ]
204+ RUN /tools/csi-deps-check.sh
205+
206+ # step 3: build tiny cinder-csi-plugin image with only necessary files
207+ FROM ${DISTROLESS_IMAGE} AS cinder-csi-plugin
208+
209+ # Copying csi-deps-check.sh simply ensures that the resulting image has a dependency
210+ # on cinder-csi-plugin-utils-check and therefore that the check has passed
211+ COPY --from=cinder-csi-plugin-utils-check /tools/csi-deps-check.sh /bin/csi-deps-check.sh
212+ COPY --from=cinder-csi-plugin-utils /dest /
213+ COPY --from=builder /build/cinder-csi-plugin /bin/cinder-csi-plugin
214+ COPY --from=certs /etc/ssl/certs /etc/ssl/certs
215+
216+ LABEL name="cinder-csi-plugin" \
217+ license="Apache Version 2.0" \
218+ maintainers="Kubernetes Authors" \
219+ description="Cinder CSI Plugin" \
220+ distribution-scope="public" \
221+ summary="Cinder CSI Plugin" \
222+ help="none"
223+
224+ CMD ["/bin/cinder-csi-plugin" ]
0 commit comments