From 9819c497067743b0fc188cc2819f1fd6e2b77f4c Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Wed, 3 Apr 2019 17:05:04 +0200 Subject: [PATCH 01/19] enable e2e tests again, with python3 only --- .buildkite/pipeline.yaml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.buildkite/pipeline.yaml b/.buildkite/pipeline.yaml index 6a347ec002..c2e3c5ccc5 100644 --- a/.buildkite/pipeline.yaml +++ b/.buildkite/pipeline.yaml @@ -7,17 +7,17 @@ steps: - docker#v3.0.1: image: "node:10" -# - label: ":chains: End-to-End Tests" -# command: -# # TODO: Remove hacky chmod for BuildKite -# - "chmod +x ./scripts/ci/*.sh" -# - "chmod +x ./scripts/*" -# - "sudo apt-get install build-essential python2.7-dev libffi-dev python-pip python-setuptools sqlite3 libssl-dev python-virtualenv libjpeg-dev libxslt1-dev" -# - "./scripts/ci/install-deps.sh" -# - "./scripts/ci/end-to-end-tests.sh" -# plugins: -# - docker#v3.0.1: -# image: "node:10" + - label: ":chains: End-to-End Tests" + command: + # TODO: Remove hacky chmod for BuildKite + - "chmod +x ./scripts/ci/*.sh" + - "chmod +x ./scripts/*" + - "sudo apt-get install build-essential python3-dev libffi-dev python-pip python-setuptools sqlite3 libssl-dev python-virtualenv libjpeg-dev libxslt1-dev" + - "./scripts/ci/install-deps.sh" + - "./scripts/ci/end-to-end-tests.sh" + plugins: + - docker#v3.0.1: + image: "node:10" - label: ":karma: Tests" agents: From 711974a6df9af1f5eebdab1081ad37a72e2ef723 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Wed, 3 Apr 2019 17:05:19 +0200 Subject: [PATCH 02/19] remove obsolete --travis flag --- scripts/ci/end-to-end-tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/ci/end-to-end-tests.sh b/scripts/ci/end-to-end-tests.sh index d0b1a30ce2..cd24385ded 100644 --- a/scripts/ci/end-to-end-tests.sh +++ b/scripts/ci/end-to-end-tests.sh @@ -17,5 +17,5 @@ ln -s $REACT_SDK_DIR/$RIOT_WEB_DIR riot/riot-web # PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true ./install.sh # CHROME_PATH=$(which google-chrome-stable) ./run.sh ./install.sh -./run.sh --travis +./run.sh popd From 1715a6f4fa16fdd47d5f2be6ceead5c57a7daf60 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Thu, 4 Apr 2019 10:35:47 +0200 Subject: [PATCH 03/19] fix indent level --- .buildkite/pipeline.yaml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.buildkite/pipeline.yaml b/.buildkite/pipeline.yaml index c2e3c5ccc5..2afe8e8aae 100644 --- a/.buildkite/pipeline.yaml +++ b/.buildkite/pipeline.yaml @@ -7,17 +7,17 @@ steps: - docker#v3.0.1: image: "node:10" - - label: ":chains: End-to-End Tests" - command: - # TODO: Remove hacky chmod for BuildKite - - "chmod +x ./scripts/ci/*.sh" - - "chmod +x ./scripts/*" - - "sudo apt-get install build-essential python3-dev libffi-dev python-pip python-setuptools sqlite3 libssl-dev python-virtualenv libjpeg-dev libxslt1-dev" - - "./scripts/ci/install-deps.sh" - - "./scripts/ci/end-to-end-tests.sh" - plugins: - - docker#v3.0.1: - image: "node:10" + - label: ":chains: End-to-End Tests" + command: + # TODO: Remove hacky chmod for BuildKite + - "chmod +x ./scripts/ci/*.sh" + - "chmod +x ./scripts/*" + - "sudo apt-get install build-essential python3-dev libffi-dev python-pip python-setuptools sqlite3 libssl-dev python-virtualenv libjpeg-dev libxslt1-dev" + - "./scripts/ci/install-deps.sh" + - "./scripts/ci/end-to-end-tests.sh" + plugins: + - docker#v3.0.1: + image: "node:10" - label: ":karma: Tests" agents: From 35ecf9fa251e853c93017a0a2df5fc1acf71d5d3 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Thu, 4 Apr 2019 10:40:54 +0200 Subject: [PATCH 04/19] no sudo needed --- .buildkite/pipeline.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.buildkite/pipeline.yaml b/.buildkite/pipeline.yaml index 2afe8e8aae..cbf6d9db6a 100644 --- a/.buildkite/pipeline.yaml +++ b/.buildkite/pipeline.yaml @@ -12,7 +12,7 @@ steps: # TODO: Remove hacky chmod for BuildKite - "chmod +x ./scripts/ci/*.sh" - "chmod +x ./scripts/*" - - "sudo apt-get install build-essential python3-dev libffi-dev python-pip python-setuptools sqlite3 libssl-dev python-virtualenv libjpeg-dev libxslt1-dev" + - "apt-get -y install build-essential python3-dev libffi-dev python-pip python-setuptools sqlite3 libssl-dev python-virtualenv libjpeg-dev libxslt1-dev" - "./scripts/ci/install-deps.sh" - "./scripts/ci/end-to-end-tests.sh" plugins: From 5581274e85f05c74d31119b76a67187136836826 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Fri, 5 Apr 2019 12:31:57 +0200 Subject: [PATCH 05/19] try without packages as we're using a fat docker image --- .buildkite/pipeline.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.buildkite/pipeline.yaml b/.buildkite/pipeline.yaml index cbf6d9db6a..9c21bafee1 100644 --- a/.buildkite/pipeline.yaml +++ b/.buildkite/pipeline.yaml @@ -12,7 +12,6 @@ steps: # TODO: Remove hacky chmod for BuildKite - "chmod +x ./scripts/ci/*.sh" - "chmod +x ./scripts/*" - - "apt-get -y install build-essential python3-dev libffi-dev python-pip python-setuptools sqlite3 libssl-dev python-virtualenv libjpeg-dev libxslt1-dev" - "./scripts/ci/install-deps.sh" - "./scripts/ci/end-to-end-tests.sh" plugins: From 9b3296f9c9f062ff99595dd5737a585257d9f936 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Fri, 5 Apr 2019 12:43:28 +0200 Subject: [PATCH 06/19] update package list before installing packages --- .buildkite/pipeline.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.buildkite/pipeline.yaml b/.buildkite/pipeline.yaml index 9c21bafee1..3981b6ed54 100644 --- a/.buildkite/pipeline.yaml +++ b/.buildkite/pipeline.yaml @@ -12,6 +12,8 @@ steps: # TODO: Remove hacky chmod for BuildKite - "chmod +x ./scripts/ci/*.sh" - "chmod +x ./scripts/*" + - "apt-get update" + - "apt-get -y install build-essential python3-dev libffi-dev python-pip python-setuptools sqlite3 libssl-dev python-virtualenv libjpeg-dev libxslt1-dev" - "./scripts/ci/install-deps.sh" - "./scripts/ci/end-to-end-tests.sh" plugins: From 10797cf6a4c4a79a490b7579c3d0417c8fb1c987 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Fri, 5 Apr 2019 13:23:48 +0200 Subject: [PATCH 07/19] uuid is not include in docker image --- .buildkite/pipeline.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.buildkite/pipeline.yaml b/.buildkite/pipeline.yaml index 3981b6ed54..d3eb43d94c 100644 --- a/.buildkite/pipeline.yaml +++ b/.buildkite/pipeline.yaml @@ -13,7 +13,7 @@ steps: - "chmod +x ./scripts/ci/*.sh" - "chmod +x ./scripts/*" - "apt-get update" - - "apt-get -y install build-essential python3-dev libffi-dev python-pip python-setuptools sqlite3 libssl-dev python-virtualenv libjpeg-dev libxslt1-dev" + - "apt-get -y install build-essential python3-dev libffi-dev python-pip python-setuptools sqlite3 libssl-dev python-virtualenv libjpeg-dev libxslt1-dev uuid" - "./scripts/ci/install-deps.sh" - "./scripts/ci/end-to-end-tests.sh" plugins: From 296ee30b9d66200b83d75badba4c11b463dad41f Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Fri, 5 Apr 2019 15:05:54 +0200 Subject: [PATCH 08/19] we need uuidgen, not uuid command. former is part of utils-linux --- .buildkite/pipeline.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.buildkite/pipeline.yaml b/.buildkite/pipeline.yaml index d3eb43d94c..4960598640 100644 --- a/.buildkite/pipeline.yaml +++ b/.buildkite/pipeline.yaml @@ -13,7 +13,7 @@ steps: - "chmod +x ./scripts/ci/*.sh" - "chmod +x ./scripts/*" - "apt-get update" - - "apt-get -y install build-essential python3-dev libffi-dev python-pip python-setuptools sqlite3 libssl-dev python-virtualenv libjpeg-dev libxslt1-dev uuid" + - "apt-get -y install build-essential python3-dev libffi-dev python-pip python-setuptools sqlite3 libssl-dev python-virtualenv libjpeg-dev libxslt1-dev util-linux" - "./scripts/ci/install-deps.sh" - "./scripts/ci/end-to-end-tests.sh" plugins: From 253e1c1e4e27352c56a4d6ad731502ac3cc61141 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Fri, 5 Apr 2019 16:05:08 +0200 Subject: [PATCH 09/19] lets see if this package gives us uuidgen --- .buildkite/pipeline.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.buildkite/pipeline.yaml b/.buildkite/pipeline.yaml index 4960598640..739c3b0de2 100644 --- a/.buildkite/pipeline.yaml +++ b/.buildkite/pipeline.yaml @@ -13,7 +13,7 @@ steps: - "chmod +x ./scripts/ci/*.sh" - "chmod +x ./scripts/*" - "apt-get update" - - "apt-get -y install build-essential python3-dev libffi-dev python-pip python-setuptools sqlite3 libssl-dev python-virtualenv libjpeg-dev libxslt1-dev util-linux" + - "apt-get -y install build-essential python3-dev libffi-dev python-pip python-setuptools sqlite3 libssl-dev python-virtualenv libjpeg-dev libxslt1-dev uuid-runtime" - "./scripts/ci/install-deps.sh" - "./scripts/ci/end-to-end-tests.sh" plugins: From af0dee0d651061304588d36b49e0a434dd1ec399 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Fri, 5 Apr 2019 16:45:41 +0200 Subject: [PATCH 10/19] disable sandbox to run under debian --- scripts/ci/end-to-end-tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/ci/end-to-end-tests.sh b/scripts/ci/end-to-end-tests.sh index cd24385ded..c5280120e3 100644 --- a/scripts/ci/end-to-end-tests.sh +++ b/scripts/ci/end-to-end-tests.sh @@ -17,5 +17,5 @@ ln -s $REACT_SDK_DIR/$RIOT_WEB_DIR riot/riot-web # PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true ./install.sh # CHROME_PATH=$(which google-chrome-stable) ./run.sh ./install.sh -./run.sh +./run.sh --no-sandbox popd From 4eeaf05e813f0e888a72d36f7152ede40ab47352 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Fri, 5 Apr 2019 17:29:33 +0200 Subject: [PATCH 11/19] no sandbox didn't work, lets try installing a gazilion deps from the puppeteer page --- .buildkite/pipeline.yaml | 2 ++ scripts/ci/end-to-end-tests.sh | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.buildkite/pipeline.yaml b/.buildkite/pipeline.yaml index 739c3b0de2..ea468d1e6d 100644 --- a/.buildkite/pipeline.yaml +++ b/.buildkite/pipeline.yaml @@ -14,6 +14,8 @@ steps: - "chmod +x ./scripts/*" - "apt-get update" - "apt-get -y install build-essential python3-dev libffi-dev python-pip python-setuptools sqlite3 libssl-dev python-virtualenv libjpeg-dev libxslt1-dev uuid-runtime" + # dependencies for chrome (installed by puppeteer) + - "apt-get -y install gconf-service libasound2 libatk1.0-0 libatk-bridge2.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget" - "./scripts/ci/install-deps.sh" - "./scripts/ci/end-to-end-tests.sh" plugins: diff --git a/scripts/ci/end-to-end-tests.sh b/scripts/ci/end-to-end-tests.sh index c5280120e3..cd24385ded 100644 --- a/scripts/ci/end-to-end-tests.sh +++ b/scripts/ci/end-to-end-tests.sh @@ -17,5 +17,5 @@ ln -s $REACT_SDK_DIR/$RIOT_WEB_DIR riot/riot-web # PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true ./install.sh # CHROME_PATH=$(which google-chrome-stable) ./run.sh ./install.sh -./run.sh --no-sandbox +./run.sh popd From addafe224f9069c874873814ef1f82e8410c37e3 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Fri, 5 Apr 2019 17:39:41 +0200 Subject: [PATCH 12/19] need to disable sandbox because ci tests run as root and puppeteer wont let you do stupid stuff by accident --- scripts/ci/end-to-end-tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/ci/end-to-end-tests.sh b/scripts/ci/end-to-end-tests.sh index cd24385ded..c5280120e3 100644 --- a/scripts/ci/end-to-end-tests.sh +++ b/scripts/ci/end-to-end-tests.sh @@ -17,5 +17,5 @@ ln -s $REACT_SDK_DIR/$RIOT_WEB_DIR riot/riot-web # PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true ./install.sh # CHROME_PATH=$(which google-chrome-stable) ./run.sh ./install.sh -./run.sh +./run.sh --no-sandbox popd From 309d2ead8f9acbdf73233b6ddcb43c5bc6ffdc18 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Tue, 9 Apr 2019 14:39:31 +0200 Subject: [PATCH 13/19] dump server log after running tests --- scripts/ci/end-to-end-tests.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/ci/end-to-end-tests.sh b/scripts/ci/end-to-end-tests.sh index c5280120e3..ffcf22347a 100644 --- a/scripts/ci/end-to-end-tests.sh +++ b/scripts/ci/end-to-end-tests.sh @@ -4,7 +4,7 @@ # # clones riot-web develop and runs the tests against our version of react-sdk. -set -ev +# set -ev RIOT_WEB_DIR=riot-web REACT_SDK_DIR=`pwd` @@ -18,4 +18,5 @@ ln -s $REACT_SDK_DIR/$RIOT_WEB_DIR riot/riot-web # CHROME_PATH=$(which google-chrome-stable) ./run.sh ./install.sh ./run.sh --no-sandbox +cat synapse/installations/consent/homeserver.log popd From 5802a1d9eb6f8c697dfe666c03be5f525d834270 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Tue, 9 Apr 2019 15:11:33 +0200 Subject: [PATCH 14/19] also show test logs --- scripts/ci/end-to-end-tests.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/ci/end-to-end-tests.sh b/scripts/ci/end-to-end-tests.sh index ffcf22347a..84e2d881b3 100644 --- a/scripts/ci/end-to-end-tests.sh +++ b/scripts/ci/end-to-end-tests.sh @@ -17,6 +17,7 @@ ln -s $REACT_SDK_DIR/$RIOT_WEB_DIR riot/riot-web # PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true ./install.sh # CHROME_PATH=$(which google-chrome-stable) ./run.sh ./install.sh -./run.sh --no-sandbox +./run.sh --no-sandbox --error-log e2etests.log cat synapse/installations/consent/homeserver.log +cat e2etests.log popd From 6a4a443c26046a34c758c07796a73e67fde25ef2 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Tue, 9 Apr 2019 16:20:33 +0200 Subject: [PATCH 15/19] attempt at uploading logs as artefacts --- scripts/ci/end-to-end-tests.sh | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/scripts/ci/end-to-end-tests.sh b/scripts/ci/end-to-end-tests.sh index 84e2d881b3..592e686469 100644 --- a/scripts/ci/end-to-end-tests.sh +++ b/scripts/ci/end-to-end-tests.sh @@ -4,7 +4,22 @@ # # clones riot-web develop and runs the tests against our version of react-sdk. -# set -ev +set -ev + +upload_logs() { + buildkite-agent artifact upload synapse/installations/consent/homeserver.log + buildkite-agent artifact upload e2etests.log +} + +handle_error() { + EXIT_CODE=$? + if [ $TESTS_STARTED -eq 1 ]; then + upload_logs + fi + exit $EXIT_CODE +} + +trap 'handle_error' ERR RIOT_WEB_DIR=riot-web REACT_SDK_DIR=`pwd` @@ -17,7 +32,6 @@ ln -s $REACT_SDK_DIR/$RIOT_WEB_DIR riot/riot-web # PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true ./install.sh # CHROME_PATH=$(which google-chrome-stable) ./run.sh ./install.sh +TESTS_STARTED=1 ./run.sh --no-sandbox --error-log e2etests.log -cat synapse/installations/consent/homeserver.log -cat e2etests.log popd From 64f123563b0318e9affc23f2b829ccc126f86686 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Tue, 9 Apr 2019 17:16:39 +0200 Subject: [PATCH 16/19] upload separate log files --- scripts/ci/end-to-end-tests.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/ci/end-to-end-tests.sh b/scripts/ci/end-to-end-tests.sh index 592e686469..fe180daf74 100644 --- a/scripts/ci/end-to-end-tests.sh +++ b/scripts/ci/end-to-end-tests.sh @@ -8,7 +8,7 @@ set -ev upload_logs() { buildkite-agent artifact upload synapse/installations/consent/homeserver.log - buildkite-agent artifact upload e2etests.log + buildkite-agent artifact upload logs/**/* } handle_error() { @@ -32,6 +32,7 @@ ln -s $REACT_SDK_DIR/$RIOT_WEB_DIR riot/riot-web # PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true ./install.sh # CHROME_PATH=$(which google-chrome-stable) ./run.sh ./install.sh +mkdir logs TESTS_STARTED=1 -./run.sh --no-sandbox --error-log e2etests.log +./run.sh --no-sandbox --log-directory logs/ popd From 7dde322ce2af86548c66ff21edcdd1a257f1168e Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Tue, 9 Apr 2019 17:19:29 +0200 Subject: [PATCH 17/19] only need to invoke artifact tool once --- scripts/ci/end-to-end-tests.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/ci/end-to-end-tests.sh b/scripts/ci/end-to-end-tests.sh index fe180daf74..64e022b370 100644 --- a/scripts/ci/end-to-end-tests.sh +++ b/scripts/ci/end-to-end-tests.sh @@ -7,8 +7,7 @@ set -ev upload_logs() { - buildkite-agent artifact upload synapse/installations/consent/homeserver.log - buildkite-agent artifact upload logs/**/* + buildkite-agent artifact upload "logs/**/*;synapse/installations/consent/homeserver.log" } handle_error() { From 57092eeb4ffa2a399282f38d41cf35994bb2bf9c Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Tue, 9 Apr 2019 17:27:49 +0200 Subject: [PATCH 18/19] add buildkite sections --- .buildkite/pipeline.yaml | 1 + scripts/ci/end-to-end-tests.sh | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/.buildkite/pipeline.yaml b/.buildkite/pipeline.yaml index ea468d1e6d..3e92bd483a 100644 --- a/.buildkite/pipeline.yaml +++ b/.buildkite/pipeline.yaml @@ -10,6 +10,7 @@ steps: - label: ":chains: End-to-End Tests" command: # TODO: Remove hacky chmod for BuildKite + - "echo \"--- Installing packages, & setup\"" - "chmod +x ./scripts/ci/*.sh" - "chmod +x ./scripts/*" - "apt-get update" diff --git a/scripts/ci/end-to-end-tests.sh b/scripts/ci/end-to-end-tests.sh index 64e022b370..0d1f973418 100644 --- a/scripts/ci/end-to-end-tests.sh +++ b/scripts/ci/end-to-end-tests.sh @@ -7,6 +7,7 @@ set -ev upload_logs() { + echo "--- Uploading logs" buildkite-agent artifact upload "logs/**/*;synapse/installations/consent/homeserver.log" } @@ -23,15 +24,20 @@ trap 'handle_error' ERR RIOT_WEB_DIR=riot-web REACT_SDK_DIR=`pwd` + +echo "--- Building copy of Riot" scripts/ci/build.sh # run end to end tests +echo "--- Fetching end-to-end tests from master" scripts/fetchdep.sh matrix-org matrix-react-end-to-end-tests master pushd matrix-react-end-to-end-tests ln -s $REACT_SDK_DIR/$RIOT_WEB_DIR riot/riot-web # PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true ./install.sh # CHROME_PATH=$(which google-chrome-stable) ./run.sh +echo "--- Install synapse & other dependencies" ./install.sh mkdir logs +echo "+++ Running end-to-end tests" TESTS_STARTED=1 ./run.sh --no-sandbox --log-directory logs/ popd From f5f89ee4e301b0dec081b06402dbc4a3437695e7 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Tue, 9 Apr 2019 17:56:03 +0200 Subject: [PATCH 19/19] move package installation to docker image to avoid on every run --- .buildkite/pipeline.yaml | 9 +++------ scripts/ci/Dockerfile | 9 +++++++++ scripts/ci/end-to-end-tests.sh | 2 +- 3 files changed, 13 insertions(+), 7 deletions(-) create mode 100644 scripts/ci/Dockerfile diff --git a/.buildkite/pipeline.yaml b/.buildkite/pipeline.yaml index 3e92bd483a..2df498f40a 100644 --- a/.buildkite/pipeline.yaml +++ b/.buildkite/pipeline.yaml @@ -10,18 +10,15 @@ steps: - label: ":chains: End-to-End Tests" command: # TODO: Remove hacky chmod for BuildKite - - "echo \"--- Installing packages, & setup\"" + - "echo '--- Setup'" - "chmod +x ./scripts/ci/*.sh" - "chmod +x ./scripts/*" - - "apt-get update" - - "apt-get -y install build-essential python3-dev libffi-dev python-pip python-setuptools sqlite3 libssl-dev python-virtualenv libjpeg-dev libxslt1-dev uuid-runtime" - # dependencies for chrome (installed by puppeteer) - - "apt-get -y install gconf-service libasound2 libatk1.0-0 libatk-bridge2.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget" + - "echo '--- Install js-sdk'" - "./scripts/ci/install-deps.sh" - "./scripts/ci/end-to-end-tests.sh" plugins: - docker#v3.0.1: - image: "node:10" + image: "matrixdotorg/riotweb-ci-e2etests-env:latest" - label: ":karma: Tests" agents: diff --git a/scripts/ci/Dockerfile b/scripts/ci/Dockerfile new file mode 100644 index 0000000000..c153d11cc7 --- /dev/null +++ b/scripts/ci/Dockerfile @@ -0,0 +1,9 @@ +# Update on docker hub with the following commands in the directory of this file: +# docker build -t matrixdotorg/riotweb-ci-e2etests-env:latest . +# docker log +# docker push matrixdotorg/riotweb-ci-e2etests-env:latest +FROM node:10 +RUN apt-get update +RUN apt-get -y install build-essential python3-dev libffi-dev python-pip python-setuptools sqlite3 libssl-dev python-virtualenv libjpeg-dev libxslt1-dev uuid-runtime +# dependencies for chrome (installed by puppeteer) +RUN apt-get -y install gconf-service libasound2 libatk1.0-0 libatk-bridge2.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget diff --git a/scripts/ci/end-to-end-tests.sh b/scripts/ci/end-to-end-tests.sh index 0d1f973418..0ec26df450 100644 --- a/scripts/ci/end-to-end-tests.sh +++ b/scripts/ci/end-to-end-tests.sh @@ -25,7 +25,7 @@ RIOT_WEB_DIR=riot-web REACT_SDK_DIR=`pwd` -echo "--- Building copy of Riot" +echo "--- Building Riot" scripts/ci/build.sh # run end to end tests echo "--- Fetching end-to-end tests from master"