From 85d5a3348cc6875fd390d45d4d2424d0b7228e51 Mon Sep 17 00:00:00 2001 From: Fedor Korotkov Date: Fri, 1 Jun 2018 18:15:16 -0400 Subject: [PATCH] chore(ci): switch Windows containers (#2662) 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 --- .ci/node6/Dockerfile.windows | 15 ++++++--------- .ci/node7/Dockerfile.windows | 14 +++++--------- .cirrus.yml | 2 ++ 3 files changed, 13 insertions(+), 18 deletions(-) diff --git a/.ci/node6/Dockerfile.windows b/.ci/node6/Dockerfile.windows index e883d620..8fdc2a64 100644 --- a/.ci/node6/Dockerfile.windows +++ b/.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" diff --git a/.ci/node7/Dockerfile.windows b/.ci/node7/Dockerfile.windows index ff1e86d3..467a5f9e 100644 --- a/.ci/node7/Dockerfile.windows +++ b/.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" diff --git a/.cirrus.yml b/.cirrus.yml index e99fc443..b6e88478 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -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 @@ -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