Skip to content

feat: support windows hostprocess image build #269

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions build.make
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ $(CMDS:%=push-multiarch-%): push-multiarch-%: check-pull-base-ref build-%
trap "docker buildx rm multiarchimage-buildertest" EXIT; \
dockerfile_linux=$$(if [ -e ./$(CMDS_DIR)/$*/Dockerfile ]; then echo ./$(CMDS_DIR)/$*/Dockerfile; else echo Dockerfile; fi); \
dockerfile_windows=$$(if [ -e ./$(CMDS_DIR)/$*/Dockerfile.Windows ]; then echo ./$(CMDS_DIR)/$*/Dockerfile.Windows; else echo Dockerfile.Windows; fi); \
dockerfile_windows_hp=$$(if [ -e ./$(CMDS_DIR)/$*/Dockerfile.WindowsHostProcess ]; then echo ./$(CMDS_DIR)/$*/Dockerfile.WindowsHostProcess; else echo Dockerfile.WindowsHostProcess; fi); \
if [ '$(BUILD_PLATFORMS)' ]; then build_platforms='$(BUILD_PLATFORMS)'; else build_platforms="linux amd64"; fi; \
if ! [ -f "$$dockerfile_windows" ]; then \
build_platforms="$$(echo "$$build_platforms" | sed -e 's/windows *[^ ]* *[^ ]* *.exe *[^ ]* *[^ ]*//g' -e 's/; *;/;/g' -e 's/;[ ]*$$//')"; \
Expand Down Expand Up @@ -191,6 +192,17 @@ $(CMDS:%=push-multiarch-%): push-multiarch-%: check-pull-base-ref build-%
fi; \
done; \
docker manifest push -p $(IMAGE_NAME):$$tag; \
if [ -f "$$dockerfile_windows_hp" ]; then \
docker buildx build --push \
--tag $(IMAGE_NAME):$$tag-amd64-windows-hp \
--platform=windows/amd64 \
--file $$dockerfile_windows_hp \
--build-arg binary=./bin/$*.exe \
--label revision=$(REV) \
.; \
docker manifest create --amend $(IMAGE_NAME):$$tag-windows-hp $(IMAGE_NAME):$$tag-amd64-windows-hp; \
docker manifest push -p $(IMAGE_NAME):$$tag-windows-hp; \
fi; \
}; \
if [ $(PULL_BASE_REF) = "master" ] || [ $(PULL_BASE_REF) = "main" ]; then \
: "creating or overwriting canary image"; \
Expand Down
Loading