Skip to content

Commit

Permalink
Ensure consistent windows image names (#1104)
Browse files Browse the repository at this point in the history
We were building windows images with the name `windows` but attempting
to push images with only `win` in the name.

Also, we can't build windows and linux images in the same docker context
so don't attempt to push linux images if pushing windows images.

Signed-off-by: Bridget McErlean <[email protected]>
  • Loading branch information
zubron authored Apr 1, 2020
1 parent a4819d2 commit 49fa937
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ windows_containers: build/windows/amd64/sonobuoy.exe
sed -e 's|BASEIMAGE|$(WIN_IMAGE)|g' \
-e 's|BINARY|build/windows/amd64/sonobuoy.exe|g' DockerfileWindows > DockerfileWindows-$$arch; \
$(MAKE) build_container DOCKERFILE=DockerfileWindows-$$arch; \
$(MAKE) build_container DOCKERFILE="DockerfileWindows-$$arch" TARGET="sonobuoy-windows-$$arch"; \
$(MAKE) build_container DOCKERFILE="DockerfileWindows-$$arch" TARGET="sonobuoy-win-$$arch"; \
else \
echo "Windows ARCH unknown"; \
fi \
Expand Down Expand Up @@ -208,15 +208,15 @@ push: pre
# Assumes you have the images built or loaded already. Not
# added as dependency due to having both Linux/Windows
# prereqs which can't be done on the same machine.
for arch in $(LINUX_ARCH); do \
$(MAKE) push_images TARGET="sonobuoy-$$arch"; \
done
ifeq ($(PUSH_WINDOWS),true)
for arch in $(WIN_ARCH); do \
$(MAKE) push_images TARGET="sonobuoy-win-$$arch"; \
done
else
echo '$$PUSH_WINDOWS not set, not pushing Windows images'
for arch in $(LINUX_ARCH); do \
$(MAKE) push_images TARGET="sonobuoy-$$arch"; \
done
endif

$(MAKE) push_manifest VERSION=$(IMAGE_BRANCH) TARGET="sonobuoy"
Expand Down

0 comments on commit 49fa937

Please sign in to comment.