diff --git a/.travis.yml b/.travis.yml index d1c217ad69d..23c1ef6e034 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,6 +23,13 @@ env: - REDIRECT_URI=/ - BROWSER_RUN=true - MAXINSTANCES=2 + - PROXY_HOST_ADF=$E2E_HOST + - HOST_SSO=$HOST_SSO + - USERNAME_ADF=$E2E_USERNAME + - PASSWORD_ADF=$E2E_PASSWORD + - IDENTITY_ADMIN_EMAIL=$E2E_ADMIN_EMAIL_IDENTITY + - IDENTITY_ADMIN_PASSWORD=$E2E_ADMIN_PASSWORD_IDENTITY + - URL_HOST_ADF="http://localhost:4200" branches: only: @@ -80,7 +87,7 @@ jobs: name: built_libs_cache paths: - "$BUILT_LIBS_DIR" - - "$NODE_MODULES_DIR" + - "$NODE_MODULES_DIR" use: node_modules_cache - stage: "Build lib" @@ -148,95 +155,112 @@ jobs: - ./scripts/ci/job_hooks/before_e2e.sh - ./scripts/ci/check-env/check-cs-env.sh || travis_terminate 1 - ./scripts/ci/check-env/check-ps-env.sh || travis_terminate 1 - script: ./scripts/travis/e2e/core-e2e.sh + script: ./scripts/travis/e2e/e2e.sh after_script: ./scripts/ci/job_hooks/after_e2e.sh workspaces: use: - built_libs_cache - built_demo_shell_cache - + env: + - FOLDER="core" + - PROVIDER='ALL' + - AUTH_TYPE='OAUTH' - stage: "e2e Test" name: "Content: Components" before_script: - ./scripts/ci/job_hooks/before_e2e.sh - ./scripts/ci/check-env/check-cs-env.sh || travis_terminate 1 - script: ./scripts/travis/e2e/content-services-e2e.sh + script: ./scripts/travis/e2e/e2e.sh after_script: ./scripts/ci/job_hooks/after_e2e.sh workspaces: use: - built_libs_cache - built_demo_shell_cache env: - - CONTEXT_ENV="content-services/components" + - FOLDER="content-services/components" + - PROVIDER="ECM" + - AUTH_TYPE="BASIC" - stage: "e2e Test" name: "Content: Directives" before_script: - ./scripts/ci/job_hooks/before_e2e.sh - ./scripts/ci/check-env/check-cs-env.sh || travis_terminate 1 - script: ./scripts/travis/e2e/content-services-e2e.sh + script: ./scripts/travis/e2e/e2e.sh after_script: ./scripts/ci/job_hooks/after_e2e.sh workspaces: use: - built_libs_cache - built_demo_shell_cache env: - - CONTEXT_ENV="content-services/directives" + - FOLDER="content-services/directives" + - PROVIDER="ECM" + - AUTH_TYPE="BASIC" - stage: "e2e Test" name: "Content: Document List" before_script: - ./scripts/ci/job_hooks/before_e2e.sh - ./scripts/ci/check-env/check-cs-env.sh || travis_terminate 1 - script: ./scripts/travis/e2e/content-services-e2e.sh + script: ./scripts/travis/e2e/e2e.sh after_script: ./scripts/ci/job_hooks/after_e2e.sh workspaces: use: - built_libs_cache - built_demo_shell_cache env: - - CONTEXT_ENV="content-services/document-list" + - FOLDER="content-services/document-list" + - PROVIDER="ECM" + - AUTH_TYPE="BASIC" - stage: "e2e Test" name: "Content: Metadata" before_script: - ./scripts/ci/job_hooks/before_e2e.sh - ./scripts/ci/check-env/check-cs-env.sh || travis_terminate 1 - script: ./scripts/travis/e2e/content-services-e2e.sh + script: ./scripts/travis/e2e/e2e.sh after_script: ./scripts/ci/job_hooks/after_e2e.sh workspaces: use: - built_libs_cache - built_demo_shell_cache env: - - CONTEXT_ENV="content-services/metadata" + - FOLDER="content-services/metadata" + - PROVIDER="ECM" + - AUTH_TYPE="BASIC" - stage: "e2e Test" name: "Content: Upload and Versioning" before_script: - ./scripts/ci/job_hooks/before_e2e.sh - ./scripts/ci/check-env/check-cs-env.sh || travis_terminate 1 - script: ./scripts/travis/e2e/content-services-e2e.sh + script: ./scripts/travis/e2e/e2e.sh after_script: ./scripts/ci/job_hooks/after_e2e.sh workspaces: use: - built_libs_cache - built_demo_shell_cache env: - - CONTEXT_ENV="content-services/upload" + - FOLDER="content-services/upload" + - PROVIDER="ECM" + - AUTH_TYPE="BASIC" - stage: "e2e Test" name: "Search" before_script: - ./scripts/ci/job_hooks/before_e2e.sh - ./scripts/ci/check-env/check-cs-env.sh || travis_terminate 1 - script: ./scripts/travis/e2e/search-e2e.sh + script: ./scripts/travis/e2e/e2e.sh after_script: ./scripts/ci/job_hooks/after_e2e.sh workspaces: use: - built_libs_cache - built_demo_shell_cache + env: + - FOLDER="search" + - PROVIDER="ECM" + - AUTH_TYPE="BASIC" - stage: "e2e Test" name: "Process: Form" @@ -244,14 +268,16 @@ jobs: - ./scripts/ci/job_hooks/before_e2e.sh || travis_terminate 1 - ./scripts/ci/check-env/check-ps-env.sh || travis_terminate 1 - ./scripts/ci/check-env/check-external-cs-env.sh || travis_terminate 1 - script: ./scripts/travis/e2e/process-services-e2e.sh + script: ./scripts/travis/e2e/e2e.sh after_script: ./scripts/ci/job_hooks/after_e2e.sh workspaces: use: - built_libs_cache - built_demo_shell_cache env: - - CONTEXT_ENV="process-services/form" + - FOLDER="process-services/form" + - PROVIDER="BPM" + - AUTH_TYPE="OAUTH" - stage: "e2e Test" name: "Process: Process" @@ -259,14 +285,16 @@ jobs: - ./scripts/ci/job_hooks/before_e2e.sh || travis_terminate 1 - ./scripts/ci/check-env/check-ps-env.sh || travis_terminate 1 - ./scripts/ci/check-env/check-external-cs-env.sh || travis_terminate 1 - script: ./scripts/travis/e2e/process-services-e2e.sh + script: ./scripts/travis/e2e/e2e.sh after_script: ./scripts/ci/job_hooks/after_e2e.sh workspaces: use: - built_libs_cache - built_demo_shell_cache env: - - CONTEXT_ENV="process-services/process" + - FOLDER="process-services/process" + - PROVIDER="BPM" + - AUTH_TYPE="OAUTH" - stage: "e2e Test" name: "Process: Tasks" @@ -274,14 +302,16 @@ jobs: - ./scripts/ci/job_hooks/before_e2e.sh || travis_terminate 1 - ./scripts/ci/check-env/check-ps-env.sh || travis_terminate 1 - ./scripts/ci/check-env/check-external-cs-env.sh || travis_terminate 1 - script: ./scripts/travis/e2e/process-services-e2e.sh + script: ./scripts/travis/e2e/e2e.sh after_script: ./scripts/ci/job_hooks/after_e2e.sh workspaces: use: - built_libs_cache - built_demo_shell_cache env: - - CONTEXT_ENV="process-services/tasks" + - FOLDER="process-services/tasks" + - PROVIDER="BPM" + - AUTH_TYPE="OAUTH" - stage: "e2e Test" name: "Process: Widgets" @@ -289,14 +319,16 @@ jobs: - ./scripts/ci/job_hooks/before_e2e.sh || travis_terminate 1 - ./scripts/ci/check-env/check-ps-env.sh || travis_terminate 1 - ./scripts/ci/check-env/check-external-cs-env.sh || travis_terminate 1 - script: ./scripts/travis/e2e/process-services-e2e.sh + script: ./scripts/travis/e2e/e2e.sh after_script: ./scripts/ci/job_hooks/after_e2e.sh workspaces: use: - built_libs_cache - built_demo_shell_cache env: - - CONTEXT_ENV="process-services/widgets" + - FOLDER="process-services/widgets" + - PROVIDER="BPM" + - AUTH_TYPE="OAUTH" - stage: "e2e Test" name: "Process Cloud : Form" @@ -304,14 +336,16 @@ jobs: - ./scripts/ci/job_hooks/before_e2e.sh - ./scripts/ci/check-env/check-cs-env.sh || travis_terminate 1 - ./scripts/ci/check-env/check-ps-cloud-env.sh || travis_terminate 1 - script: ./scripts/travis/e2e/process-services-cloud-e2e.sh + script: ./scripts/travis/e2e/e2e.sh after_script: ./scripts/ci/job_hooks/after_e2e.sh workspaces: use: - built_libs_cache - built_demo_shell_cache env: - - CONTEXT_ENV="process-services-cloud/form-field" + - FOLDER="process-services-cloud/form-field" + - PROVIDER="ALL" + - AUTH_TYPE="OAUTH" - stage: "e2e Test" name: "Process Cloud : People" @@ -319,14 +353,16 @@ jobs: - ./scripts/ci/job_hooks/before_e2e.sh - ./scripts/ci/check-env/check-cs-env.sh || travis_terminate 1 - ./scripts/ci/check-env/check-ps-cloud-env.sh || travis_terminate 1 - script: ./scripts/travis/e2e/process-services-cloud-e2e.sh + script: ./scripts/travis/e2e/e2e.sh after_script: ./scripts/ci/job_hooks/after_e2e.sh workspaces: use: - built_libs_cache - built_demo_shell_cache env: - - CONTEXT_ENV="process-services-cloud/people" + - FOLDER="process-services-cloud/people" + - PROVIDER="ALL" + - AUTH_TYPE="OAUTH" - stage: "e2e Test" name: "Process Cloud : Process" @@ -334,14 +370,16 @@ jobs: - ./scripts/ci/job_hooks/before_e2e.sh - ./scripts/ci/check-env/check-cs-env.sh || travis_terminate 1 - ./scripts/ci/check-env/check-ps-cloud-env.sh || travis_terminate 1 - script: ./scripts/travis/e2e/process-services-cloud-e2e.sh + script: ./scripts/travis/e2e/e2e.sh after_script: ./scripts/ci/job_hooks/after_e2e.sh workspaces: use: - built_libs_cache - built_demo_shell_cache env: - - CONTEXT_ENV="process-services-cloud/process" + - FOLDER="process-services-cloud/process" + - PROVIDER="ALL" + - AUTH_TYPE="OAUTH" - stage: "e2e Test" name: "Process Cloud : Start Task" @@ -349,14 +387,16 @@ jobs: - ./scripts/ci/job_hooks/before_e2e.sh - ./scripts/ci/check-env/check-cs-env.sh || travis_terminate 1 - ./scripts/ci/check-env/check-ps-cloud-env.sh || travis_terminate 1 - script: ./scripts/travis/e2e/process-services-cloud-e2e.sh + script: ./scripts/travis/e2e/e2e.sh after_script: ./scripts/ci/job_hooks/after_e2e.sh workspaces: use: - built_libs_cache - built_demo_shell_cache env: - - CONTEXT_ENV="process-services-cloud/start-task" + - FOLDER="process-services-cloud/start-task" + - PROVIDER="ALL" + - AUTH_TYPE="OAUTH" - stage: "e2e Test" name: "Process Cloud : Tasks List" @@ -364,14 +404,16 @@ jobs: - ./scripts/ci/job_hooks/before_e2e.sh - ./scripts/ci/check-env/check-cs-env.sh || travis_terminate 1 - ./scripts/ci/check-env/check-ps-cloud-env.sh || travis_terminate 1 - script: ./scripts/travis/e2e/process-services-cloud-e2e.sh + script: ./scripts/travis/e2e/e2e.sh after_script: ./scripts/ci/job_hooks/after_e2e.sh workspaces: use: - built_libs_cache - built_demo_shell_cache env: - - CONTEXT_ENV="process-services-cloud/task-list" + - FOLDER="process-services-cloud/task-list" + - PROVIDER="ALL" + - AUTH_TYPE="OAUTH" - stage: Check bundle script: diff --git a/e2e/protractor.conf.js b/e2e/protractor.conf.js index 70f7fafe2a3..81ba6628a9e 100644 --- a/e2e/protractor.conf.js +++ b/e2e/protractor.conf.js @@ -15,7 +15,7 @@ const argv = require('yargs').argv; const width = 1657, height = 1657; const ENV_FILE = process.env.ENV_FILE; -const GROUP_SUFFIX = process.env.PREFIX || 'adf'; +const GROUP_SUFFIX = process.env.PREFIX || process.env.TRAVIS_BUILD_NUMBER || 'adf'; if (ENV_FILE) { require('dotenv').config({path: ENV_FILE}); diff --git a/scripts/test-e2e-lib.sh b/scripts/test-e2e-lib.sh index 7edb9e26f96..14ce684a3a5 100755 --- a/scripts/test-e2e-lib.sh +++ b/scripts/test-e2e-lib.sh @@ -102,11 +102,6 @@ set_env(){ export ENV_FILE=$1 } -set_prefix(){ - PREFIX=$1 - export PREFIX=$PREFIX -} - debug(){ export DEBUG=true; } @@ -131,7 +126,6 @@ while [[ $1 == -* ]]; do -env|--env) set_env $2; shift 2;; -dev|--dev) set_development; shift;; -s|--specs) set_specs $2; shift 2;; - -prefix|--prefix) set_prefix $2; shift 2;; -db|--debug) debug; shift;; -ud|--use-dist) lite_server; shift;; -save) set_save_screenshot; shift;; diff --git a/scripts/travis/e2e/content-services-e2e.sh b/scripts/travis/e2e/content-services-e2e.sh deleted file mode 100755 index b0e7072cdf1..00000000000 --- a/scripts/travis/e2e/content-services-e2e.sh +++ /dev/null @@ -1,40 +0,0 @@ -#!/usr/bin/env bash - -echo "Start Content service e2e" - -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" - -cd $DIR/../../../ - -export PROVIDER='ECM' -export AUTH_TYPE='BASIC' - -if [ "${TRAVIS_EVENT_TYPE}" == "pull_request" ]; then - echo "Calculate affected e2e $BASE_HASH $HEAD_HASH" - echo "nx affected:libs --base=$BASE_HASH --head=$HEAD_HASH --plain" - AFFECTED_LIBS="$(nx affected:libs --base=$BASE_HASH --head=$HEAD_HASH --plain || exit 1)" - echo "Affected libs ${AFFECTED_LIBS}" - AFFECTED_E2E="$(./scripts/git-util/affected-folder.sh -b $TRAVIS_BRANCH -f "e2e/$CONTEXT_ENV")"; - echo "Affected e2e ${AFFECTED_E2E}" -fi; - -#-b is needed to run the Folder upload test that are not workin in Headless chrome -RUN_E2E=$(echo ./scripts/test-e2e-lib.sh -host http://localhost:4200 -proxy "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" --use-dist || exit 1) -if [[ $AFFECTED_LIBS =~ "testing" || $AFFECTED_LIBS =~ "$CONTEXT_ENV" || "${TRAVIS_EVENT_TYPE}" == "push" || "${TRAVIS_EVENT_TYPE}" == "api" ]]; then - echo "Run all e2e $CONTEXT_ENV" - $RUN_CHECK - $RUN_E2E --folder $CONTEXT_ENV -else if [[ $AFFECTED_E2E == "e2e/$CONTEXT_ENV" ]]; then - echo "Run affected e2e" - - HEAD_SHA_BRANCH="$(git merge-base origin/$TRAVIS_BRANCH HEAD)" - LIST_SPECS="$(git diff --name-only $HEAD_SHA_BRANCH HEAD | grep "^e2e/$CONTEXT_ENV" | paste -sd , -)" - - echo "Run $CONTEXT_ENV e2e based on the sha $HEAD_SHA_BRANCH with the specs: "$LIST_SPECS - - if [[ $LIST_SPECS != "" ]]; then - $RUN_CHECK - $RUN_E2E --specs "$LIST_SPECS" - fi - fi -fi; diff --git a/scripts/travis/e2e/core-e2e.sh b/scripts/travis/e2e/core-e2e.sh deleted file mode 100755 index f802518a466..00000000000 --- a/scripts/travis/e2e/core-e2e.sh +++ /dev/null @@ -1,40 +0,0 @@ -#!/usr/bin/env bash - -echo "Start Core e2e" -echo "Start Core e2e $TRAVIS_PULL_REQUEST" - -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" - -cd $DIR/../../../ - -export CONTEXT_ENV="core" -export PROVIDER='ALL' -export AUTH_TYPE='OAUTH' - -if [ "${TRAVIS_EVENT_TYPE}" == "pull_request" ]; then - echo "Calculate affected e2e $BASE_HASH $HEAD_HASH" - echo "nx affected:libs --base=$BASE_HASH --head=$HEAD_HASH --plain" - AFFECTED_LIBS="$(nx affected:libs --base=$BASE_HASH --head=$HEAD_HASH --plain || exit 1)" - echo "Affected libs ${AFFECTED_LIBS}" - AFFECTED_E2E="$(./scripts/git-util/affected-folder.sh -b $TRAVIS_BRANCH -f "e2e/$CONTEXT_ENV")"; - echo "Affected e2e ${AFFECTED_E2E}" -fi; - -RUN_E2E=$(echo ./scripts/test-e2e-lib.sh -host http://localhost:4200 -proxy "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" --use-dist || exit 1) - -if [[ $AFFECTED_LIBS =~ "testing" || $AFFECTED_LIBS =~ "$CONTEXT_ENV" || "${TRAVIS_EVENT_TYPE}" == "push" || "${TRAVIS_EVENT_TYPE}" == "api" ]]; then - echo "Run all e2e $CONTEXT_ENV" - $RUN_E2E --folder $CONTEXT_ENV || exit 1 -else if [[ $AFFECTED_E2E == "e2e/$CONTEXT_ENV" ]]; then - echo "Run affected e2e" - HEAD_SHA_BRANCH="$(git merge-base origin/$TRAVIS_BRANCH HEAD)" - LIST_SPECS="$(git diff --name-only $HEAD_SHA_BRANCH HEAD | grep "^e2e/$CONTEXT_ENV" | paste -sd , -)" - - echo "Run $CONTEXT_ENV e2e based on the sha $HEAD_SHA_BRANCH with the specs: "$LIST_SPECS - - if [[ $LIST_SPECS != "" ]]; - then - $RUN_E2E --specs "$LIST_SPECS" || exit 1 - fi - fi -fi; diff --git a/scripts/travis/e2e/e2e.sh b/scripts/travis/e2e/e2e.sh new file mode 100755 index 00000000000..2ca38f7a642 --- /dev/null +++ b/scripts/travis/e2e/e2e.sh @@ -0,0 +1,35 @@ +#!/usr/bin/env bash + +echo "Start e2e" + +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" + +cd $DIR/../../../ + +BASE_DIRECTORY=$(echo "$FOLDER" | cut -d "/" -f1) + +if [ "${TRAVIS_EVENT_TYPE}" == "pull_request" ]; then + echo "Calculate affected e2e $BASE_HASH $HEAD_HASH" + echo "nx affected:libs --base=$BASE_HASH --head=$HEAD_HASH --plain" + AFFECTED_LIBS="$(nx affected:libs --base=$BASE_HASH --head=$HEAD_HASH --plain || exit 1)" + echo "Affected libs ${AFFECTED_LIBS}" + AFFECTED_E2E="$(./scripts/git-util/affected-folder.sh -b $TRAVIS_BRANCH -f "e2e/$FOLDER")"; + echo "Affected e2e ${AFFECTED_E2E}" +fi; + +if [[ $AFFECTED_LIBS =~ "testing" || $AFFECTED_LIBS =~ "$BASE_DIRECTORY" || "${TRAVIS_EVENT_TYPE}" == "push" || "${TRAVIS_EVENT_TYPE}" == "api" ]]; then + echo "Run all e2e $FOLDER" + ./scripts/test-e2e-lib.sh --use-dist +else if [[ $AFFECTED_E2E == "e2e/$FOLDER" ]]; then + echo "Run affected e2e" + + HEAD_SHA_BRANCH="$(git merge-base origin/$TRAVIS_BRANCH HEAD)" + LIST_SPECS="$(git diff --name-only $HEAD_SHA_BRANCH HEAD | grep "^e2e/$FOLDER" | paste -sd , -)" + + echo "Run $FOLDER e2e based on the sha $HEAD_SHA_BRANCH with the specs: "$LIST_SPECS + + if [[ $LIST_SPECS != "" ]]; then + ./scripts/test-e2e-lib.sh --use-dist + fi + fi +fi; diff --git a/scripts/travis/e2e/insights-e2e.sh b/scripts/travis/e2e/insights-e2e.sh deleted file mode 100755 index cdba7835009..00000000000 --- a/scripts/travis/e2e/insights-e2e.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env bash - -echo "Start insight e2e" - -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" - -export PROVIDER='BPM' -export AUTH_TYPE='OAUTH' - -cd $DIR/../../../ - -if [ "${TRAVIS_EVENT_TYPE}" == "pull_request" ]; then - echo "Calculate affected e2e $BASE_HASH $HEAD_HASH" - echo "nx affected:libs --base=$BASE_HASH --head=$HEAD_HASH --plain" - echo "Affected libs ${AFFECTED_LIBS}" - AFFECTED_LIBS="$(nx affected:libs --base=$BASE_HASH --head=$HEAD_HASH --plain || exit 1)" - echo "Affected e2e ${AFFECTED_E2E}" -fi; - -if [[ $AFFECTED_LIBS =~ "testing" || $AFFECTED_LIBS =~ "insight" || "${TRAVIS_EVENT_TYPE}" == "push" || "${TRAVIS_EVENT_TYPE}" == "api" ]]; -then - ./node_modules/@alfresco/adf-cli/bin/adf-cli check-ps-env --host "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" || exit 1; - ./scripts/test-e2e-lib.sh -host http://localhost:4200 -proxy "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" --folder insights --use-dist || exit 1; -fi; diff --git a/scripts/travis/e2e/process-services-cloud-e2e.sh b/scripts/travis/e2e/process-services-cloud-e2e.sh deleted file mode 100755 index f1a81b77200..00000000000 --- a/scripts/travis/e2e/process-services-cloud-e2e.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/env bash - -echo "Start process services cloud e2e" - -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" - -cd $DIR/../../../ - -export PROVIDER="ALL" -export AUTH_TYPE="OAUTH" - -if [ "${TRAVIS_EVENT_TYPE}" == "pull_request" ]; then - echo "Calculate affected e2e $BASE_HASH $HEAD_HASH" - echo "nx affected:libs --base=$BASE_HASH --head=$HEAD_HASH --plain" - AFFECTED_LIBS="$(nx affected:libs --base=$BASE_HASH --head=$HEAD_HASH --plain || exit 1)" - echo "Affected libs ${AFFECTED_LIBS}" - AFFECTED_E2E="$(./scripts/git-util/affected-folder.sh -b $TRAVIS_BRANCH -f "e2e/$CONTEXT_ENV")"; - echo "Affected e2e ${AFFECTED_E2E}" -fi; - -RUN_E2E=$(echo ./scripts/test-e2e-lib.sh -host http://localhost:4200 -proxy "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" -host_sso "$HOST_SSO" -identity_admin_email "$E2E_ADMIN_EMAIL_IDENTITY" -identity_admin_password "$E2E_ADMIN_PASSWORD_IDENTITY" -prefix $TRAVIS_BUILD_NUMBER --use-dist ) - -if [[ $AFFECTED_LIBS =~ "testing" || $AFFECTED_LIBS =~ "$CONTEXT_ENV" || "${TRAVIS_EVENT_TYPE}" == "push" || "${TRAVIS_EVENT_TYPE}" == "api" ]]; then - echo "Run all e2e $CONTEXT_ENV" - $RUN_E2E --folder $CONTEXT_ENV -else if [[ $AFFECTED_E2E == "e2e/$CONTEXT_ENV" ]]; then - echo "Run affected e2e" - HEAD_SHA_BRANCH="$(git merge-base origin/$TRAVIS_BRANCH HEAD)" - LIST_SPECS="$(git diff --name-only $HEAD_SHA_BRANCH HEAD | grep "^e2e/$CONTEXT_ENV/" | paste -sd , -)" - - echo "Run $CONTEXT_ENV e2e based on the sha $HEAD_SHA_BRANCH with the specs: "$LIST_SPECS - - if [[ $LIST_SPECS != "" ]]; - then - $RUN_E2E --specs "$LIST_SPECS" - fi - fi -fi; diff --git a/scripts/travis/e2e/process-services-e2e.sh b/scripts/travis/e2e/process-services-e2e.sh deleted file mode 100755 index f7a8e3cf65a..00000000000 --- a/scripts/travis/e2e/process-services-e2e.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/usr/bin/env bash - -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" - -cd $DIR/../../../ - -export PROVIDER='BPM' -export AUTH_TYPE="OAUTH" - -echo "Start process services e2e" - -if [ "${TRAVIS_EVENT_TYPE}" == "pull_request" ]; then - echo "Calculate affected e2e $BASE_HASH $HEAD_HASH" - echo "nx affected:libs --base=$BASE_HASH --head=$HEAD_HASH --plain" - AFFECTED_LIBS="$(nx affected:libs --base=$BASE_HASH --head=$HEAD_HASH --plain || exit 1)" - echo "Affected libs ${AFFECTED_LIBS}" - AFFECTED_E2E="$(./scripts/git-util/affected-folder.sh -b $TRAVIS_BRANCH -f "e2e/$CONTEXT_ENV")"; - echo "Affected e2e ${AFFECTED_E2E}" -fi; - -RUN_E2E=$(echo ./scripts/test-e2e-lib.sh -host http://localhost:4200 -proxy "$E2E_HOST" -host_sso "$HOST_SSO" -identity_admin_email "$E2E_ADMIN_EMAIL_IDENTITY" -identity_admin_password "$E2E_ADMIN_PASSWORD_IDENTITY" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" --use-dist || exit 1) - -if [[ $AFFECTED_LIBS =~ "testing" || $AFFECTED_LIBS =~ "$CONTEXT_ENV" || "${TRAVIS_EVENT_TYPE}" == "push" || "${TRAVIS_EVENT_TYPE}" == "api" ]]; then - echo "Run all e2e $CONTEXT_ENV" - $RUN_E2E --folder $CONTEXT_ENV -else if [[ $AFFECTED_E2E == "e2e/$CONTEXT_ENV" ]]; then - echo "Run affected e2e" - - HEAD_SHA_BRANCH="$(git merge-base origin/$TRAVIS_BRANCH HEAD)" - LIST_SPECS="$(git diff --name-only $HEAD_SHA_BRANCH HEAD | grep "^e2e/$CONTEXT_ENV/" | paste -sd , -)" - - echo "Run $CONTEXT_ENV e2e based on the sha $HEAD_SHA_BRANCH with the specs: "$LIST_SPECS - - if [[ $LIST_SPECS != "" ]]; - then - $RUN_E2E --specs "$LIST_SPECS" - fi - fi -fi; diff --git a/scripts/travis/e2e/search-e2e.sh b/scripts/travis/e2e/search-e2e.sh deleted file mode 100755 index 17e4d06466e..00000000000 --- a/scripts/travis/e2e/search-e2e.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/usr/bin/env bash - -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" - -echo "Start search e2e" - -cd $DIR/../../../ - -export CONTEXT_ENV="search" -export PROVIDER='ECM' -export AUTH_TYPE='BASIC' - -if [ "${TRAVIS_EVENT_TYPE}" == "pull_request" ];then - echo "Calculate affected e2e $BASE_HASH $HEAD_HASH" - echo "nx affected:libs --base=$BASE_HASH --head=$HEAD_HASH --plain" - AFFECTED_LIBS="$(nx affected:libs --base=$BASE_HASH --head=$HEAD_HASH --plain || exit 1)" - echo "Affected libs ${AFFECTED_LIBS}" - AFFECTED_E2E="$(./scripts/git-util/affected-folder.sh -b $TRAVIS_BRANCH -f "e2e/$CONTEXT_ENV")"; - echo "Affected e2e ${AFFECTED_E2E}" -fi; - -RUN_E2E=$(echo ./scripts/test-e2e-lib.sh -host http://localhost:4200 -proxy "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" --use-dist || exit 1) - -if [[ $AFFECTED_LIBS =~ "testing" || $AFFECTED_LIBS =~ "content-services" || "${TRAVIS_EVENT_TYPE}" == "push" || "${TRAVIS_EVENT_TYPE}" == "api" ]]; -then - $RUN_E2E --folder $CONTEXT_ENV -else if [[ $AFFECTED_E2E == "e2e/$CONTEXT_ENV" ]]; - then - HEAD_SHA_BRANCH="$(git merge-base origin/$TRAVIS_BRANCH HEAD)" - LIST_SPECS="$(git diff --name-only $HEAD_SHA_BRANCH HEAD | grep "^e2e/$CONTEXT_ENV" | paste -sd , -)" - - echo "Run $CONTEXT_ENV e2e based on the sha $HEAD_SHA_BRANCH with the specs: "$LIST_SPECS - - if [[ $LIST_SPECS != "" ]]; - then - $RUN_E2E --specs "$LIST_SPECS" - fi - fi -fi;