-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Windows: Add CI for per-commit/release image build (#13374)
Commit Message: Windows: Add CI for per-commit/release image build - Make ./ci/docker_ci.sh cross platform - Add CI job to build image from result of build and test CI job - Add Docker image built in same structure as Linux version, mirrored entrypoint/command - google proxy example config used like in Linux build - Docker image base can be overridden with different Windows container image if needed Additional Description: N/A Risk Level: Low Testing: N/A Docs Changes: N/A Release Notes: N/A Signed-off-by: Sunjay Bhatia <[email protected]>
- Loading branch information
1 parent
51af1b0
commit 989c898
Showing
4 changed files
with
111 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
ARG BUILD_OS=mcr.microsoft.com/windows/servercore | ||
ARG BUILD_TAG=ltsc2019 | ||
|
||
FROM $BUILD_OS:$BUILD_TAG | ||
|
||
RUN mkdir "C:\\Program\ Files\\envoy" | ||
RUN setx path "%path%;c:\Program Files\envoy" | ||
ADD ["windows/amd64/envoy.exe", "C:/Program Files/envoy/"] | ||
|
||
RUN mkdir "C:\\ProgramData\\envoy" | ||
ADD ["configs/google_com_proxy.v2.yaml", "C:/ProgramData/envoy/envoy.yaml"] | ||
# Replace temp path with Windows temp path | ||
RUN powershell -Command "(cat C:\ProgramData\envoy\envoy.yaml -raw) -replace '/tmp/','C:\Windows\Temp\' | Set-Content -Encoding Ascii C:\ProgramData\envoy\envoy.yaml" | ||
|
||
EXPOSE 10000 | ||
|
||
COPY ci/docker-entrypoint.bat C:/ | ||
ENTRYPOINT ["C:/docker-entrypoint.bat"] | ||
CMD ["envoy.exe", "-c", "C:\\ProgramData\\envoy\\envoy.yaml"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
@echo off | ||
setlocal | ||
|
||
set CMD=%*% | ||
|
||
REM if the first argument look like a parameter (i.e. start with '-'), run Envoy | ||
set first_arg=%1% | ||
if "%first_arg:~0,1%" == "-" ( | ||
set CMD=envoy.exe %CMD% | ||
) | ||
|
||
if /i "%1" == "envoy" set is_envoy=1 | ||
if /i "%1" == "envoy.exe" set is_envoy=1 | ||
if defined is_envoy ( | ||
REM set the log level if the $loglevel variable is set | ||
if defined loglevel ( | ||
set CMD=%CMD% --log-level %loglevel% | ||
) | ||
) | ||
|
||
%CMD% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters