test CI e2e browser run [ci:force] (#7864)

* test CI e2e browser run [ci:force]

* hardcoded browser run test [ci:force]

* run only 1 job in browser mode [ci:force]

* reset browser run global

* trigger travis [ci:force]

* restore false/true assign [ci:force]
This commit is contained in:
Rafal Szmit 2022-09-30 17:35:32 +02:00 committed by GitHub
parent 46da01fe18
commit 287299bf8e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 15 additions and 11 deletions

View File

@ -300,7 +300,7 @@ jobs:
before_script: before_script:
- ./scripts/ci/job_hooks/before_e2e.sh - ./scripts/ci/job_hooks/before_e2e.sh
- ./scripts/ci/check-env/check-cs-env.sh || travis_terminate 1 - ./scripts/ci/check-env/check-cs-env.sh || travis_terminate 1
script: ./scripts/travis/e2e/e2e.sh "content-services" script: ./scripts/travis/e2e/e2e.sh "content-services" "browser"
after_script: ./scripts/ci/job_hooks/after_e2e.sh after_script: ./scripts/ci/job_hooks/after_e2e.sh
workspaces: workspaces:
create: create:

View File

@ -22,7 +22,7 @@ if (ENV_FILE) {
} }
const HOST = process.env.URL_HOST_ADF; const HOST = process.env.URL_HOST_ADF;
const BROWSER_RUN = ([true, 'true'].includes(process.env.BROWSER_RUN)) const BROWSER_RUN = [true, 'true'].includes(process.env.BROWSER_RUN);
const FOLDER = process.env.FOLDER || ''; const FOLDER = process.env.FOLDER || '';
const SELENIUM_SERVER = process.env.SELENIUM_SERVER || ''; const SELENIUM_SERVER = process.env.SELENIUM_SERVER || '';
const MAXINSTANCES = process.env.MAXINSTANCES || 1; const MAXINSTANCES = process.env.MAXINSTANCES || 1;

View File

@ -2,7 +2,5 @@
"C269081": "https://alfresco.atlassian.net/browse/ADF-5385", "C269081": "https://alfresco.atlassian.net/browse/ADF-5385",
"C272819": "https://alfresco.atlassian.net/browse/ADF-5385", "C272819": "https://alfresco.atlassian.net/browse/ADF-5385",
"C362241": "https://alfresco.atlassian.net/browse/ADF-5385", "C362241": "https://alfresco.atlassian.net/browse/ADF-5385",
"C260040": "https://alfresco.atlassian.net/browse/AAE-8041", "C260040": "https://alfresco.atlassian.net/browse/AAE-8041"
"C260125": "https://alfresco.atlassian.net/browse/AAE-10744",
"C274688": "https://alfresco.atlassian.net/browse/AAE-10744"
} }

View File

@ -2,7 +2,7 @@
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd "$DIR/../" cd "$DIR/../"
BROWSER_RUN=false export BROWSER_RUN=false
DEVELOPMENT=false DEVELOPMENT=false
LITESERVER=false LITESERVER=false
EXEC_VERSION_JSAPI=false EXEC_VERSION_JSAPI=false
@ -69,7 +69,6 @@ set_specs(){
} }
set_browser(){ set_browser(){
echo "====== BROWSER RUN ====="
BROWSER_RUN=true BROWSER_RUN=true
export BROWSER_RUN=$BROWSER_RUN export BROWSER_RUN=$BROWSER_RUN
} }
@ -141,7 +140,7 @@ done
rm -rf ./e2e/downloads/ rm -rf ./e2e/downloads/
rm -rf ./e2e-output/ rm -rf ./e2e-output/
echo "====== BROWSER_RUN: $BROWSER_RUN ======"
echo "====== Update webdriver-manager =====" echo "====== Update webdriver-manager ====="
if [ "$CI" = "true" ]; then if [ "$CI" = "true" ]; then
export chrome=$(google-chrome --product-version) export chrome=$(google-chrome --product-version)

View File

@ -1,5 +1,4 @@
#!/usr/bin/env bash #!/usr/bin/env bash
echo "Start e2e" echo "Start e2e"
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
@ -8,6 +7,14 @@ cd $DIR/../../../
BASE_DIRECTORY=$(echo "$FOLDER" | cut -d "/" -f1) BASE_DIRECTORY=$(echo "$FOLDER" | cut -d "/" -f1)
verifyLib=$1; verifyLib=$1;
# set test-e2e params
if [ ! -z "$2" ]; then
e2eParams="--$2"
else
e2eParams=""
fi
echo "Step1 - Verify if affected libs contains $verifyLib" echo "Step1 - Verify if affected libs contains $verifyLib"
AFFECTED_LIB="$(./scripts/travis/affected-contains.sh $verifyLib )"; AFFECTED_LIB="$(./scripts/travis/affected-contains.sh $verifyLib )";
@ -29,7 +36,7 @@ if [ ${AFFECTED_LIB} == true ]; then
if [[ $AFFECTED_LIBS =~ "testing" || $AFFECTED_LIBS =~ "$BASE_DIRECTORY" || "${TRAVIS_EVENT_TYPE}" == "push" || "${TRAVIS_EVENT_TYPE}" == "api" || "${TRAVIS_EVENT_TYPE}" == "cron" ]]; then if [[ $AFFECTED_LIBS =~ "testing" || $AFFECTED_LIBS =~ "$BASE_DIRECTORY" || "${TRAVIS_EVENT_TYPE}" == "push" || "${TRAVIS_EVENT_TYPE}" == "api" || "${TRAVIS_EVENT_TYPE}" == "cron" ]]; then
echo "Run all e2e $FOLDER" echo "Run all e2e $FOLDER"
./scripts/test-e2e-lib.sh --use-dist ./scripts/test-e2e-lib.sh --use-dist $e2eParams
else if [[ $AFFECTED_E2E == "e2e/$FOLDER" ]]; then else if [[ $AFFECTED_E2E == "e2e/$FOLDER" ]]; then
echo "Run affected e2e" echo "Run affected e2e"
@ -39,7 +46,7 @@ if [ ${AFFECTED_LIB} == true ]; then
echo "Run $FOLDER e2e based on the sha $HEAD_SHA_BRANCH with the specs: "$LIST_SPECS echo "Run $FOLDER e2e based on the sha $HEAD_SHA_BRANCH with the specs: "$LIST_SPECS
if [[ $LIST_SPECS != "" ]]; then if [[ $LIST_SPECS != "" ]]; then
./scripts/test-e2e-lib.sh --use-dist ./scripts/test-e2e-lib.sh --use-dist $e2eParams
fi fi
fi fi
fi; fi;