mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-12 17:04:57 +00:00
[AAE-11817] fix release pipeline
fix release pipeline
This commit is contained in:
parent
8392e7cf7d
commit
48cadfaa27
74
.github/actions/before-install/action.yml
vendored
74
.github/actions/before-install/action.yml
vendored
@ -1,13 +1,79 @@
|
|||||||
name: "before-install"
|
name: "before-install"
|
||||||
description: "launch before_install.sh and then parse env vars"
|
description: "launch before_install.sh and then parse env vars"
|
||||||
|
inputs:
|
||||||
|
act:
|
||||||
|
description: 'enable act debug'
|
||||||
|
required: false
|
||||||
|
type: boolean
|
||||||
|
default: 'false'
|
||||||
runs:
|
runs:
|
||||||
using: "composite"
|
using: "composite"
|
||||||
steps:
|
steps:
|
||||||
- name: Before install
|
- name: Before install
|
||||||
|
if: ${{ ! env.ACT }}
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
bash -xv ./scripts/ci/job_hooks/before_install.sh "/tmp/github_vars.env"
|
pip install --user --quiet awscli
|
||||||
while read ENVVAR; do
|
|
||||||
echo "$ENVVAR" >> $GITHUB_ENV
|
|
||||||
done < "/tmp/github_vars.env"
|
|
||||||
|
|
||||||
|
- name: base vars
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
{
|
||||||
|
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 "NX_CALCULATION_FLAGS=--all";
|
||||||
|
echo "BUILD_OPTS=--configuration production";
|
||||||
|
echo CI_FORCE_RUN=false;
|
||||||
|
echo NODE_VERSION=$(node -v);
|
||||||
|
} >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: affected:* flag parser
|
||||||
|
shell: bash
|
||||||
|
if: ${{ contains(github.event.head_commit.message , '[affected:*]') }}
|
||||||
|
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]') }}
|
||||||
|
run: |
|
||||||
|
echo "Forcing CI to run with commit flag [ci:force]."
|
||||||
|
echo CI_FORCE_RUN=true >> $GITHUB_ENV
|
||||||
|
echo "BREAK_ACTION=true" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: RELEASE on master/develop patch branch
|
||||||
|
if: ${{ env.BREAK_ACTION == false && github.event.pull_request.merged }}
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
if [[ "${{ github.ref_name }}" =~ ^master(-patch.*)?$ ]]; then
|
||||||
|
# into master(-patch*)
|
||||||
|
echo "Setting up CI flags for Push on master patch"
|
||||||
|
elif [[ "${{ github.ref_name }}" =~ ^develop-patch.*$ ]]; then
|
||||||
|
# into develop-patch*
|
||||||
|
echo "Setting up CI flags for Push develop patch"
|
||||||
|
else
|
||||||
|
echo "Setting up CI flags for Push on develop branch"
|
||||||
|
base=$(git describe --tags $(git rev-list --tags --max-count=1))
|
||||||
|
echo "NX_CALCULATION_FLAGS=--base=$base --head=$HEAD_HASH" >> $GITHUB_ENV
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: PULL_REQUEST event
|
||||||
|
if: ${{ env.BREAK_ACTION == false && github.event_name == 'pull_request' }}
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
echo "Setting up CI flags for Pull Request event"
|
||||||
|
NX_CALCULATION_FLAGS="--base=origin/${GITHUB_BASE_REF} --head=$HEAD_HASH"
|
||||||
|
echo "NX_CALCULATION_FLAGS=$NX_CALCULATION_FLAGS" >> $GITHUB_ENV
|
||||||
|
BASE_HASH="origin/${GITHUB_BASE_REF}"
|
||||||
|
|
||||||
|
- name: SCHEDULE event
|
||||||
|
if: ${{ github.event_name == 'schedule' }}
|
||||||
|
shell: bash
|
||||||
|
env:
|
||||||
|
EV_NAME: ${{ github.event_name }}
|
||||||
|
run: |
|
||||||
|
echo "Setting up CI to run on SCHEDULE"
|
||||||
|
echo "NX_CALCULATION_FLAGS=--all" >> $GITHUB_ENV
|
||||||
|
3
.github/actions/e2e/action.yml
vendored
3
.github/actions/e2e/action.yml
vendored
@ -125,9 +125,6 @@ runs:
|
|||||||
run: |
|
run: |
|
||||||
set -u;
|
set -u;
|
||||||
echo $PROXY_HOST_BPM
|
echo $PROXY_HOST_BPM
|
||||||
NX_CALCULATION_FLAGS=$(echo $NX_CALCULATION_FLAGS | sed "s@'@@g")
|
|
||||||
echo "NX_CALCULATION_FLAGS=$NX_CALCULATION_FLAGS" >> $GITHUB_ENV
|
|
||||||
GIT_HASH=$(echo $GIT_HASH | sed "s@'@@g")
|
|
||||||
echo "GIT_HASH=$GIT_HASH" >> $GITHUB_ENV
|
echo "GIT_HASH=$GIT_HASH" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: run test with retries
|
- name: run test with retries
|
||||||
|
19
.github/actions/setup/action.yml
vendored
19
.github/actions/setup/action.yml
vendored
@ -6,7 +6,16 @@ inputs:
|
|||||||
required: false
|
required: false
|
||||||
type: boolean
|
type: boolean
|
||||||
default: 'true'
|
default: 'true'
|
||||||
|
enable-node-modules-cache:
|
||||||
|
description: 'enable caching for node modules'
|
||||||
|
required: false
|
||||||
|
type: boolean
|
||||||
|
default: 'true'
|
||||||
|
act:
|
||||||
|
description: 'enable act debug'
|
||||||
|
required: false
|
||||||
|
type: boolean
|
||||||
|
default: 'false'
|
||||||
runs:
|
runs:
|
||||||
using: "composite"
|
using: "composite"
|
||||||
steps:
|
steps:
|
||||||
@ -66,12 +75,8 @@ runs:
|
|||||||
uses: ./.github/actions/travis-env-var-facade
|
uses: ./.github/actions/travis-env-var-facade
|
||||||
- name: before install script
|
- name: before install script
|
||||||
uses: ./.github/actions/before-install
|
uses: ./.github/actions/before-install
|
||||||
# sanitize nx calculation flags string
|
with:
|
||||||
- name: input validation for NX CALCULATION FLAGS
|
act: ${{ inputs.act }}
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
export NX_CALCULATION_FLAGS=$(echo $NX_CALCULATION_FLAGS | sed "s@'@@g")
|
|
||||||
echo "NX_CALCULATION_FLAGS=$NX_CALCULATION_FLAGS" >> $GITHUB_ENV
|
|
||||||
- name: link nx executable
|
- name: link nx executable
|
||||||
run: sudo ln -s $(npm bin)/nx /usr/bin/nx
|
run: sudo ln -s $(npm bin)/nx /usr/bin/nx
|
||||||
shell: bash
|
shell: bash
|
||||||
|
@ -32,9 +32,11 @@ runs:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ GITHUB_REF_NAME == "master" ]]; then
|
if [[ GITHUB_REF_NAME == "master" ]]; then
|
||||||
|
echo "Set up TAG_NPM to latest on master branch"
|
||||||
TAG_NPM="latest"
|
TAG_NPM="latest"
|
||||||
fi
|
fi
|
||||||
if [[ GITHUB_REF_NAME == "develop" ]]; then
|
if [[ GITHUB_REF_NAME == "develop" ]]; then
|
||||||
|
echo "Set up TAG_NPM to alpha on develop branch"
|
||||||
TAG_NPM="alpha"
|
TAG_NPM="alpha"
|
||||||
fi
|
fi
|
||||||
echo "TAG_NPM=${TAG_NPM}" >> $GITHUB_ENV
|
echo "TAG_NPM=${TAG_NPM}" >> $GITHUB_ENV
|
||||||
|
1
.github/workflows/release.yml
vendored
1
.github/workflows/release.yml
vendored
@ -131,6 +131,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
enable-cache: false
|
enable-cache: false
|
||||||
enable-node-modules-cache: false
|
enable-node-modules-cache: false
|
||||||
|
act: ${{ inputs.dry-run-release }}
|
||||||
- uses: ./.github/actions/download-cache-and-artifacts
|
- uses: ./.github/actions/download-cache-and-artifacts
|
||||||
- name: release Storybook docker
|
- name: release Storybook docker
|
||||||
run: |
|
run: |
|
||||||
|
Loading…
x
Reference in New Issue
Block a user