From f2d3b9f3c859ccfe8df3dec9a0110c469e552190 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Mon, 29 Jun 2020 00:51:50 +0200 Subject: [PATCH] Avoid apt update to speed up nodejs/yarn installation --- .circleci/config.yml | 39 ++++++++++++++++++++++++--------------- 1 file changed, 24 insertions(+), 15 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index c0e1729d..bcbc69e2 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -80,12 +80,15 @@ jobs: name: Uninstall nvm command: rm -rf "$NVM_DIR" ~/.npm ~/.bower - run: - name: Install nodejs and yarn + name: Install nodejs command: | - curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash - - curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - - echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list - sudo apt update && sudo apt install nodejs yarn + wget -O "$HOME/nodejs.deb" https://deb.nodesource.com/node_10.x/pool/main/n/nodejs/nodejs_10.21.0-1nodesource1_amd64.deb + sudo dpkg -i "$HOME/nodejs.deb" + - run: + name: Install yarn + command: | + wget -O "$HOME/yarn.deb" https://dl.yarnpkg.com/debian/pool/main/y/yarn/yarn_1.22.4_all.deb + sudo dpkg -i "$HOME/yarn.deb" - run: name: Version information command: echo "node $(node --version)"; echo "yarn $(yarn --version)" @@ -161,12 +164,15 @@ jobs: name: Uninstall nvm command: rm -rf "$NVM_DIR" ~/.npm ~/.bower - run: - name: Install nodejs and yarn + name: Install nodejs command: | - curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash - - curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - - echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list - sudo apt update && sudo apt install nodejs yarn + wget -O "$HOME/nodejs.deb" https://deb.nodesource.com/node_10.x/pool/main/n/nodejs/nodejs_10.21.0-1nodesource1_amd64.deb + sudo dpkg -i "$HOME/nodejs.deb" + - run: + name: Install yarn + command: | + wget -O "$HOME/yarn.deb" https://dl.yarnpkg.com/debian/pool/main/y/yarn/yarn_1.22.4_all.deb + sudo dpkg -i "$HOME/yarn.deb" - run: name: Version information command: echo "node $(node --version)"; echo "yarn $(yarn --version)" @@ -236,12 +242,15 @@ jobs: name: Uninstall nvm command: rm -rf "$NVM_DIR" ~/.npm ~/.bower - run: - name: Install nodejs and yarn + name: Install nodejs command: | - curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash - - curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - - echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list - sudo apt update && sudo apt install nodejs yarn + wget -O "$HOME/nodejs.deb" https://deb.nodesource.com/node_10.x/pool/main/n/nodejs/nodejs_10.21.0-1nodesource1_amd64.deb + sudo dpkg -i "$HOME/nodejs.deb" + - run: + name: Install yarn + command: | + wget -O "$HOME/yarn.deb" https://dl.yarnpkg.com/debian/pool/main/y/yarn/yarn_1.22.4_all.deb + sudo dpkg -i "$HOME/yarn.deb" - run: name: Version information command: echo "node $(node --version)"; echo "yarn $(yarn --version)"