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:
Maurizio Cacace
2023-02-28 15:36:22 +01:00
committed by GitHub
parent 2bc74f012d
commit fc224713f2
37 changed files with 191 additions and 198 deletions

View File

@@ -14,21 +14,22 @@ export GIT_HASH=$(git rev-parse HEAD)
# Settings for Nx ---------------------------------------------------------------------
export BASE_HASH="$(git merge-base origin/"$TRAVIS_BRANCH" HEAD)"
export BASE_HASH="$(git merge-base origin/"$GITHUB_BASE_REF" HEAD)"
export HEAD_HASH="HEAD"
export HEAD_COMMIT_HASH=${TRAVIS_PULL_REQUEST_SHA:-${TRAVIS_COMMIT}}
export HEAD_COMMIT_HASH=${GH_COMMIT}
export COMMIT_MESSAGE=$(git log --format=%B -n 1 "$HEAD_COMMIT_HASH")
#########################################################################################
# Settings based of Travis event type
# Settings based of Github event type
#########################################################################################
if [ "${TRAVIS_EVENT_TYPE}" == "push" ]; then
if [ "${GITHUB_EVENT_NAME}" == "push" ]; then
# Settings for merges ---------------------------------------------------------------
if [[ "$TRAVIS_BRANCH" =~ ^master(-patch.*)?$ ]]; then
BRANCH=${GITHUB_REF##*/}
if [[ "$BRANCH" =~ ^master(-patch.*)?$ ]]; then
# into master(-patch*)
export NX_CALCULATION_FLAGS="--all"
export BUILD_OPTS="--configuration production"
elif [[ "$TRAVIS_BRANCH" =~ ^develop-patch.*$ ]]; then
elif [[ "$BRANCH" =~ ^develop-patch.*$ ]]; then
# into develop-patch*
echo -e "\e[32mSetting up CI jobs for patch version creation.\e[0m"
export NX_CALCULATION_FLAGS="--all"
@@ -38,11 +39,11 @@ if [ "${TRAVIS_EVENT_TYPE}" == "push" ]; then
export NX_CALCULATION_FLAGS="--base=$(git describe --tags $(git rev-list --tags --max-count=1)) --head=$HEAD_HASH"
export BUILD_OPTS="--configuration production"
fi
elif [ "${TRAVIS_EVENT_TYPE}" == "pull_request" ]; then
elif [ "${GITHUB_EVENT_NAME}" == "pull_request" ]; then
# Settings for PRs ------------------------------------------------------------------
export NX_CALCULATION_FLAGS="--base=origin/$TRAVIS_BRANCH --head=$HEAD_HASH"
export NX_CALCULATION_FLAGS="--base=origin/$GITHUB_BASE_REF --head=$HEAD_HASH"
export BUILD_OPTS="--configuration production"
elif [ "${TRAVIS_EVENT_TYPE}" == "cron" ]; then
elif [ "${GITHUB_EVENT_NAME}" == "schedule" ]; then
# Settings for Cron -----------------------------------------------------------------
export NX_CALCULATION_FLAGS="--all"
export BUILD_OPTS="--configuration production"
@@ -50,20 +51,18 @@ else
# Settings for API ------------------------------------------------------------------
export NX_CALCULATION_FLAGS="--all"
export BUILD_OPTS="--configuration production"
# In case of manual Travis run use the commit message from travis and not the one from git
COMMIT_MESSAGE=$TRAVIS_COMMIT_MESSAGE
fi
# Settings for S3 caching -------------------------------------------------------------
pip install --user awscli
if [ "${TRAVIS_EVENT_TYPE}" == "push" ]; then
if [ "${GITHUB_EVENT_NAME}" == "push" ]; then
echo "push"
elif [ "${TRAVIS_EVENT_TYPE}" == "pull_request" ]; then
elif [ "${GITHUB_EVENT_NAME}" == "pull_request" ]; then
echo "pull_request"
export BASE_HASH="origin/$TRAVIS_BRANCH"
export BASE_HASH="origin/$GITHUB_BASE_REF"
source "$PARENT_DIR/partials/_ci-flags-parser.sh"
elif [ "${TRAVIS_EVENT_TYPE}" == "cron" ]; then
elif [ "${GITHUB_EVENT_NAME}" == "schedule" ]; then
echo "cron"
else
echo "api"

View File

@@ -7,7 +7,7 @@ npm ci
# The adf-cli is not installed through NPM for this reason it needs to be built
# in addition the dist folder needs to be moved as part of the node modules
# in this way every check like check-cs check-ps can use the adf cli
# the bundle is saved under node_modules also to use the same cache of travis
# the bundle is saved under node_modules also to use the same cache of github
nx run cli:bundle
# The adf-testing is not installed through NPM for this reason it needs to be built
# in addition the dist folder needs to be moved as part of the node modules