Skip to content
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

Switch to NodeSource for NodeJS packages #779

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions config/apt-source-append.list
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
deb http://nginx.org/packages/mainline/ubuntu/ trusty nginx
deb-src http://nginx.org/packages/mainline/ubuntu/ trusty nginx

# Provides Node.js
deb http://ppa.launchpad.net/chris-lea/node.js/ubuntu trusty main
deb-src http://ppa.launchpad.net/chris-lea/node.js/ubuntu trusty main

# Provides PHP7
deb http://ppa.launchpad.net/ondrej/php/ubuntu trusty main
deb-src http://ppa.launchpad.net/ondrej/php/ubuntu trusty main

# Provides Node.js
deb https://deb.nodesource.com/node_4.x trusty main
deb-src https://deb.nodesource.com/node_4.x trusty main
10 changes: 6 additions & 4 deletions provision/provision.sh
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,12 @@ package_install() {
ln -sf /srv/config/apt-source-append.list /etc/apt/sources.list.d/vvv-sources.list
echo "Linked custom apt sources"

if [[ ! $( apt-key list | grep 'NodeSource') ]]; then
# Retrieve the NodeJS signing key from nodesource.com
echo "Applying NodeSource NodeJS signing key..."
wget -qO- https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add -
fi

if [[ ${#apt_package_install_list[@]} = 0 ]]; then
echo -e "No apt packages to install.\n"
else
Expand All @@ -219,10 +225,6 @@ package_install() {
echo "Applying Nginx signing key..."
wget --quiet "http://nginx.org/keys/nginx_signing.key" -O- | apt-key add -

# Apply the nodejs signing key
apt-key adv --quiet --keyserver "hkp://keyserver.ubuntu.com:80" --recv-key C7917B12 2>&1 | grep "gpg:"
apt-key export C7917B12 | apt-key add -

# Apply the PHP signing key
apt-key adv --quiet --keyserver "hkp://keyserver.ubuntu.com:80" --recv-key E5267A6C 2>&1 | grep "gpg:"
apt-key export E5267A6C | apt-key add -
Expand Down