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"
|
||||
name: "Process Cloud: Storybook 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:
|
||||
use:
|
||||
- built_libs_cache
|
||||
@@ -195,7 +195,7 @@ 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/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
|
||||
workspaces:
|
||||
create:
|
||||
@@ -216,7 +216,7 @@ jobs:
|
||||
before_script:
|
||||
- ./scripts/ci/job_hooks/before_e2e.sh
|
||||
- ./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
|
||||
workspaces:
|
||||
create:
|
||||
@@ -237,7 +237,7 @@ jobs:
|
||||
before_script:
|
||||
- ./scripts/ci/job_hooks/before_e2e.sh
|
||||
- ./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
|
||||
workspaces:
|
||||
create:
|
||||
@@ -258,7 +258,7 @@ jobs:
|
||||
before_script:
|
||||
- ./scripts/ci/job_hooks/before_e2e.sh
|
||||
- ./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
|
||||
workspaces:
|
||||
create:
|
||||
@@ -279,7 +279,7 @@ jobs:
|
||||
before_script:
|
||||
- ./scripts/ci/job_hooks/before_e2e.sh
|
||||
- ./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
|
||||
workspaces:
|
||||
create:
|
||||
@@ -300,7 +300,7 @@ jobs:
|
||||
before_script:
|
||||
- ./scripts/ci/job_hooks/before_e2e.sh
|
||||
- ./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
|
||||
workspaces:
|
||||
create:
|
||||
@@ -321,7 +321,7 @@ jobs:
|
||||
before_script:
|
||||
- ./scripts/ci/job_hooks/before_e2e.sh
|
||||
- ./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
|
||||
workspaces:
|
||||
create:
|
||||
@@ -343,7 +343,7 @@ jobs:
|
||||
- ./scripts/ci/job_hooks/before_e2e.sh
|
||||
- ./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/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
|
||||
workspaces:
|
||||
create:
|
||||
@@ -365,7 +365,7 @@ jobs:
|
||||
- ./scripts/ci/job_hooks/before_e2e.sh
|
||||
- ./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/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
|
||||
workspaces:
|
||||
create:
|
||||
@@ -387,7 +387,7 @@ jobs:
|
||||
- ./scripts/ci/job_hooks/before_e2e.sh
|
||||
- ./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/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
|
||||
workspaces:
|
||||
create:
|
||||
@@ -409,7 +409,7 @@ jobs:
|
||||
- ./scripts/ci/job_hooks/before_e2e.sh
|
||||
- ./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/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
|
||||
workspaces:
|
||||
create:
|
||||
@@ -431,7 +431,7 @@ 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/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
|
||||
workspaces:
|
||||
create:
|
||||
@@ -454,7 +454,7 @@ 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/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
|
||||
workspaces:
|
||||
create:
|
||||
@@ -477,7 +477,7 @@ 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/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
|
||||
workspaces:
|
||||
create:
|
||||
@@ -500,7 +500,7 @@ 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/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
|
||||
workspaces:
|
||||
create:
|
||||
@@ -523,7 +523,7 @@ 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/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
|
||||
workspaces:
|
||||
create:
|
||||
|
@@ -23,7 +23,4 @@ echo "====== Run testing ====="
|
||||
echo "====== Run Cli ====="
|
||||
./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/../../
|
||||
|
||||
if [ "${TRAVIS_EVENT_TYPE}" == "cron" ]; then
|
||||
echo "Affected not check in case of cron"
|
||||
exit 0
|
||||
#echo "Affected not check in case of cron"
|
||||
echo true
|
||||
fi
|
||||
AFFECTED_LIBS="$(nx print-affected --type=lib --select=projects --base=$BASE_HASH --head=$HEAD_HASH --plain || exit 1)"
|
||||
echo "Verify if affected build contains $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 "Affected libs:$AFFECTED_LIBS"
|
||||
#echo "Affected libs:$AFFECTED_LIBS"
|
||||
if [[ $AFFECTED_LIBS =~ $verifyLib ]]; then
|
||||
echo "Yep project:$verifyLib is affected carry on"
|
||||
exit 0
|
||||
#echo "Yep project:$verifyLib is affected carry on"
|
||||
echo true
|
||||
else
|
||||
echo "Nope project NOT affected save time"
|
||||
exit 1
|
||||
#echo "Nope project NOT affected save time"
|
||||
echo false
|
||||
fi;
|
||||
|
@@ -7,6 +7,12 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
cd $DIR/../../../
|
||||
|
||||
BASE_DIRECTORY=$(echo "$FOLDER" | cut -d "/" -f1)
|
||||
verifyLib=$1;
|
||||
echo "Step1 - Verify if affected libs contains $verifyLib"
|
||||
|
||||
AFFECTED_LIB="$(./scripts/travis/affected-contains.sh $verifyLib )";
|
||||
if [ ${AFFECTED_LIB} == true ]; then
|
||||
echo "Step2 - $verifyLib affected... will execute e2e"
|
||||
|
||||
if [ "${TRAVIS_EVENT_TYPE}" == "pull_request" ]; then
|
||||
echo "Calculate affected e2e $BASE_HASH $HEAD_HASH"
|
||||
@@ -33,3 +39,8 @@ else if [[ $AFFECTED_E2E == "e2e/$FOLDER" ]]; then
|
||||
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