MM-52642 CLD-6352 MM-54007 Prepare setup for Playwright pipeline (#24647)
* pipeline(playwright): prepare setup for playwright * feedback address * clean up readme * Fix docker-compose command and definition for dashboard * fix the dashboard * ignore dashboard when formatting --------- Co-authored-by: Mattermost Build <build@mattermost.com> Co-authored-by: Mario Vitale <mvitale1989@hotmail.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
e9da1ee8ca
Коммит
6746857ee7
@@ -1,7 +1,8 @@
|
||||
#!/bin/bash
|
||||
set -e -u -o pipefail
|
||||
cd $(dirname $0)
|
||||
cd "$(dirname "$0")"
|
||||
. .e2erc
|
||||
. .e2erc_setup
|
||||
|
||||
# Set required variables
|
||||
TEST_FILTER_DEFAULT='--stage=@prod --group=@smoke'
|
||||
@@ -9,8 +10,8 @@ TEST_FILTER=${TEST_FILTER:-$TEST_FILTER_DEFAULT}
|
||||
|
||||
# Print run information
|
||||
mme2e_log "Printing Cypress container informations"
|
||||
${MME2E_DC_SERVER} exec -T -u $MME2E_UID -- cypress node -p 'module.paths'
|
||||
${MME2E_DC_SERVER} exec -T -u $MME2E_UID -- cypress bash <<"EOF"
|
||||
${MME2E_DC_SERVER} exec -T -u "$MME2E_UID" -- cypress node -p 'module.paths'
|
||||
${MME2E_DC_SERVER} exec -T -u "$MME2E_UID" -- cypress bash <<"EOF"
|
||||
cat <<INNEREOF
|
||||
node version: $(node -v)
|
||||
npm version: $(npm -v)
|
||||
@@ -23,7 +24,7 @@ EOF
|
||||
|
||||
# Initialize cypress report directory
|
||||
mme2e_log "Prepare Cypress: clean and initialize report and logs directory"
|
||||
${MME2E_DC_SERVER} exec -T -u $MME2E_UID -- cypress bash <<EOF
|
||||
${MME2E_DC_SERVER} exec -T -u "$MME2E_UID" -- cypress bash <<EOF
|
||||
rm -rf logs results
|
||||
mkdir -p logs
|
||||
mkdir -p results/junit
|
||||
@@ -33,13 +34,16 @@ EOF
|
||||
|
||||
# Run cypress test
|
||||
# No need to collect its exit status: if it's nonzero, this script will terminate since we use '-e'
|
||||
if ${MME2E_DC_SERVER} exec -T -u $MME2E_UID -- cypress bash -c '[ -n "${AUTOMATION_DASHBOARD_URL}" ]'; then
|
||||
mme2e_log "AUTOMATION_DASHBOARD_URL is set. Using run_test_cycle.js for the cypress run"
|
||||
${MME2E_DC_SERVER} exec -T -u $MME2E_UID -- cypress node --trace-warnings generate_test_cycle.js ${TEST_FILTER}
|
||||
${MME2E_DC_SERVER} exec -T -u $MME2E_UID -- cypress node run_test_cycle.js | tee ../cypress/logs/cypress.log
|
||||
# shellcheck disable=SC2016
|
||||
if ${MME2E_DC_SERVER} exec -T -u "$MME2E_UID" -- cypress bash -c '[ -n "${AUTOMATION_DASHBOARD_URL}" ]'; then
|
||||
mme2e_log "AUTOMATION_DASHBOARD_URL is set. Using run_test_cycle.js for the cypress run"
|
||||
# shellcheck disable=SC2086
|
||||
${MME2E_DC_SERVER} exec -T -u "$MME2E_UID" -- cypress node --trace-warnings generate_test_cycle.js $TEST_FILTER
|
||||
${MME2E_DC_SERVER} exec -T -u "$MME2E_UID" -- cypress node run_test_cycle.js | tee ../cypress/logs/cypress.log
|
||||
else
|
||||
mme2e_log "AUTOMATION_DASHBOARD_URL is unset. Using run_tests.js for the cypress run"
|
||||
${MME2E_DC_SERVER} exec -T -u $MME2E_UID -- cypress node run_tests.js ${TEST_FILTER} | tee ../cypress/logs/cypress.log
|
||||
mme2e_log "AUTOMATION_DASHBOARD_URL is unset. Using run_tests.js for the cypress run"
|
||||
# shellcheck disable=SC2086
|
||||
${MME2E_DC_SERVER} exec -T -u "$MME2E_UID" -- cypress node run_tests.js $TEST_FILTER | tee ../cypress/logs/cypress.log
|
||||
fi
|
||||
|
||||
# Collect server logs
|
||||
|
||||
Ссылка в новой задаче
Block a user