From cf242176ef092a34657ff6e8af8ce780e891a397 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Alfonso=20Mart=C3=ADnez?= Date: Wed, 11 Aug 2021 10:25:42 +0200 Subject: [PATCH] mgr/dashboard: run-cephadm-e2e-tests.sh improvements MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit - Jenkins env.: make sure the cluster is always started. - PR template: add trigger phrase to the jenkins commands list. - Cypress: add --no-install flag; clean previous reports. Fixes: https://tracker.ceph.com/issues/52082 Signed-off-by: Alfonso Martínez (cherry picked from commit cadf8c75ac0266e42c1ea0b4d6733590ea3dac21) Conflicts: .github/pull_request_template.md - Update jenkins trigger phrases: cephadm e2e; api tests. --- .github/pull_request_template.md | 3 ++- .../dashboard/ci/cephadm/run-cephadm-e2e-tests.sh | 14 +++++++------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 3a1ab14e95fa5..924db3b7ccdf9 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -47,7 +47,8 @@ https://raw.githubusercontent.com/ceph/ceph/master/SubmittingPatches.rst - `jenkins test make check arm64` - `jenkins test submodules` - `jenkins test dashboard` -- `jenkins test dashboard backend` +- `jenkins test dashboard cephadm` +- `jenkins test api` - `jenkins test docs` - `jenkins render docs` - `jenkins test ceph-volume all` diff --git a/src/pybind/mgr/dashboard/ci/cephadm/run-cephadm-e2e-tests.sh b/src/pybind/mgr/dashboard/ci/cephadm/run-cephadm-e2e-tests.sh index 178c89f5ba60f..e109297160892 100755 --- a/src/pybind/mgr/dashboard/ci/cephadm/run-cephadm-e2e-tests.sh +++ b/src/pybind/mgr/dashboard/ci/cephadm/run-cephadm-e2e-tests.sh @@ -13,11 +13,9 @@ get_vm_ip () { echo -n $ip } -if [[ -z "${CYPRESS_BASE_URL}" ]]; then - CEPH_NODE_00_IP="$(get_vm_ip ceph-node-00)" - if [[ -z "${CEPH_NODE_00_IP}" ]]; then - . "$(dirname $0)"/start-cluster.sh - fi +if [[ -n "${JENKINS_HOME}" || (-z "${CYPRESS_BASE_URL}" && -z "$(get_vm_ip ceph-node-00)") ]]; then + . "$(dirname $0)"/start-cluster.sh + CYPRESS_BASE_URL="https://$(get_vm_ip ceph-node-00):${DASHBOARD_PORT}" fi @@ -27,11 +25,13 @@ cypress_run () { local specs="$1" local timeout="$2" local override_config="ignoreTestFiles=*.po.ts,retries=0,testFiles=${specs}" - if [[ -n "$timeout" ]]; then override_config="${override_config},defaultCommandTimeout=${timeout}" fi - npx cypress run ${CYPRESS_ARGS} --browser chrome --headless --config "$override_config" + + rm -f cypress/reports/results-*.xml || true + + npx --no-install cypress run ${CYPRESS_ARGS} --browser chrome --headless --config "$override_config" } : ${CEPH_DEV_FOLDER:=${PWD}} -- 2.39.5