mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2026-09-09 18:03:21 +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:
@@ -8,7 +8,7 @@ inputs:
|
||||
default: 'false'
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
steps:
|
||||
- name: Before install
|
||||
if: ${{ ! env.ACT }}
|
||||
shell: bash
|
||||
@@ -22,7 +22,7 @@ runs:
|
||||
echo "GIT_HASH=$(git rev-parse HEAD)";
|
||||
echo "BASE_HASH=$(git merge-base origin/${GITHUB_BASE_REF} HEAD)";
|
||||
echo "HEAD_HASH=HEAD";
|
||||
echo "HEAD_COMMIT_HASH=${TRAVIS_PULL_REQUEST_SHA:-${TRAVIS_COMMIT}}";
|
||||
echo "HEAD_COMMIT_HASH=${GH_COMMIT}";
|
||||
echo "NX_CALCULATION_FLAGS=--all";
|
||||
echo "BUILD_OPTS=--configuration production";
|
||||
echo CI_FORCE_RUN=false;
|
||||
@@ -35,7 +35,7 @@ runs:
|
||||
run: |
|
||||
echo "Setting up CI to run with commit flag [affected:*] flag."
|
||||
echo "BREAK_ACTION=true" >> $GITHUB_ENV
|
||||
|
||||
|
||||
- name: ci:force flag parser
|
||||
shell: bash
|
||||
if: ${{ contains(github.event.head_commit.message , '[ci:force]') }}
|
||||
@@ -76,8 +76,8 @@ runs:
|
||||
- name: SCHEDULE event
|
||||
if: ${{ github.event_name == 'schedule' }}
|
||||
shell: bash
|
||||
env:
|
||||
EV_NAME: ${{ github.event_name }}
|
||||
env:
|
||||
EV_NAME: ${{ github.event_name }}
|
||||
run: |
|
||||
echo "Setting up CI to run on SCHEDULE"
|
||||
echo "NX_CALCULATION_FLAGS=--all" >> $GITHUB_ENV
|
||||
|
||||
@@ -149,9 +149,9 @@ runs:
|
||||
export DISPLAY=:99
|
||||
chromedriver --url-base=/wd/hub &
|
||||
sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 & # optional
|
||||
bash ./scripts/travis/e2e/e2e.sh "$E2E_TEST_ID" "browser" || exit 1
|
||||
bash ./scripts/github/e2e/e2e.sh "$E2E_TEST_ID" "browser" || exit 1
|
||||
else
|
||||
bash ./scripts/travis/e2e/e2e.sh "$E2E_TEST_ID" || exit 1
|
||||
bash ./scripts/github/e2e/e2e.sh "$E2E_TEST_ID" || exit 1
|
||||
fi
|
||||
|
||||
- name: upload artifacts on gh
|
||||
|
||||
@@ -11,8 +11,8 @@ runs:
|
||||
using: "composite"
|
||||
|
||||
steps:
|
||||
- name: load "TRAVIS_EVENT_TYPE"
|
||||
uses: ./.github/actions/travis-env-var-facade
|
||||
- name: load "NPM TAG"
|
||||
uses: ./.github/actions/set-npm-tag
|
||||
with:
|
||||
branch_name: ${{ inputs.branch_name }}
|
||||
- name: check npm bundle
|
||||
@@ -22,7 +22,7 @@ runs:
|
||||
if [[ -z $TAG_NPM ]]; then
|
||||
echo "TAG_NPM not set, aborting"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
ADF_VERSION=$(npm view @alfresco/adf-core@${TAG_NPM} version)
|
||||
echo "check bundle on TAG_NPM='${TAG_NPM}' and ADF_VERSION='${ADF_VERSION}'"
|
||||
./scripts/travis/build/npm-check-bundles.sh -v ${ADF_VERSION}
|
||||
./scripts/github/build/npm-check-bundles.sh -v ${ADF_VERSION}
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
name: "set npm tag"
|
||||
description: "se NPM tag"
|
||||
|
||||
inputs:
|
||||
event_name:
|
||||
description: "override github.event_name"
|
||||
required: false
|
||||
default: ${{ github.event_name }}
|
||||
branch_name:
|
||||
description: "override GITHUB_REF_NAME"
|
||||
required: false
|
||||
default: $GITHUB_REF_NAME
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
|
||||
- name: set TAG_NPM
|
||||
shell: bash
|
||||
run: |
|
||||
TAG_NPM="alpha"
|
||||
VERSION_IN_PACKAGE_JSON=$(node -p "require('./package.json')".version)
|
||||
echo "version in package.json=${VERSION_IN_PACKAGE_JSON}"
|
||||
if [[ ${{ inputs.branch_name }} =~ ^master(-patch.*)?$ ]]; then
|
||||
# Pre-release versions
|
||||
if [[ $VERSION_IN_PACKAGE_JSON =~ ^[0-9]*\.[0-9]*\.[0-9]*-A\.[0-9]*$ ]];
|
||||
then
|
||||
TAG_NPM=next
|
||||
# Stable major versions
|
||||
else
|
||||
TAG_NPM=latest
|
||||
fi
|
||||
fi
|
||||
if [[ ${{ inputs.branch_name }} =~ ^develop(-patch.*)?$ ]]; then
|
||||
TAG_NPM=alpha
|
||||
fi
|
||||
echo "TAG_NPM=${TAG_NPM}" >> $GITHUB_ENV
|
||||
@@ -50,13 +50,8 @@ runs:
|
||||
key: ${{ runner.os }}-pip-
|
||||
restore-keys: |
|
||||
${{ runner.os }}
|
||||
# ENV LOAD
|
||||
- name: load .travis.yml env.global variables
|
||||
uses: Alfresco/alfresco-build-tools/.github/actions/travis-env-load@v1.17.0
|
||||
with:
|
||||
yml_path: .travis.yml
|
||||
- name: load "TRAVIS_EVENT_TYPE"
|
||||
uses: ./.github/actions/travis-env-var-facade
|
||||
- name: load "NPM TAG"
|
||||
uses: ./.github/actions/set-npm-tag
|
||||
- name: before install script
|
||||
uses: ./.github/actions/before-install
|
||||
with:
|
||||
|
||||
@@ -1,61 +0,0 @@
|
||||
# TRAVIS_EVENT_TYPE= Indicates how the build was triggered. One of push, pull_request, api, cron
|
||||
name: "travis-event-type-env-var"
|
||||
description: "Mimic loading of a TRAVIS_EVENT_TYPE env var"
|
||||
|
||||
inputs:
|
||||
event_name:
|
||||
description: "override github.event_name"
|
||||
required: false
|
||||
default: ${{ github.event_name }}
|
||||
branch_name:
|
||||
description: "override GITHUB_REF_NAME"
|
||||
required: false
|
||||
default: $GITHUB_REF_NAME
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Parse env global
|
||||
shell: bash
|
||||
run: |
|
||||
echo "input branch_name='${{ inputs.branch_name }}'"
|
||||
EVENT_TYPE=""
|
||||
TRAVIS_PULL_REQUEST_BRANCH=""
|
||||
TRAVIS_BRANCH=""
|
||||
TAG_NPM="alpha"
|
||||
REGEX="(repository|workflow)_dispatch"
|
||||
if [[ "${{ inputs.event_name }}" == "schedule" ]]; then
|
||||
EVENT_TYPE="cron";
|
||||
elif [[ "${{ inputs.event_name }}" == "pull_request" ]]; then
|
||||
EVENT_TYPE="pull_request";
|
||||
TRAVIS_BRANCH=${GITHUB_BASE_REF}
|
||||
TRAVIS_PULL_REQUEST_BRANCH=${GITHUB_BASE_REF}
|
||||
elif [[ "${{ inputs.event_name }}" == "push" ]]; then
|
||||
EVENT_TYPE="push";
|
||||
TRAVIS_BRANCH=${GITHUB_REF##*/}
|
||||
elif [[ "${{ inputs.event_name }}" =~ $REGEX ]]; then
|
||||
EVENT_TYPE="api";
|
||||
fi
|
||||
echo "TRAVIS_EVENT_TYPE=${EVENT_TYPE}" >> $GITHUB_ENV
|
||||
echo "TRAVIS_PULL_REQUEST_BRANCH=${TRAVIS_PULL_REQUEST_BRANCH}" >> $GITHUB_ENV
|
||||
echo "TRAVIS_BRANCH=${TRAVIS_BRANCH}" >> $GITHUB_ENV
|
||||
|
||||
- name: set TAG_NPM
|
||||
shell: bash
|
||||
run: |
|
||||
VERSION_IN_PACKAGE_JSON=$(node -p "require('./package.json')".version)
|
||||
echo "version in package.json=${VERSION_IN_PACKAGE_JSON}"
|
||||
if [[ ${{ inputs.branch_name }} =~ ^master(-patch.*)?$ ]]; then
|
||||
# Pre-release versions
|
||||
if [[ $VERSION_IN_PACKAGE_JSON =~ ^[0-9]*\.[0-9]*\.[0-9]*-A\.[0-9]*$ ]];
|
||||
then
|
||||
TAG_NPM=next
|
||||
# Stable major versions
|
||||
else
|
||||
TAG_NPM=latest
|
||||
fi
|
||||
fi
|
||||
if [[ ${{ inputs.branch_name }} =~ ^develop(-patch.*)?$ ]]; then
|
||||
TAG_NPM=alpha
|
||||
fi
|
||||
echo "TAG_NPM=${TAG_NPM}" >> $GITHUB_ENV
|
||||
Reference in New Issue
Block a user