mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
AAE-11918A - remove travis env var (#8312)
* AAE-11918 - travis_branch env removal * AAE-11918 - travis_branch env removal * event_type and travis_pull_request_branch env removal * e travis_build_dir, travis_build_number, travis_commit env removal * rename scripts path * remove .travis file * remove .travis file * remove .travis file * just a commit * trying to fix e2e test * fix e2e issue * remove action load travis env * with action travis env var load * remove action travis load env vars * remove action travis load env vars * remove action travis load env vars * last check * test release flow in dry-run * final check for review * fix env variables * fix env variables * fix env variables * remove devel flag * revert renaming action facade * git mv commit * git mv commit
This commit is contained in:
59
scripts/github/e2e/e2e.sh
Executable file
59
scripts/github/e2e/e2e.sh
Executable file
@@ -0,0 +1,59 @@
|
||||
#!/usr/bin/env bash
|
||||
echo "Start e2e"
|
||||
set -e
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
cd $DIR/../../../
|
||||
|
||||
BASE_DIRECTORY=$(echo "$FOLDER" | cut -d "/" -f1)
|
||||
verifyLib=$1;
|
||||
REGEX="(repository|workflow)_dispatch"
|
||||
|
||||
# set test-e2e params
|
||||
if [ -n "$2" ]; then
|
||||
e2eParams="--$2"
|
||||
else
|
||||
e2eParams=""
|
||||
fi
|
||||
|
||||
echo "Step1 - Verify if affected libs contains $verifyLib"
|
||||
|
||||
AFFECTED_LIB=$(./scripts/github/affected-contains.sh $verifyLib )
|
||||
|
||||
if [ ${AFFECTED_LIB} == true ]; then
|
||||
echo "Step2 - $verifyLib affected... will execute e2e"
|
||||
|
||||
if [ "${GITHUB_EVENT_NAME}" == "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 $GITHUB_BASE_REF -f "e2e/$FOLDER")";
|
||||
echo "Affected e2e ${AFFECTED_E2E}"
|
||||
fi;
|
||||
|
||||
if [ "${GITHUB_EVENT_NAME}" == "schedule" ]; then
|
||||
echo "CRON running everything "
|
||||
fi;
|
||||
|
||||
if [[ $AFFECTED_LIBS =~ "testing" || $AFFECTED_LIBS =~ "$BASE_DIRECTORY" || "${GITHUB_EVENT_NAME}" == "push" || "${GITHUB_EVENT_NAME}" == "$REGEX" || "${GITHUB_EVENT_NAME}" == "schedule" ]]; then
|
||||
echo "Run all e2e $FOLDER"
|
||||
./scripts/test-e2e-lib.sh --use-dist $e2eParams
|
||||
else if [[ $AFFECTED_E2E == "e2e/$FOLDER" ]]; then
|
||||
echo "Run affected e2e"
|
||||
|
||||
HEAD_SHA_BRANCH="$(git merge-base origin/$GITHUB_HEAD_REF 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 $e2eParams
|
||||
fi
|
||||
fi
|
||||
fi;
|
||||
|
||||
else
|
||||
echo "Step2 - Lib $verifyLib NOT affected. No need to run e2e"
|
||||
exit 0
|
||||
fi
|
Reference in New Issue
Block a user