mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
Short circuit e2e in case lib not affected (#7801)
* Short circuit e2e in case lib not affected * Use base and head * Remove useless schema * Run everything on cron
This commit is contained in:
34
.travis.yml
34
.travis.yml
@@ -183,7 +183,7 @@ jobs:
|
|||||||
- stage: "e2e Test"
|
- stage: "e2e Test"
|
||||||
name: "Process Cloud: Storybook Playwright"
|
name: "Process Cloud: Storybook Playwright"
|
||||||
before_script: ./scripts/ci/jobs/dbpci-before-playwright
|
before_script: ./scripts/ci/jobs/dbpci-before-playwright
|
||||||
script: ./scripts/travis/affected-contains.sh "process-services-cloud" && ./scripts/travis/storybook-testing/storybook-test.sh
|
script: ./scripts/travis/storybook-testing/storybook-test.sh
|
||||||
workspaces:
|
workspaces:
|
||||||
use:
|
use:
|
||||||
- built_libs_cache
|
- built_libs_cache
|
||||||
@@ -195,7 +195,7 @@ jobs:
|
|||||||
- ./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
|
||||||
- ./scripts/ci/check-env/check-ps-env.sh || travis_terminate 1
|
- ./scripts/ci/check-env/check-ps-env.sh || travis_terminate 1
|
||||||
script: ./scripts/travis/affected-contains.sh "core" && ./scripts/travis/e2e/e2e.sh
|
script: ./scripts/travis/e2e/e2e.sh "core"
|
||||||
after_script: ./scripts/ci/job_hooks/after_e2e.sh
|
after_script: ./scripts/ci/job_hooks/after_e2e.sh
|
||||||
workspaces:
|
workspaces:
|
||||||
create:
|
create:
|
||||||
@@ -216,7 +216,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/affected-contains.sh "content-services" && ./scripts/travis/e2e/e2e.sh
|
script: ./scripts/travis/e2e/e2e.sh "content-services"
|
||||||
after_script: ./scripts/ci/job_hooks/after_e2e.sh
|
after_script: ./scripts/ci/job_hooks/after_e2e.sh
|
||||||
workspaces:
|
workspaces:
|
||||||
create:
|
create:
|
||||||
@@ -237,7 +237,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/affected-contains.sh "content-services" && ./scripts/travis/e2e/e2e.sh
|
script: ./scripts/travis/e2e/e2e.sh "content-services"
|
||||||
after_script: ./scripts/ci/job_hooks/after_e2e.sh
|
after_script: ./scripts/ci/job_hooks/after_e2e.sh
|
||||||
workspaces:
|
workspaces:
|
||||||
create:
|
create:
|
||||||
@@ -258,7 +258,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/affected-contains.sh "content-services" && ./scripts/travis/e2e/e2e.sh
|
script: ./scripts/travis/e2e/e2e.sh "content-services"
|
||||||
after_script: ./scripts/ci/job_hooks/after_e2e.sh
|
after_script: ./scripts/ci/job_hooks/after_e2e.sh
|
||||||
workspaces:
|
workspaces:
|
||||||
create:
|
create:
|
||||||
@@ -279,7 +279,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/affected-contains.sh "content-services" && ./scripts/travis/e2e/e2e.sh
|
script: ./scripts/travis/e2e/e2e.sh "content-services"
|
||||||
after_script: ./scripts/ci/job_hooks/after_e2e.sh
|
after_script: ./scripts/ci/job_hooks/after_e2e.sh
|
||||||
workspaces:
|
workspaces:
|
||||||
create:
|
create:
|
||||||
@@ -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/affected-contains.sh "content-services" && ./scripts/travis/e2e/e2e.sh
|
script: ./scripts/travis/e2e/e2e.sh "content-services"
|
||||||
after_script: ./scripts/ci/job_hooks/after_e2e.sh
|
after_script: ./scripts/ci/job_hooks/after_e2e.sh
|
||||||
workspaces:
|
workspaces:
|
||||||
create:
|
create:
|
||||||
@@ -321,7 +321,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/affected-contains.sh "content-services" && ./scripts/travis/e2e/e2e.sh
|
script: ./scripts/travis/e2e/e2e.sh "content-services"
|
||||||
after_script: ./scripts/ci/job_hooks/after_e2e.sh
|
after_script: ./scripts/ci/job_hooks/after_e2e.sh
|
||||||
workspaces:
|
workspaces:
|
||||||
create:
|
create:
|
||||||
@@ -343,7 +343,7 @@ jobs:
|
|||||||
- ./scripts/ci/job_hooks/before_e2e.sh
|
- ./scripts/ci/job_hooks/before_e2e.sh
|
||||||
- ./scripts/ci/check-env/check-ps-env.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
|
- ./scripts/ci/check-env/check-external-cs-env.sh || travis_terminate 1
|
||||||
script: ./scripts/travis/affected-contains.sh "process-services" && ./scripts/travis/e2e/e2e.sh
|
script: ./scripts/travis/e2e/e2e.sh "process-services"
|
||||||
after_script: ./scripts/ci/job_hooks/after_e2e.sh
|
after_script: ./scripts/ci/job_hooks/after_e2e.sh
|
||||||
workspaces:
|
workspaces:
|
||||||
create:
|
create:
|
||||||
@@ -365,7 +365,7 @@ jobs:
|
|||||||
- ./scripts/ci/job_hooks/before_e2e.sh
|
- ./scripts/ci/job_hooks/before_e2e.sh
|
||||||
- ./scripts/ci/check-env/check-ps-env.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
|
- ./scripts/ci/check-env/check-external-cs-env.sh || travis_terminate 1
|
||||||
script: ./scripts/travis/affected-contains.sh "process-services" && ./scripts/travis/e2e/e2e.sh
|
script: ./scripts/travis/e2e/e2e.sh "process-services"
|
||||||
after_script: ./scripts/ci/job_hooks/after_e2e.sh
|
after_script: ./scripts/ci/job_hooks/after_e2e.sh
|
||||||
workspaces:
|
workspaces:
|
||||||
create:
|
create:
|
||||||
@@ -387,7 +387,7 @@ jobs:
|
|||||||
- ./scripts/ci/job_hooks/before_e2e.sh
|
- ./scripts/ci/job_hooks/before_e2e.sh
|
||||||
- ./scripts/ci/check-env/check-ps-env.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
|
- ./scripts/ci/check-env/check-external-cs-env.sh || travis_terminate 1
|
||||||
script: ./scripts/travis/affected-contains.sh "process-services" && ./scripts/travis/e2e/e2e.sh
|
script: ./scripts/travis/e2e/e2e.sh "process-services"
|
||||||
after_script: ./scripts/ci/job_hooks/after_e2e.sh
|
after_script: ./scripts/ci/job_hooks/after_e2e.sh
|
||||||
workspaces:
|
workspaces:
|
||||||
create:
|
create:
|
||||||
@@ -409,7 +409,7 @@ jobs:
|
|||||||
- ./scripts/ci/job_hooks/before_e2e.sh
|
- ./scripts/ci/job_hooks/before_e2e.sh
|
||||||
- ./scripts/ci/check-env/check-ps-env.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
|
- ./scripts/ci/check-env/check-external-cs-env.sh || travis_terminate 1
|
||||||
script: ./scripts/travis/affected-contains.sh "process-services" && ./scripts/travis/e2e/e2e.sh
|
script: ./scripts/travis/e2e/e2e.sh "process-services"
|
||||||
after_script: ./scripts/ci/job_hooks/after_e2e.sh
|
after_script: ./scripts/ci/job_hooks/after_e2e.sh
|
||||||
workspaces:
|
workspaces:
|
||||||
create:
|
create:
|
||||||
@@ -431,7 +431,7 @@ jobs:
|
|||||||
- ./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
|
||||||
- ./scripts/ci/check-env/check-ps-cloud-env.sh || travis_terminate 1
|
- ./scripts/ci/check-env/check-ps-cloud-env.sh || travis_terminate 1
|
||||||
script: ./scripts/travis/affected-contains.sh "process-services-cloud" && ./scripts/travis/e2e/e2e.sh
|
script: ./scripts/travis/e2e/e2e.sh "process-services-cloud"
|
||||||
after_script: ./scripts/ci/job_hooks/after_e2e.sh
|
after_script: ./scripts/ci/job_hooks/after_e2e.sh
|
||||||
workspaces:
|
workspaces:
|
||||||
create:
|
create:
|
||||||
@@ -454,7 +454,7 @@ jobs:
|
|||||||
- ./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
|
||||||
- ./scripts/ci/check-env/check-ps-cloud-env.sh || travis_terminate 1
|
- ./scripts/ci/check-env/check-ps-cloud-env.sh || travis_terminate 1
|
||||||
script: ./scripts/travis/affected-contains.sh "process-services-cloud" && ./scripts/travis/e2e/e2e.sh
|
script: ./scripts/travis/e2e/e2e.sh "process-services-cloud"
|
||||||
after_script: ./scripts/ci/job_hooks/after_e2e.sh
|
after_script: ./scripts/ci/job_hooks/after_e2e.sh
|
||||||
workspaces:
|
workspaces:
|
||||||
create:
|
create:
|
||||||
@@ -477,7 +477,7 @@ jobs:
|
|||||||
- ./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
|
||||||
- ./scripts/ci/check-env/check-ps-cloud-env.sh || travis_terminate 1
|
- ./scripts/ci/check-env/check-ps-cloud-env.sh || travis_terminate 1
|
||||||
script: ./scripts/travis/affected-contains.sh "process-services-cloud" && ./scripts/travis/e2e/e2e.sh
|
script: ./scripts/travis/e2e/e2e.sh "process-services-cloud"
|
||||||
after_script: ./scripts/ci/job_hooks/after_e2e.sh
|
after_script: ./scripts/ci/job_hooks/after_e2e.sh
|
||||||
workspaces:
|
workspaces:
|
||||||
create:
|
create:
|
||||||
@@ -500,7 +500,7 @@ jobs:
|
|||||||
- ./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
|
||||||
- ./scripts/ci/check-env/check-ps-cloud-env.sh || travis_terminate 1
|
- ./scripts/ci/check-env/check-ps-cloud-env.sh || travis_terminate 1
|
||||||
script: ./scripts/travis/affected-contains.sh "process-services-cloud" && ./scripts/travis/e2e/e2e.sh
|
script: ./scripts/travis/e2e/e2e.sh "process-services-cloud"
|
||||||
after_script: ./scripts/ci/job_hooks/after_e2e.sh
|
after_script: ./scripts/ci/job_hooks/after_e2e.sh
|
||||||
workspaces:
|
workspaces:
|
||||||
create:
|
create:
|
||||||
@@ -523,7 +523,7 @@ jobs:
|
|||||||
- ./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
|
||||||
- ./scripts/ci/check-env/check-ps-cloud-env.sh || travis_terminate 1
|
- ./scripts/ci/check-env/check-ps-cloud-env.sh || travis_terminate 1
|
||||||
script: ./scripts/travis/affected-contains.sh "process-services-cloud" && ./scripts/travis/e2e/e2e.sh
|
script: ./scripts/travis/e2e/e2e.sh "process-services-cloud"
|
||||||
after_script: ./scripts/ci/job_hooks/after_e2e.sh
|
after_script: ./scripts/ci/job_hooks/after_e2e.sh
|
||||||
workspaces:
|
workspaces:
|
||||||
create:
|
create:
|
||||||
|
@@ -23,7 +23,4 @@ echo "====== Run testing ====="
|
|||||||
echo "====== Run Cli ====="
|
echo "====== Run Cli ====="
|
||||||
./scripts/build/build-cli.sh || exit 1
|
./scripts/build/build-cli.sh || exit 1
|
||||||
|
|
||||||
echo "====== Copy schema ====="
|
|
||||||
cp lib/core/src/lib/app-config/schema.json dist/libs/core/app.config.schema.json
|
|
||||||
|
|
||||||
|
|
||||||
|
@@ -5,18 +5,18 @@ verifyLib=$1;
|
|||||||
cd $DIR/../../
|
cd $DIR/../../
|
||||||
|
|
||||||
if [ "${TRAVIS_EVENT_TYPE}" == "cron" ]; then
|
if [ "${TRAVIS_EVENT_TYPE}" == "cron" ]; then
|
||||||
echo "Affected not check in case of cron"
|
#echo "Affected not check in case of cron"
|
||||||
exit 0
|
echo true
|
||||||
fi
|
fi
|
||||||
AFFECTED_LIBS="$(nx print-affected --type=lib --select=projects --base=$BASE_HASH --head=$HEAD_HASH --plain || exit 1)"
|
AFFECTED_LIBS="$(nx print-affected --type=lib --select=projects --base=$BASE_HASH --head=$HEAD_HASH --plain)"
|
||||||
echo "Verify if affected build contains $1"
|
#echo "Verify if affected build contains $1"
|
||||||
|
|
||||||
|
|
||||||
echo "Affected libs:$AFFECTED_LIBS"
|
#echo "Affected libs:$AFFECTED_LIBS"
|
||||||
if [[ $AFFECTED_LIBS =~ $verifyLib ]]; then
|
if [[ $AFFECTED_LIBS =~ $verifyLib ]]; then
|
||||||
echo "Yep project:$verifyLib is affected carry on"
|
#echo "Yep project:$verifyLib is affected carry on"
|
||||||
exit 0
|
echo true
|
||||||
else
|
else
|
||||||
echo "Nope project NOT affected save time"
|
#echo "Nope project NOT affected save time"
|
||||||
exit 1
|
echo false
|
||||||
fi;
|
fi;
|
||||||
|
@@ -7,29 +7,40 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|||||||
cd $DIR/../../../
|
cd $DIR/../../../
|
||||||
|
|
||||||
BASE_DIRECTORY=$(echo "$FOLDER" | cut -d "/" -f1)
|
BASE_DIRECTORY=$(echo "$FOLDER" | cut -d "/" -f1)
|
||||||
|
verifyLib=$1;
|
||||||
|
echo "Step1 - Verify if affected libs contains $verifyLib"
|
||||||
|
|
||||||
if [ "${TRAVIS_EVENT_TYPE}" == "pull_request" ]; then
|
AFFECTED_LIB="$(./scripts/travis/affected-contains.sh $verifyLib )";
|
||||||
echo "Calculate affected e2e $BASE_HASH $HEAD_HASH"
|
if [ ${AFFECTED_LIB} == true ]; then
|
||||||
echo "nx affected:libs --base=$BASE_HASH --head=$HEAD_HASH --plain"
|
echo "Step2 - $verifyLib affected... will execute e2e"
|
||||||
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" || "${TRAVIS_EVENT_TYPE}" == "cron" ]]; then
|
if [ "${TRAVIS_EVENT_TYPE}" == "pull_request" ]; then
|
||||||
echo "Run all e2e $FOLDER"
|
echo "Calculate affected e2e $BASE_HASH $HEAD_HASH"
|
||||||
./scripts/test-e2e-lib.sh --use-dist
|
echo "nx affected:libs --base=$BASE_HASH --head=$HEAD_HASH --plain"
|
||||||
else if [[ $AFFECTED_E2E == "e2e/$FOLDER" ]]; then
|
AFFECTED_LIBS="$(nx affected:libs --base=$BASE_HASH --head=$HEAD_HASH --plain || exit 1)"
|
||||||
echo "Run affected e2e"
|
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;
|
||||||
|
|
||||||
HEAD_SHA_BRANCH="$(git merge-base origin/$TRAVIS_BRANCH HEAD)"
|
if [[ $AFFECTED_LIBS =~ "testing" || $AFFECTED_LIBS =~ "$BASE_DIRECTORY" || "${TRAVIS_EVENT_TYPE}" == "push" || "${TRAVIS_EVENT_TYPE}" == "api" || "${TRAVIS_EVENT_TYPE}" == "cron" ]]; then
|
||||||
LIST_SPECS="$(git diff --name-only $HEAD_SHA_BRANCH HEAD | grep "^e2e/$FOLDER" | paste -sd , -)"
|
echo "Run all e2e $FOLDER"
|
||||||
|
./scripts/test-e2e-lib.sh --use-dist
|
||||||
|
else if [[ $AFFECTED_E2E == "e2e/$FOLDER" ]]; then
|
||||||
|
echo "Run affected e2e"
|
||||||
|
|
||||||
echo "Run $FOLDER e2e based on the sha $HEAD_SHA_BRANCH with the specs: "$LIST_SPECS
|
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 , -)"
|
||||||
|
|
||||||
if [[ $LIST_SPECS != "" ]]; then
|
echo "Run $FOLDER e2e based on the sha $HEAD_SHA_BRANCH with the specs: "$LIST_SPECS
|
||||||
./scripts/test-e2e-lib.sh --use-dist
|
|
||||||
|
if [[ $LIST_SPECS != "" ]]; then
|
||||||
|
./scripts/test-e2e-lib.sh --use-dist
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi;
|
||||||
fi;
|
|
||||||
|
else
|
||||||
|
echo "Step2 - Lib $verifyLib NOT affected. No need to run e2e"
|
||||||
|
fi
|
||||||
|
exit 0
|
||||||
|
Reference in New Issue
Block a user