mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-04 04:08:16 +00:00 
			
		
		
		
	Switch to docker buildx for conformance image
				
					
				
			The conformance test image previously used the `FROM --platform …` syntax which is something we (SIG Release) consider as deprecated. Therefore we now switch to `docker buildx`, which can specify the `--platform` directly. Signed-off-by: Sascha Grunert <mail@saschagrunert.de>
This commit is contained in:
		@@ -12,7 +12,7 @@
 | 
				
			|||||||
# See the License for the specific language governing permissions and
 | 
					# See the License for the specific language governing permissions and
 | 
				
			||||||
# limitations under the License.
 | 
					# limitations under the License.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
FROM --platform=linux/ARCH BASEIMAGE
 | 
					FROM BASEIMAGE
 | 
				
			||||||
 | 
					
 | 
				
			||||||
COPY ginkgo /usr/local/bin/
 | 
					COPY ginkgo /usr/local/bin/
 | 
				
			||||||
COPY e2e.test /usr/local/bin/
 | 
					COPY e2e.test /usr/local/bin/
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -54,9 +54,14 @@ endif
 | 
				
			|||||||
	chmod a+rx ${TEMP_DIR}/e2e.test
 | 
						chmod a+rx ${TEMP_DIR}/e2e.test
 | 
				
			||||||
	chmod a+rx ${TEMP_DIR}/gorunner
 | 
						chmod a+rx ${TEMP_DIR}/gorunner
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	cd ${TEMP_DIR} && sed -i.back "s|ARCH|${ARCH}|g; s|BASEIMAGE|${BASEIMAGE}|g" Dockerfile
 | 
						cd ${TEMP_DIR} && sed -i.back "s|BASEIMAGE|${BASEIMAGE}|g" Dockerfile
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	docker build --pull -t ${REGISTRY}/conformance-${ARCH}:${VERSION} ${TEMP_DIR}
 | 
						docker buildx build \
 | 
				
			||||||
 | 
							--platform linux/${ARCH} \
 | 
				
			||||||
 | 
							--load \
 | 
				
			||||||
 | 
							--pull \
 | 
				
			||||||
 | 
							-t ${REGISTRY}/conformance-${ARCH}:${VERSION} \
 | 
				
			||||||
 | 
							${TEMP_DIR}
 | 
				
			||||||
	rm -rf "${TEMP_DIR}"
 | 
						rm -rf "${TEMP_DIR}"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
push: build
 | 
					push: build
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user