Skip to content

Commit

Permalink
Compile antctl together with Agent bits on Windows (#3867)
Browse files Browse the repository at this point in the history
Signed-off-by: wenyingd <[email protected]>
  • Loading branch information
wenyingd authored Jun 9, 2022
1 parent ea99ee5 commit 8e8aafb
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ antctl-instr-binary:
.PHONY: windows-bin
windows-bin:
@mkdir -p $(BINDIR)
GOOS=windows CGO_ENABLED=0 $(GO) build -o $(BINDIR) $(GOFLAGS) -ldflags '$(LDFLAGS)' antrea.io/antrea/cmd/antrea-cni antrea.io/antrea/cmd/antrea-agent
GOOS=windows CGO_ENABLED=0 $(GO) build -o $(BINDIR) $(GOFLAGS) -ldflags '$(LDFLAGS)' antrea.io/antrea/cmd/antrea-cni antrea.io/antrea/cmd/antrea-agent antrea.io/antrea/cmd/antctl

.PHONY: flow-aggregator
flow-aggregator:
Expand Down
5 changes: 1 addition & 4 deletions build/images/Dockerfile.build.windows
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@ COPY . /antrea

RUN sh -c 'make windows-bin'

RUN sh -c 'make antctl-windows'


FROM mcr.microsoft.com/powershell:lts-nanoserver-1809
SHELL ["pwsh", "-NoLogo", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]

Expand All @@ -51,7 +48,7 @@ RUN mkdir -Force C:\k\antrea\bin
COPY --from=cni-binaries-windows /opt/cni/bin /k/antrea/cni
COPY --from=antrea-build-windows /antrea/build/images/scripts/Install-WindowsCNI.ps1 /k/antrea/
COPY --from=antrea-build-windows /antrea/bin/antrea-agent.exe /k/antrea/bin/
COPY --from=antrea-build-windows /antrea/bin/antctl-windows.exe /k/antrea/bin/antctl.exe
COPY --from=antrea-build-windows /antrea/bin/antctl.exe /k/antrea/bin/antctl.exe
COPY --from=antrea-build-windows /antrea/bin/antrea-cni.exe /k/antrea/cni/antrea.exe

RUN mkdir C:\k\antrea\utils; \
Expand Down
3 changes: 1 addition & 2 deletions ci/jenkins/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,6 @@ function deliver_antrea_windows {
DOCKER_REGISTRY="${DOCKER_REGISTRY}" ./hack/build-antrea-linux-all.sh --pull
if [[ "$TESTCASE" == "windows-networkpolicy-process" ]]; then
make windows-bin
make antctl-windows
fi

echo "====== Delivering Antrea to all the Nodes ======"
Expand Down Expand Up @@ -376,7 +375,7 @@ function deliver_antrea_windows {
ssh -o StrictHostKeyChecking=no -n Administrator@${IP} "rm -rf /cygdrive/c/k/antrea && mkdir -p /cygdrive/c/k/antrea/bin && mkdir -p /cygdrive/c/k/antrea/etc && rm -rf /cygdrive/c/opt/cni/bin && mkdir -p /cygdrive/c/opt/cni/bin && mkdir -p /cygdrive/c/etc/cni/net.d"
scp -o StrictHostKeyChecking=no -T $KUBECONFIG Administrator@${IP}:/cygdrive/c/k/config
scp -o StrictHostKeyChecking=no -T bin/antrea-agent.exe Administrator@${IP}:/cygdrive/c/k/antrea/bin/
scp -o StrictHostKeyChecking=no -T bin/antctl-windows.exe Administrator@${IP}:/cygdrive/c/k/antrea/bin/antctl.exe
scp -o StrictHostKeyChecking=no -T bin/antctl.exe Administrator@${IP}:/cygdrive/c/k/antrea/bin/antctl.exe
scp -o StrictHostKeyChecking=no -T bin/antrea-cni.exe Administrator@${IP}:/cygdrive/c/opt/cni/bin/antrea.exe
scp -o StrictHostKeyChecking=no -T hack/windows/Start.ps1 Administrator@${IP}:/cygdrive/c/k/antrea/
scp -o StrictHostKeyChecking=no -T hack/windows/Stop.ps1 Administrator@${IP}:/cygdrive/c/k/antrea/
Expand Down

0 comments on commit 8e8aafb

Please sign in to comment.