diff options
author | Whymarrh Whitby <whymarrh.whitby@gmail.com> | 2018-08-17 21:43:47 +0800 |
---|---|---|
committer | Whymarrh Whitby <whymarrh.whitby@gmail.com> | 2018-08-18 05:11:12 +0800 |
commit | e493efb1239d0c730dbcf23faaf7204cf69bc1d9 (patch) | |
tree | 6043d5512d6df3f4338b725e3b90518308894e18 /.circleci/scripts | |
parent | c7f5436143a87369ab29c019a1c988c20a98d810 (diff) | |
download | tangerine-wallet-browser-e493efb1239d0c730dbcf23faaf7204cf69bc1d9.tar tangerine-wallet-browser-e493efb1239d0c730dbcf23faaf7204cf69bc1d9.tar.gz tangerine-wallet-browser-e493efb1239d0c730dbcf23faaf7204cf69bc1d9.tar.bz2 tangerine-wallet-browser-e493efb1239d0c730dbcf23faaf7204cf69bc1d9.tar.lz tangerine-wallet-browser-e493efb1239d0c730dbcf23faaf7204cf69bc1d9.tar.xz tangerine-wallet-browser-e493efb1239d0c730dbcf23faaf7204cf69bc1d9.tar.zst tangerine-wallet-browser-e493efb1239d0c730dbcf23faaf7204cf69bc1d9.zip |
ci: Don't cache Firefox install
Two important notes:
1. The time it takes to download is negligble compared to e2e test runs
2. Since we cannot use environment variables in CircleCI cache keys we
can't cache the download correctly and have it update when we switch
firefox versions—this isn't the end of the world because of point 1
Diffstat (limited to '.circleci/scripts')
-rwxr-xr-x | .circleci/scripts/firefox-download.sh | 13 | ||||
-rwxr-xr-x | .circleci/scripts/firefox-install | 19 | ||||
-rwxr-xr-x | .circleci/scripts/firefox-install.sh | 8 |
3 files changed, 19 insertions, 21 deletions
diff --git a/.circleci/scripts/firefox-download.sh b/.circleci/scripts/firefox-download.sh deleted file mode 100755 index 64f0c74e3..000000000 --- a/.circleci/scripts/firefox-download.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env bash -echo "Checking if firefox was already downloaded" -if [ -d "firefox" ] -then - echo "Firefox found. No need to download" -else - FIREFOX_VERSION="61.0.1" - FIREFOX_BINARY="firefox-$FIREFOX_VERSION.tar.bz2" - echo "Downloading firefox..." - wget "https://ftp.mozilla.org/pub/firefox/releases/$FIREFOX_VERSION/linux-x86_64/en-US/$FIREFOX_BINARY" \ - && tar xjf "$FIREFOX_BINARY" - echo "firefox download complete" -fi diff --git a/.circleci/scripts/firefox-install b/.circleci/scripts/firefox-install new file mode 100755 index 000000000..eb2028a27 --- /dev/null +++ b/.circleci/scripts/firefox-install @@ -0,0 +1,19 @@ +#!/usr/bin/env bash + +set -e +set -u +set -o pipefail + +FIREFOX_VERSION='61.0.1' +FIREFOX_BINARY="firefox-${FIREFOX_VERSION}.tar.bz2" +FIREFOX_BINARY_URL="https://ftp.mozilla.org/pub/firefox/releases/${FIREFOX_VERSION}/linux-x86_64/en-US/${FIREFOX_BINARY}" + +printf '%s\n' "Removing old Firefox installation" + +sudo rm -r /opt/firefox + +printf '%s\n' "Downloading & installing Firefox ${FIREFOX_VERSION}" + +wget --quiet --show-progress -O- "${FIREFOX_BINARY_URL}" | sudo tar xj -C /opt + +printf '%s\n' "Firefox ${FIREFOX_VERSION} installed" diff --git a/.circleci/scripts/firefox-install.sh b/.circleci/scripts/firefox-install.sh deleted file mode 100755 index 1c60f4de9..000000000 --- a/.circleci/scripts/firefox-install.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env bash - -echo "Installing firefox..." -sudo rm -r /opt/firefox -sudo mv firefox /opt/firefox61 -sudo mv /usr/bin/firefox /usr/bin/firefox-old -sudo ln -s /opt/firefox61/firefox /usr/bin/firefox -echo "Firefox installed." |