mirror of
https://github.com/actions/runner-images.git
synced 2025-12-15 06:08:07 +00:00
[ubuntu] Rename build scripts (#8866)
* [ubuntu] Rename build scripts * [ubuntu] Change reboot to inline shell * [ubuntu] Move disk space validation to pester tests * [ubuntu] Rename helper and tests files * [ubuntu] Changes to cleanup, post-deployment and r scripts
This commit is contained in:
committed by
GitHub
parent
410fd620be
commit
1bd9214f41
29
images/ubuntu/scripts/build/install-nodejs.sh
Normal file
29
images/ubuntu/scripts/build/install-nodejs.sh
Normal file
@@ -0,0 +1,29 @@
|
||||
#!/bin/bash -e
|
||||
################################################################################
|
||||
## File: install-nodejs.sh
|
||||
## Desc: Install Node.js LTS and related tooling (Gulp, Grunt)
|
||||
################################################################################
|
||||
|
||||
# Source the helpers for use with the script
|
||||
source $HELPER_SCRIPTS/install.sh
|
||||
|
||||
# Install default Node.js
|
||||
defaultVersion=$(get_toolset_value '.node.default')
|
||||
curl -fsSL https://raw.githubusercontent.com/tj/n/master/bin/n -o ~/n
|
||||
bash ~/n $defaultVersion
|
||||
|
||||
# Install node modules
|
||||
node_modules=$(get_toolset_value '.node_modules[].name')
|
||||
npm install -g $node_modules
|
||||
|
||||
echo "Creating the symlink for [now] command to vercel CLI"
|
||||
ln -s /usr/local/bin/vercel /usr/local/bin/now
|
||||
|
||||
# fix global modules installation as regular user
|
||||
# related issue https://github.com/actions/runner-images/issues/3727
|
||||
sudo chmod -R 777 /usr/local/lib/node_modules
|
||||
sudo chmod -R 777 /usr/local/bin
|
||||
|
||||
rm -rf ~/n
|
||||
|
||||
invoke_tests "Node" "Node.js"
|
||||
Reference in New Issue
Block a user