-
Notifications
You must be signed in to change notification settings - Fork 159
Add build rule for Windows container #489
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
Conversation
0904417
to
b5a9cc8
Compare
Makefile
Outdated
$(error "Must set environment variable GCE_PD_CSI_STAGING_VERSION to staging version") | ||
endif | ||
GOOS=windows go build -ldflags "-X main.vendorVersion=${STAGINGVERSION}" -o bin/${DRIVERWINDOWSBINARY} ./cmd/ | ||
GOOS=windows go build -ldflags -X=main.vendorVersion=$(REV) -o bin/${DRIVERWINDOWSBINARY} ./cmd/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How come we use REV instead of STAGINGVERSION like the rest of the rules?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we changed it to use a default value getting from git
Makefile
Outdated
@@ -44,6 +42,16 @@ ifndef GCE_PD_CSI_STAGING_VERSION | |||
endif | |||
docker build --build-arg TAG=$(STAGINGVERSION) -t $(STAGINGIMAGE):$(STAGINGVERSION) . | |||
|
|||
build-push-windows-container: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this invoke gce-pd-driver-windows first?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, it just does the docker build
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe remove the "build" from the name?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here build means docker build.
I see it is used in build the linux container?
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jingxu97, msau42 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Dockerfile.Windows
Outdated
@@ -0,0 +1,9 @@ | |||
ARG BASE_IMAGE | |||
ARG IMAGE_TAG |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A better name may be BASE_IMAGE_TAG
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ack and fixed
Dockerfile.Windows
Outdated
ARG BASE_IMAGE | ||
ARG IMAGE_TAG | ||
FROM mcr.microsoft.com/windows/${BASE_IMAGE}:${IMAGE_TAG} | ||
ENV CSI_PROXY_PIPE "\\\\.\\pipe\\csipipe" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we define the ENV here instead of in the Daemonset spec? Doesn't the pipe path change depending on which API endpint we're talking to?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
right, it is not needed here. removed it
Add build rule for windows container. Here we try to enable buildx for buiding windows container image on a linux VM
/lgtm |
Add build rule for windows container. Here we try to enable buildx for
buiding windows container image on a linux VM
What type of PR is this?
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?: