Unverified Commit 1658e70f authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #67106 from spiffxp/make-test-images-on-macos

Automatic merge from submit-queue (batch tested with PRs 66984, 67236, 67216, 62721, 67106). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. macOS and docker for mac don't play nicely with mktemp **What this PR does / why we need it**: On macOS mktemp -d drops something in /var/folders, which isn't shared by default with Docker for Mac. Thus I can't run docker with that volume mounted to build binaries for test images. So instead, tell mktemp to use kubernetes/_tmp as its base, which is what I see some of the hack/verify-* scripts use I had to use this patch to build images for: - https://github.com/kubernetes/kubernetes/pull/67030 - https://github.com/kubernetes/kubernetes/pull/67034 - https://github.com/kubernetes/kubernetes/pull/67035 I am _super_ open to a better way of doing this if I missed something **Special notes for your reviewer**: Kindly make sure this doesn't break building images on linux /release-note-none /sig release /cc @dims @ixdy
parents 9fdffd1e 2de8daf0
......@@ -56,7 +56,10 @@ build() {
# Create a temporary directory for every architecture and copy the image content
# and build the image from temporary directory
temp_dir=$(mktemp -d)
mkdir -p ${KUBE_ROOT}/_tmp
temp_dir=$(mktemp -d ${KUBE_ROOT}/_tmp/test-images-build.XXXXXX)
kube::util::trap_add "rm -rf ${temp_dir}" EXIT
cp -r ${IMAGE}/* ${temp_dir}
if [[ -f ${IMAGE}/Makefile ]]; then
# make bin will take care of all the prerequisites needed
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment