ci: update windows image to avoid using choco

This commit is contained in:
Alan Agius 2019-12-07 13:27:56 +01:00 committed by Keen Yee Liau
parent f1985e1315
commit 039c1bde31
2 changed files with 12 additions and 7 deletions

View File

@ -61,7 +61,12 @@ executors:
resource_class: windows.medium resource_class: windows.medium
shell: powershell.exe -ExecutionPolicy Bypass shell: powershell.exe -ExecutionPolicy Bypass
machine: machine:
image: windows-server-2019 # Windows preview image that includes the following:
# - Visual Studio 2019 build tools
# - Node 12
# - yarn 1.17
# - Python 3 3.7.4
image: windows-server-2019-vs2019:201908-02
# Command Definitions # Command Definitions
# https://circleci.com/docs/2.0/reusing-config/#authoring-reusable-commands # https://circleci.com/docs/2.0/reusing-config/#authoring-reusable-commands
@ -76,7 +81,7 @@ commands:
- run: - run:
# Need to install node and yarn before to ensure correct versions. # Need to install node and yarn before to ensure correct versions.
name: Setup windows node environment name: Setup windows node environment
command: ./.circleci/windows-env.ps1 command: ./.circleci/windows-env.ps1
- run: node --version - run: node --version
- run: yarn --version - run: yarn --version
@ -298,7 +303,7 @@ jobs:
executor: windows-executor executor: windows-executor
steps: steps:
- custom_attach_workspace - custom_attach_workspace
- setup_windows - setup_windows
- restore_cache: - restore_cache:
keys: keys:
- *cache_key_win - *cache_key_win
@ -315,7 +320,7 @@ jobs:
- persist_to_workspace: - persist_to_workspace:
root: *workspace_location root: *workspace_location
paths: paths:
- ./* - ./*
test-win: test-win:
executor: windows-executor executor: windows-executor
@ -416,7 +421,7 @@ workflows:
- build - build
- flake-jail: - flake-jail:
requires: requires:
- build - build
# Windows jobs # Windows jobs
# These jobs only run after their non-windows counterparts finish successfully. # These jobs only run after their non-windows counterparts finish successfully.

View File

@ -1,6 +1,6 @@
# Install nodejs and yarn via Chocolatey. # Install nodejs and yarn via Chocolatey.
choco install nodejs --version 12.1.0 --no-progress # choco install nodejs --version 12.1.0 --no-progress
choco install yarn --version 1.17.3 --no-progress # choco install yarn --version 1.17.3 --no-progress
# Add PATH modifications to the Powershell profile. This is the win equivalent of .bash_profile. # Add PATH modifications to the Powershell profile. This is the win equivalent of .bash_profile.
# https://docs.microsoft.com/en-us/previous-versions//bb613488(v=vs.85) # https://docs.microsoft.com/en-us/previous-versions//bb613488(v=vs.85)