-
Notifications
You must be signed in to change notification settings - Fork 560
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(ci): move windows nodejs to choco config #2623
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -71,6 +71,11 @@ commands: | |
- << parameters.npm_cache_directory >> | ||
install_sdks_windows: | ||
steps: | ||
- run: | ||
name: Removing pre-installed NodeJS | ||
command: | | ||
$current_node_version = node --version | ||
nvm uninstall $current_node_version | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This looks odd - can't we just override the default? Or use some different image? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Windows uses a VM image, so we can't. I tried keeping the pre-installed one but it takes precedence (nvm probably dumps itself at the start). To change that, we'd require even more brittle setup logic to change PATH ordering. It's possible in the future once we've got the split builds and testing done, we can remove our custom NodeJS install completely and use the default one that comes with the Windows image. To clarify, this logic existed before in a separate command, I moved it into a single command. |
||
- restore_cache: | ||
name: Restoring Chocolatey cache | ||
keys: | ||
|
@@ -119,19 +124,6 @@ commands: | |
key: sdkman-archive-cache-v3-{{ arch }}-{{ checksum ".circleci/install-sdks-linux.sh" }} | ||
paths: | ||
- ~/.sdkman/archives | ||
install_node_windows: | ||
parameters: | ||
node_version: | ||
type: string | ||
steps: | ||
- run: | ||
name: Removing pre-installed NodeJS | ||
command: | | ||
$current_node_version = node --version | ||
nvm uninstall $current_node_version | ||
- run: | ||
name: Installing NodeJS | ||
command: choco install nodejs --version=<< parameters.node_version >> --no-progress | ||
install_shellspec_dependencies: | ||
steps: | ||
- run: | ||
|
@@ -248,8 +240,6 @@ jobs: | |
- checkout | ||
- attach_workspace: | ||
at: . | ||
- install_node_windows: | ||
node_version: << parameters.node_version >> | ||
- install_sdks_windows | ||
- setup_npm: | ||
node_version: << parameters.node_version >> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, I guess this can't be pulled from some global CI config?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope. I'm thinking in a future PR, if we really wanted consistency, we can create a script to generate this file on-demand. That script can be called inside our CI config and pass through package and version parameters. Doesn't seem worth the complexity right now.