Skip to content

Commit

Permalink
ci: remove any other versions of Node installed (#13706) (#13712)
Browse files Browse the repository at this point in the history
Remove other versions of Node installed in nvm to avoid issues where the
CI runner uses the wrong one.
  • Loading branch information
hc-github-team-nomad-core authored Jul 12, 2022
1 parent 5b69824 commit def04aa
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions scripts/vagrant-linux-unpriv-ui.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/usr/bin/env bash

export NODE_VERSION=12.19.0

# Install NVM for simple node.js version management
curl -sSL --fail -o- https://raw.githubusercontent.com/creationix/nvm/v0.36.0/install.sh | bash

Expand All @@ -10,8 +12,12 @@ export NVM_DIR="${HOME}/.nvm"

# Install Node, Ember CLI, and Phantom for UI development
# Use exact full version version (e.g. not 12) for reproducibility purposes
nvm install 12.19.0
nvm alias default 12.19.0
nvm install "${NODE_VERSION}"
nvm alias default "${NODE_VERSION}"

# Remove any other version of node installed
find ~/.nvm/versions/node -not -name "v${NODE_VERSION}" -depth 1 -exec rm -rf {} \;

npm install -g ember-cli

# Install Yarn for front-end dependency management
Expand Down

0 comments on commit def04aa

Please sign in to comment.