Skip to content

Commit

Permalink
chore(ci): switch Windows containers (#2662)
Browse files Browse the repository at this point in the history
Cirrus CI got some optimizations for containers based of `microsoft/windowsservercore:latest`.

Now startup time for windows builds is around 1:30 seconds instead of around 4 minutes.

to: @aslushnikov
  • Loading branch information
fkorotkov authored and aslushnikov committed Jun 1, 2018
1 parent 9904da2 commit 85d5a33
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 18 deletions.
15 changes: 6 additions & 9 deletions .ci/node6/Dockerfile.windows
@@ -1,15 +1,12 @@
FROM microsoft/windowsservercore:1709

SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
FROM microsoft/windowsservercore:latest

ENV NODE_VERSION 6.12.3

RUN netsh interface ipv4 set subinterface 'vEthernet (Ethernet)' mtu=1460 store=persistent
RUN setx /m PATH "%PATH%;C:\nodejs"

RUN Invoke-WebRequest $('https://nodejs.org/dist/v{0}/node-v{0}-win-x64.zip' -f $env:NODE_VERSION) -OutFile 'node.zip' -UseBasicParsing ; \
RUN powershell -Command \
netsh interface ipv4 show interfaces ; \
netsh interface ipv4 set subinterface 18 mtu=1460 store=persistent ; \
Invoke-WebRequest $('https://nodejs.org/dist/v{0}/node-v{0}-win-x64.zip' -f $env:NODE_VERSION) -OutFile 'node.zip' -UseBasicParsing ; \
Expand-Archive node.zip -DestinationPath C:\ ; \
Rename-Item -Path $('C:\node-v{0}-win-x64' -f $env:NODE_VERSION) -NewName 'C:\nodejs'

SHELL ["cmd", "/S", "/C"]

RUN setx /m PATH "%PATH%;C:\nodejs"
14 changes: 5 additions & 9 deletions .ci/node7/Dockerfile.windows
@@ -1,15 +1,11 @@
FROM microsoft/windowsservercore:1709

SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
FROM microsoft/windowsservercore:latest

ENV NODE_VERSION 7.10.1

RUN netsh interface ipv4 set subinterface 'vEthernet (Ethernet)' mtu=1460 store=persistent
RUN setx /m PATH "%PATH%;C:\nodejs"

RUN Invoke-WebRequest $('https://nodejs.org/dist/v{0}/node-v{0}-win-x64.zip' -f $env:NODE_VERSION) -OutFile 'node.zip' -UseBasicParsing ; \
RUN powershell -Command \
netsh interface ipv4 set subinterface 18 mtu=1460 store=persistent ; \
Invoke-WebRequest $('https://nodejs.org/dist/v{0}/node-v{0}-win-x64.zip' -f $env:NODE_VERSION) -OutFile 'node.zip' -UseBasicParsing ; \
Expand-Archive node.zip -DestinationPath C:\ ; \
Rename-Item -Path $('C:\node-v{0}-win-x64' -f $env:NODE_VERSION) -NewName 'C:\nodejs'

SHELL ["cmd", "/S", "/C"]

RUN setx /m PATH "%PATH%;C:\nodejs"
2 changes: 2 additions & 0 deletions .cirrus.yml
Expand Up @@ -6,6 +6,7 @@ task:
- name: node6 (windows)
windows_container:
dockerfile: .ci/node6/Dockerfile.windows
os_version: 2016
- name: node6 (linux)
container:
dockerfile: .ci/node6/Dockerfile.linux
Expand All @@ -18,6 +19,7 @@ task:
- name: node7 (windows)
windows_container:
dockerfile: .ci/node7/Dockerfile.windows
os_version: 2016
- name: node7 (linux)
container:
dockerfile: .ci/node7/Dockerfile.linux
Expand Down

0 comments on commit 85d5a33

Please sign in to comment.