mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2026-09-09 18:03:21 +00:00
[AAE-15499] QA Failure provide more context on slack notification (#8720)
* sharing data with files * sharing data with files * disable check * add shell * skip step * skip step * fix tab * run e2e * failing e2e * failing e2e make fail * failing e2e make fail * use js action * fix template * test action * fix * fix test * fix test * use action * use action fix * use action fix * use action fix * use action fix * use action fix * use action fix * use action fix * use action fix * Normal run * verify slack groups * verify slack groups * verify slack groups * verify slack groups * refactor * remove useless code * remove useless code * use space as separator * use space as separator * use ga channel * append only for cron * run e2e job only if affected * simulate process * fix logic * fix logic * fix output * almost done
This commit is contained in:
@@ -46,6 +46,21 @@ inputs:
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Determine if affected
|
||||
shell: bash
|
||||
id: determine-affected
|
||||
run: |
|
||||
isAffected=false
|
||||
affectedLibs=$(npx nx print-affected --type=lib --select=projects ${NX_CALCULATION_FLAGS} --plain)
|
||||
if [[ $affectedLibs =~ "${{ inputs.e2e-test-id }}" ]]; then
|
||||
isAffected=true
|
||||
fi;
|
||||
echo "Determine if ${{ inputs.e2e-test-id }} is affected: $isAffected";
|
||||
echo "isAffected=$isAffected" >> $GITHUB_OUTPUT
|
||||
- name: print value
|
||||
shell: bash
|
||||
run: |
|
||||
echo "value: ${{ steps.determine-affected.outputs.isAffected }}"
|
||||
- name: use APA as PROXY host if apa-proxy is set
|
||||
shell: bash
|
||||
run: |
|
||||
@@ -76,8 +91,9 @@ runs:
|
||||
|
||||
- name: check EXTERNAL-CS is UP
|
||||
shell: bash
|
||||
if: ${{ inputs.check-external-cs-env == 'true' }}
|
||||
if: ${{ inputs.check-external-cs-env == 'true' && steps.determine-affected.outputs.isAffected == 'true' }}
|
||||
run: |
|
||||
echo "running: check EXTERNAL-CS is UP"
|
||||
set -u;
|
||||
./node_modules/@alfresco/adf-cli/bin/adf-cli \
|
||||
check-cs-env \
|
||||
@@ -87,8 +103,9 @@ runs:
|
||||
|
||||
- name: Check CS is UP
|
||||
shell: bash
|
||||
if: ${{ inputs.check-cs-env == 'true' }}
|
||||
if: ${{ inputs.check-cs-env == 'true' && steps.determine-affected.outputs.isAffected == 'true' }}
|
||||
run: |
|
||||
echo "Running: Check CS is UP"
|
||||
set -u;
|
||||
./node_modules/@alfresco/adf-cli/bin/adf-cli \
|
||||
check-cs-env \
|
||||
@@ -98,8 +115,9 @@ runs:
|
||||
|
||||
- name: check PS is UP
|
||||
shell: bash
|
||||
if: ${{ inputs.check-ps-env == 'true' }}
|
||||
if: ${{ inputs.check-ps-env == 'true' && steps.determine-affected.outputs.isAffected == 'true' }}
|
||||
run: |
|
||||
echo "Running: check PS is UP"
|
||||
set -u;
|
||||
./node_modules/@alfresco/adf-cli/bin/adf-cli init-aps-env \
|
||||
--host "$E2E_HOST" \
|
||||
@@ -109,8 +127,9 @@ runs:
|
||||
|
||||
- name: check PS-CLOUD is UP
|
||||
shell: bash
|
||||
if: ${{ inputs.check-ps-cloud-env == 'true' }}
|
||||
if: ${{ inputs.check-ps-cloud-env == 'true' && steps.determine-affected.outputs.isAffected == 'true' }}
|
||||
run: |
|
||||
echo "running: check PS-CLOUD is UP"
|
||||
set -u;
|
||||
./node_modules/@alfresco/adf-cli/bin/adf-cli init-aae-env \
|
||||
--oauth "$E2E_IDENTITY_HOST_APA" \
|
||||
@@ -134,36 +153,37 @@ runs:
|
||||
echo $PROXY_HOST_BPM
|
||||
echo "GIT_HASH=$GIT_HASH" >> $GITHUB_ENV
|
||||
|
||||
- name: run test with retries
|
||||
id: retry_run
|
||||
- name: run test
|
||||
id: e2e_run
|
||||
if: ${{ steps.determine-affected.outputs.isAffected == 'true' }}
|
||||
env:
|
||||
FOLDER: "${{ inputs.e2e-test-folder }}"
|
||||
PROVIDER: "${{ inputs.e2e-test-provider }}"
|
||||
AUTH_TYPE: "${{ inputs.e2e-test-auth }}"
|
||||
E2E_TEST_ID: "${{ inputs.e2e-test-id }}"
|
||||
DEPS: "${{ inputs.deps }}"
|
||||
|
||||
uses: nick-fields/retry@v2.8.2
|
||||
shell: bash
|
||||
run: |
|
||||
set -u;
|
||||
if [[ ${{ inputs.e2e-test-folder }} == 'content-services/upload' ]]; then
|
||||
export DISPLAY=:99
|
||||
chromedriver --url-base=/wd/hub &
|
||||
sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 & # optional
|
||||
bash ./scripts/github/e2e/e2e.sh "$E2E_TEST_ID" "$DEPS" "browser" || exit 1
|
||||
else
|
||||
bash ./scripts/github/e2e/e2e.sh "$E2E_TEST_ID" "$DEPS" || exit 1
|
||||
fi
|
||||
- name: Trace failing e2e
|
||||
if: ${{ steps.determine-affected.outputs.isAffected == 'true' && github.event_name == 'schedule' && failure() }}
|
||||
uses: ./.github/actions/artifact-append
|
||||
with:
|
||||
timeout_minutes: 40
|
||||
max_attempts: 2
|
||||
retry_wait_seconds: 30
|
||||
shell: bash
|
||||
command: |
|
||||
set -u;
|
||||
export GH_ACTION_RETRY_COUNT=$(cat ${GITHUB_OUTPUT} | grep -E '^[0-9]{1,2}$' | tail -n1)
|
||||
echo "RETRY GH_ACTION_RETRY_COUNT = <$GH_ACTION_RETRY_COUNT>"
|
||||
if [[ ${{ inputs.e2e-test-folder }} == 'content-services/upload' ]]; then
|
||||
export DISPLAY=:99
|
||||
chromedriver --url-base=/wd/hub &
|
||||
sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 & # optional
|
||||
bash ./scripts/github/e2e/e2e.sh "$E2E_TEST_ID" "$DEPS" "browser" || exit 1
|
||||
else
|
||||
bash ./scripts/github/e2e/e2e.sh "$E2E_TEST_ID" "$DEPS" || exit 1
|
||||
fi
|
||||
artifact-name: global-e2e-result
|
||||
file-name: e2e-failures.txt
|
||||
content: "${{ inputs.e2e-test-id }}"
|
||||
|
||||
- name: upload artifacts on gh
|
||||
id: upload_gh
|
||||
if: ${{ steps.determine-affected.outputs.isAffected == 'true' }}
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: e2e-artifact-output
|
||||
|
||||
Reference in New Issue
Block a user