ACS-8610: cleanup demo shell protractor tests (#10148)

This commit is contained in:
Denys Vuika
2024-09-10 08:36:42 -04:00
committed by GitHub
parent a754976ad9
commit f1208d45c3
402 changed files with 180 additions and 45538 deletions

View File

@@ -1,92 +0,0 @@
name: Append content to Artifact
description: 'Allow the user to append content to an existing artifact'
inputs:
artifact-name:
description: 'The name of the artifact'
required: true
type: string
file-name:
description: 'The name of the file with extension created in the artifact'
required: true
type: string
content:
description: 'The content to append'
type: string
default: ""
runs:
using: "composite"
steps:
- run: echo "Artifact Append"
shell: bash
- name: Download artifact
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
with:
name: ${{ inputs.artifact-name }}
pattern: ${{ inputs.artifact-name }}-*
merge-multiple: true
- run: ls
shell: bash
- name: Append content
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
env:
contentFile: ${{ inputs.content }}
fileName: ${{ inputs.file-name }}
with:
script: |
const fs = require('fs');
const affectedLib = process.env.contentFile;
const fileName = process.env.fileName;
core.info(`Input Filename: ${fileName}`);
core.info(`Input content: ${affectedLib}`);
const content = read(fileName)
core.info(`File content: ${content}`);
appendContent(content, affectedLib);
function read(filename) {
try {
const contentFile = fs.readFileSync(filename, 'utf8').replace('\n','');
return contentFile;
} catch (err) {
core.error(err);
}
}
function write(filename, content) {
try {
fs.writeFileSync(filename, content);
} catch (err) {
core.error(err);
}
}
function appendContent(content, append) {
let changedContent;
const libs = content.split(' ');
if (libs?.length>0) {
if (libs.length === 1 && libs[0] === '') {
libs[0] = append;
changedContent = libs[0];
}
else if (!libs.includes(append)) {
libs.push(append);
changedContent = libs.join(' ');
} else {
core.info(`Lib ${append} already affected`);
}
}
if (changedContent != undefined){
core.info(`File content append: ${changedContent}`)
write(fileName, changedContent);
}
}
- name: Upload artifact
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
with:
name: ${{ inputs.artifact-name }}
path: ${{ inputs.file-name }}

View File

@@ -1,42 +0,0 @@
name: Extract Artifact
description: 'Allow the user to extract content from an artifact'
inputs:
artifact-name:
description: 'The name of the artifact'
required: true
type: string
file-name:
description: 'The name of the file with extension created in the artifact'
required: true
type: string
content:
description: 'The init content the file should have'
type: string
default: ""
outputs:
result:
description: "the value extrated from the file inside the artifact"
value: ${{ steps.extract.outputs.result }}
runs:
using: "composite"
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- run: echo "Artifact Extract"
shell: bash
- name: Download artifact
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
with:
name: ${{ inputs.artifact-name }}
pattern: ${{ inputs.artifact-name }}-*
merge-multiple: true
- id: extract
shell: bash
run: |
value=`cat ${{ inputs.file-name }}`
echo "print $value"
echo "result=$value" >> $GITHUB_OUTPUT

View File

@@ -1,32 +0,0 @@
name: Initialize Artifact
description: 'Allow the user to initialize an empty artifact used globally'
inputs:
artifact-name:
description: 'The name of the artifact'
required: true
type: string
file-name:
description: 'The name of the file with extension created in the artifact'
required: true
type: string
content:
description: 'The init content the file should have'
type: string
default: ""
runs:
using: "composite"
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Create empty artifact
shell: bash
run:
echo "${{inputs.content}}" > ${{ inputs.file-name }}
- name: Upload artifact
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
with:
name: ${{ inputs.artifact-name }}
path: ${{ inputs.file-name }}

View File

@@ -1,204 +0,0 @@
name: "e2e"
description: "e2e"
inputs:
e2e-test-id:
description: "Test id"
required: true
e2e-artifact-id:
description: "Artifact id"
required: true
e2e-test-folder:
description: "Test folder"
required: true
e2e-test-provider:
description: "Test provider"
required: true
e2e-test-auth:
description: "Test auth"
required: true
output:
description: "Output path"
required: true
check-cs-env:
required: true
description: check cs env
default: "false"
check-ps-env:
required: true
description: check ps env
default: "false"
check-external-cs-env:
required: true
description: check external cs env
default: "false"
check-ps-cloud-env:
required: true
description: check ps cloud env
default: "false"
e2e-tar-name: #
description: tarball name
required: false
default: e2e.tar.gz
apa-proxy: #
description: "proxy host"
required: true
deps:
description: "Library dependencies"
required: false
default: ""
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: |
if [[ -n "${{ inputs.apa-proxy }}" ]]; then
echo "APA proxy set."
echo "PROXY_HOST_BPM=${E2E_HOST_APA}" >> $GITHUB_ENV
echo "PROXY_HOST_ECM=${E2E_IDENTITY_HOST_APA}" >> $GITHUB_ENV
echo "HOST_SSO=${E2E_IDENTITY_HOST_APA}" >> $GITHUB_ENV
fi
- name: install aws cli
shell: bash
run: pip install awscli
- name: download smartrunner test results from s3 bucket if they exist
shell: bash
env:
REMOTE_PATH: smart-runner/${{ github.run_id}}/${{ inputs.e2e-test-folder }}-${{ inputs.e2e-artifact-id}}/e2e.tar.gz
run: |
set -u;
mkdir -p "${SMART_RUNNER_PATH}"
if [[ $(aws s3 ls "s3://${S3_BUILD_BUCKET_SHORT_NAME}/adf/${REMOTE_PATH}" > /dev/null; echo $?) -eq 0 ]]; then
echo "downloading test files"
aws s3 cp "s3://${S3_BUILD_BUCKET_SHORT_NAME}/adf/${REMOTE_PATH}" .;
tar xzf ${{ inputs.e2e-tar-name }};
else
echo "nothing to download";
fi
- name: check EXTERNAL-CS is UP
shell: bash
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 \
--host "$EXTERNAL_ACS_HOST" \
-u "$E2E_USERNAME" \
-p "$E2E_PASSWORD" || exit 1
- name: Check CS is UP
shell: bash
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 \
--host "$E2E_HOST" \
-u "$E2E_USERNAME" \
-p "$E2E_PASSWORD" || exit 1
- name: check PS is UP
shell: bash
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" \
-u "$E2E_USERNAME" \
-p "$E2E_PASSWORD" \
--license "$AWS_S3_BUCKET_ACTIVITI_LICENSE" || exit 1
- name: check PS-CLOUD is UP
shell: bash
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" \
--host "$E2E_HOST_APA" \
--modelerUsername "$E2E_MODELER_USERNAME" \
--modelerPassword "$E2E_MODELER_PASSWORD" \
--devopsUsername "$E2E_DEVOPS_USERNAME" \
--devopsPassword "$E2E_DEVOPS_PASSWORD" \
--clientId 'alfresco' || exit 1
- name: variables sanitization
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 }}"
shell: bash
run: |
set -u;
echo $PROXY_HOST_BPM
echo "GIT_HASH=$GIT_HASH" >> $GITHUB_ENV
- 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 }}"
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:
artifact-name: "global-e2e-result-${{ inputs.e2e-test-id }}"
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@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
with:
name: e2e-artifact-output-${{inputs.e2e-artifact-id}}
path: /home/runner/work/alfresco-ng2-components/alfresco-ng2-components/e2e-output-*
- name: upload smart-runner tests results on s3 to cache tests
shell: bash
if: always()
env:
REMOTE_PATH: "smart-runner/${{ github.run_id}}/${{ inputs.e2e-test-folder }}-${{inputs.e2e-artifact-id}}/e2e.tar.gz"
# description: always upload newer results
run: |
tar czf "${{ inputs.e2e-tar-name }}" "${SMART_RUNNER_PATH}"
aws s3 cp "${{ inputs.e2e-tar-name }}" "s3://${S3_BUILD_BUCKET_SHORT_NAME}/adf/${REMOTE_PATH}"

View File

@@ -1,13 +0,0 @@
name: 'Install Google Chrome'
description: 'Install Google Chrome'
runs:
using: "composite"
steps:
- name: Install google chrome
shell: bash
run: |
wget -q https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_114.0.5735.133-1_amd64.deb
sudo apt install -y --allow-downgrades ./google-chrome-stable_114.0.5735.133-1_amd64.deb
sudo ln -s /usr/bin/google-chrome /usr/bin/chrome
chrome --version

View File

@@ -30,18 +30,6 @@ updates:
directory: "/"
schedule:
interval: "weekly"
- package-ecosystem: "github-actions"
directory: "/.github/actions/artifact-append"
schedule:
interval: "weekly"
- package-ecosystem: "github-actions"
directory: "/.github/actions/artifact-extract"
schedule:
interval: "weekly"
- package-ecosystem: "github-actions"
directory: "/.github/actions/artifact-initialize"
schedule:
interval: "weekly"
- package-ecosystem: "github-actions"
directory: "/.github/actions/before-install"
schedule:
@@ -50,10 +38,6 @@ updates:
directory: "/.github/actions/download-node-modules-and-artifacts"
schedule:
interval: "weekly"
- package-ecosystem: "github-actions"
directory: "/.github/actions/e2e"
schedule:
interval: "weekly"
- package-ecosystem: "github-actions"
directory: "/.github/actions/enable-dryrun"
schedule:
@@ -78,10 +62,6 @@ updates:
directory: "/.github/actions/setup"
schedule:
interval: "weekly"
- package-ecosystem: "github-actions"
directory: "/.github/actions/setup-chrome"
schedule:
interval: "weekly"
- package-ecosystem: "github-actions"
directory: "/.github/actions/slack-group-area"
schedule:

View File

@@ -1,87 +0,0 @@
name: "cron e2e daily"
on:
workflow_dispatch:
schedule:
- cron: '0 12 * * 1-5' #At 12:00 on every day-of-week from Monday through Friday.
env:
BASE_REF: ${{ github.base_ref }}
HEAD_REF: ${{ github.head_ref }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
GITHUB_BRANCH: ${{ github.ref_name }}
GH_BUILD_DIR: ${{ github.workspace }}
GH_COMMIT: ${{ github.sha }}
BUILD_ID: ${{ github.run_id }}
GH_RUN_NUMBER: ${{ github.run_attempt }}
GH_BUILD_NUMBER: ${{ github.run_id }}
JOB_ID: ${{ github.run_id }}
PROXY_HOST_BPM: ${{ secrets.E2E_HOST }}
E2E_HOST_APA: ${{ secrets.E2E_HOST_APA }}
E2E_IDENTITY_HOST_APA: ${{ secrets.E2E_IDENTITY_HOST_APA }}
E2E_HOST: ${{ secrets.E2E_HOST }}
E2E_USERNAME: ${{ secrets.E2E_ADMIN_EMAIL_IDENTITY }}
E2E_PASSWORD: ${{ secrets.E2E_PASSWORD }}
E2E_ADMIN_EMAIL_IDENTITY: ${{ secrets.E2E_ADMIN_EMAIL_IDENTITY }}
E2E_ADMIN_PASSWORD_IDENTITY: ${{ secrets.E2E_ADMIN_PASSWORD_IDENTITY }}
USERNAME_ADF: ${{ secrets.E2E_ADMIN_EMAIL_IDENTITY }}
PASSWORD_ADF: ${{ secrets.E2E_PASSWORD }}
URL_HOST_ADF: "http://localhost:4200"
IDENTITY_ADMIN_EMAIL: ${{ secrets.E2E_ADMIN_EMAIL_IDENTITY }}
IDENTITY_ADMIN_PASSWORD: ${{ secrets.E2E_ADMIN_PASSWORD_IDENTITY }}
AWS_S3_BUCKET_ACTIVITI_LICENSE: ${{ secrets.AWS_S3_BUCKET_ACTIVITI_LICENSE }}
HOST_SSO: ${{ secrets.HOST_SSO }}
LOG_LEVEL: "ERROR"
E2E_LOG_LEVEL: "ERROR"
E2E_MODELER_USERNAME: ${{ secrets.E2E_MODELER_USERNAME }}
E2E_MODELER_PASSWORD: ${{ secrets.E2E_MODELER_PASSWORD }}
EXTERNAL_ACS_HOST: ${{ secrets.EXTERNAL_ACS_HOST }}
E2E_DEVOPS_USERNAME: ${{ secrets.E2E_DEVOPS_USERNAME }}
E2E_DEVOPS_PASSWORD: ${{ secrets.E2E_DEVOPS_PASSWORD }}
USERNAME_SUPER_ADMIN_ADF: ${{ secrets.USERNAME_SUPER_ADMIN_ADF }}
PASSWORD_SUPER_ADMIN_ADF: ${{ secrets.PASSWORD_SUPER_ADMIN_ADF }}
HR_USER: ${{ secrets.HR_USER }}
HR_USER_PASSWORD: ${{ secrets.HR_USER_PASSWORD }}
SMART_RUNNER_PATH: ".protractor-smartrunner"
S3_DBP_PATH: ${{ secrets.S3_DBP_PATH }}
S3_BUILD_BUCKET_SHORT_NAME: ${{ secrets.S3_BUILD_BUCKET_SHORT_NAME }}
NODE_OPTIONS: "--max-old-space-size=5120"
DOCKER_REPOSITORY_DOMAIN: ${{ secrets.DOCKER_REPOSITORY_DOMAIN }}
DOCKER_REPOSITORY_USER: ${{ secrets.DOCKER_REPOSITORY_USER }}
DOCKER_REPOSITORY_PASSWORD: ${{ secrets.DOCKER_REPOSITORY_PASSWORD }}
DOCKER_REPOSITORY_STORYBOOK: "${{ secrets.DOCKER_REPOSITORY_DOMAIN }}/alfresco/storybook"
DOCKER_REPOSITORY: "${{ secrets.DOCKER_REPOSITORY_DOMAIN }}/alfresco/demo-shell"
REPO_OWNER: "Alfresco"
REPO_NAME: "alfresco-ng2-components"
DEMO_SHELL_DIR: "./dist/demo-shell"
STORYBOOK_DIR: "./dist/storybook/stories"
BUILT_LIBS_DIR: "./dist/libs"
NODE_MODULES_DIR: "./node_modules"
SMART_RUNNER_DIRECTORY: ".protractor-smartrunner"
SAVE_SCREENSHOT: true
REDIRECT_URI: /
BROWSER_RUN: false
MAXINSTANCES: 2
PLAYWRIGHT_WORKERS: 2
PLAYWRIGHT_STORYBOOK_E2E_HOST: http://localhost
PLAYWRIGHT_STORYBOOK_E2E_PORT: 4400
PROXY_HOST_ECM: ${{ secrets.E2E_HOST }}
jobs:
init-artifact:
runs-on: ubuntu-latest
name: Initialize artifacts
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: ./.github/actions/artifact-initialize
with:
artifact-name: global-e2e-result
file-name: e2e-failures.txt
run-e2e:
name: run e2e
uses: ./.github/workflows/pull-request.yml
with:
cron-run: true
secrets: inherit

View File

@@ -25,59 +25,22 @@ env:
GH_RUN_NUMBER: ${{ github.run_attempt }}
GH_BUILD_NUMBER: ${{ github.run_id }}
JOB_ID: ${{ github.run_id }}
PROXY_HOST_BPM: ${{ secrets.E2E_HOST }}
E2E_IDENTITY_HOST_APA: ${{ secrets.E2E_IDENTITY_HOST_APA }}
E2E_HOST_APA: ${{ secrets.E2E_HOST_APA }}
E2E_HOST: ${{ secrets.E2E_HOST }}
E2E_USERNAME: ${{ secrets.E2E_ADMIN_EMAIL_IDENTITY }}
E2E_PASSWORD: ${{ secrets.E2E_PASSWORD }}
E2E_ADMIN_EMAIL_IDENTITY: ${{ secrets.E2E_ADMIN_EMAIL_IDENTITY }}
E2E_ADMIN_PASSWORD_IDENTITY: ${{ secrets.E2E_ADMIN_PASSWORD_IDENTITY }}
USERNAME_ADF: ${{ secrets.E2E_ADMIN_EMAIL_IDENTITY }}
PASSWORD_ADF: ${{ secrets.E2E_PASSWORD }}
URL_HOST_ADF: "http://localhost:4200"
IDENTITY_ADMIN_EMAIL: ${{ secrets.E2E_ADMIN_EMAIL_IDENTITY }}
IDENTITY_ADMIN_PASSWORD: ${{ secrets.E2E_ADMIN_PASSWORD_IDENTITY }}
AWS_S3_BUCKET_ACTIVITI_LICENSE: ${{ secrets.AWS_S3_BUCKET_ACTIVITI_LICENSE }}
HOST_SSO: ${{ secrets.HOST_SSO }}
LOG_LEVEL: "ERROR"
E2E_LOG_LEVEL: "ERROR"
E2E_MODELER_USERNAME: ${{ secrets.E2E_MODELER_USERNAME }}
E2E_MODELER_PASSWORD: ${{ secrets.E2E_MODELER_PASSWORD }}
EXTERNAL_ACS_HOST: ${{ secrets.EXTERNAL_ACS_HOST }}
E2E_DEVOPS_USERNAME: ${{ secrets.E2E_DEVOPS_USERNAME }}
E2E_DEVOPS_PASSWORD: ${{ secrets.E2E_DEVOPS_PASSWORD }}
USERNAME_SUPER_ADMIN_ADF: ${{ secrets.USERNAME_SUPER_ADMIN_ADF }}
PASSWORD_SUPER_ADMIN_ADF: ${{ secrets.PASSWORD_SUPER_ADMIN_ADF }}
HR_USER: ${{ secrets.HR_USER }}
HR_USER_PASSWORD: ${{ secrets.HR_USER_PASSWORD }}
SMART_RUNNER_PATH: ".protractor-smartrunner"
S3_DBP_PATH: ${{ secrets.S3_DBP_PATH }}
S3_BUILD_BUCKET_SHORT_NAME: ${{ secrets.S3_BUILD_BUCKET_SHORT_NAME }}
NODE_OPTIONS: "--max-old-space-size=5120"
DOCKER_REPOSITORY_DOMAIN: ${{ secrets.DOCKER_REPOSITORY_DOMAIN }}
DOCKER_REPOSITORY_USER: ${{ secrets.DOCKER_REPOSITORY_USER }}
DOCKER_REPOSITORY_PASSWORD: ${{ secrets.DOCKER_REPOSITORY_PASSWORD }}
DOCKER_REPOSITORY_STORYBOOK: "${{ secrets.DOCKER_REPOSITORY_DOMAIN }}/alfresco/storybook"
DOCKER_REPOSITORY: "${{ secrets.DOCKER_REPOSITORY_DOMAIN }}/alfresco/demo-shell"
NPM_REGISTRY_ADDRESS: ${{ secrets.NPM_REGISTRY_ADDRESS }}
NPM_REGISTRY_TOKEN: ${{ secrets.NPM_REGISTRY_TOKEN }}
BOT_GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}
REPO_OWNER: "Alfresco"
REPO_NAME: "alfresco-ng2-components"
DEMO_SHELL_DIR: "./dist/demo-shell"
STORYBOOK_DIR: "./dist/storybook/stories"
BUILT_LIBS_DIR: "./dist/libs"
NODE_MODULES_DIR: "./node_modules"
SMART_RUNNER_DIRECTORY: ".protractor-smartrunner"
SAVE_SCREENSHOT: true
REDIRECT_URI: /
BROWSER_RUN: false
MAXINSTANCES: 2
PLAYWRIGHT_WORKERS: 2
PLAYWRIGHT_STORYBOOK_E2E_HOST: http://localhost
PLAYWRIGHT_STORYBOOK_E2E_PORT: 4400
PROXY_HOST_ECM: ${{ secrets.E2E_HOST }}
jobs:

View File

@@ -42,56 +42,19 @@ env:
GH_RUN_NUMBER: ${{ github.run_attempt }}
GH_BUILD_NUMBER: ${{ github.run_id }}
JOB_ID: ${{ github.run_id }}
PROXY_HOST_BPM: ${{ secrets.E2E_HOST }}
E2E_IDENTITY_HOST_APA: ${{ secrets.E2E_IDENTITY_HOST_APA }}
E2E_HOST_APA: ${{ secrets.E2E_HOST_APA }}
E2E_HOST: ${{ secrets.E2E_HOST }}
E2E_USERNAME: ${{ secrets.E2E_ADMIN_EMAIL_IDENTITY }}
E2E_PASSWORD: ${{ secrets.E2E_PASSWORD }}
E2E_ADMIN_EMAIL_IDENTITY: ${{ secrets.E2E_ADMIN_EMAIL_IDENTITY }}
E2E_ADMIN_PASSWORD_IDENTITY: ${{ secrets.E2E_ADMIN_PASSWORD_IDENTITY }}
USERNAME_ADF: ${{ secrets.E2E_ADMIN_EMAIL_IDENTITY }}
PASSWORD_ADF: ${{ secrets.E2E_PASSWORD }}
URL_HOST_ADF: "http://localhost:4200"
IDENTITY_ADMIN_EMAIL: ${{ secrets.E2E_ADMIN_EMAIL_IDENTITY }}
IDENTITY_ADMIN_PASSWORD: ${{ secrets.E2E_ADMIN_PASSWORD_IDENTITY }}
AWS_S3_BUCKET_ACTIVITI_LICENSE: ${{ secrets.AWS_S3_BUCKET_ACTIVITI_LICENSE }}
HOST_SSO: ${{ secrets.HOST_SSO }}
LOG_LEVEL: "ERROR"
E2E_LOG_LEVEL: "ERROR"
E2E_MODELER_USERNAME: ${{ secrets.E2E_MODELER_USERNAME }}
E2E_MODELER_PASSWORD: ${{ secrets.E2E_MODELER_PASSWORD }}
EXTERNAL_ACS_HOST: ${{ secrets.EXTERNAL_ACS_HOST }}
E2E_DEVOPS_USERNAME: ${{ secrets.E2E_DEVOPS_USERNAME }}
E2E_DEVOPS_PASSWORD: ${{ secrets.E2E_DEVOPS_PASSWORD }}
USERNAME_SUPER_ADMIN_ADF: ${{ secrets.USERNAME_SUPER_ADMIN_ADF }}
PASSWORD_SUPER_ADMIN_ADF: ${{ secrets.PASSWORD_SUPER_ADMIN_ADF }}
HR_USER: ${{ secrets.HR_USER }}
HR_USER_PASSWORD: ${{ secrets.HR_USER_PASSWORD }}
SMART_RUNNER_PATH: ".protractor-smartrunner"
S3_DBP_PATH: ${{ secrets.S3_DBP_PATH }}
S3_BUILD_BUCKET_SHORT_NAME: ${{ secrets.S3_BUILD_BUCKET_SHORT_NAME }}
NODE_OPTIONS: "--max-old-space-size=5120"
DOCKER_REPOSITORY_DOMAIN: ${{ secrets.DOCKER_REPOSITORY_DOMAIN }}
DOCKER_REPOSITORY_USER: ${{ secrets.DOCKER_REPOSITORY_USER }}
DOCKER_REPOSITORY_PASSWORD: ${{ secrets.DOCKER_REPOSITORY_PASSWORD }}
DOCKER_REPOSITORY_STORYBOOK: "${{ secrets.DOCKER_REPOSITORY_DOMAIN }}/alfresco/storybook"
DOCKER_REPOSITORY: "${{ secrets.DOCKER_REPOSITORY_DOMAIN }}/alfresco/demo-shell"
REPO_OWNER: "Alfresco"
REPO_NAME: "alfresco-ng2-components"
DEMO_SHELL_DIR: "./dist/demo-shell"
STORYBOOK_DIR: "./dist/storybook/stories"
BUILT_LIBS_DIR: "./dist/libs"
NODE_MODULES_DIR: "./node_modules"
SMART_RUNNER_DIRECTORY: ".protractor-smartrunner"
SAVE_SCREENSHOT: true
REDIRECT_URI: /
BROWSER_RUN: false
MAXINSTANCES: 2
PLAYWRIGHT_WORKERS: 2
PLAYWRIGHT_STORYBOOK_E2E_HOST: http://localhost
PLAYWRIGHT_STORYBOOK_E2E_PORT: 4400
PROXY_HOST_ECM: ${{ secrets.E2E_HOST }}
jobs:
pre-checks:
@@ -273,198 +236,9 @@ jobs:
- uses: ./.github/actions/setup
- uses: ./.github/actions/download-node-modules-and-artifacts
- run: npx nx affected:build $NX_CALCULATION_FLAGS --prod
- run: npx nx build demoshell --configuration production
- run: npx nx affected --target=build-storybook $NX_CALCULATION_FLAGS --configuration=ci --parallel=1
- uses: ./.github/actions/upload-node-modules-and-artifacts
e2e-storybook:
timeout-minutes: 20
name: "e2e: storybook"
needs: [build-libs, lint, unit-tests]
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 0 # Fetch all history for all
- uses: ./.github/actions/setup
- uses: ./.github/actions/download-node-modules-and-artifacts
- name: Process Cloud Storybook Playwright
run: |
npx playwright install chromium
sudo sysctl -w fs.inotify.max_user_watches=524288
npx nx affected --target=e2e-playwright $NX_CALCULATION_FLAGS || exit 1
- uses: ./.github/actions/upload-node-modules-and-artifacts
e2e:
timeout-minutes: 90
name: "e2e: ${{ matrix.e2e-test.description }}"
needs: [build-libs, lint, unit-tests]
runs-on: ubuntu-latest
strategy:
fail-fast: false
# max-parallel: 4
matrix:
e2e-test:
- description: "Core"
test-id: "core"
artifact-id: "core"
folder: "core"
provider: "ALL"
auth: "OAUTH"
check-cs-env: "true"
check-ps-env: "true"
deps: "testing"
- description: "Content: Components"
test-id: "content-services"
artifact-id: "content-services-components"
folder: "content-services/components"
provider: "ECM"
auth: "BASIC"
check-cs-env: "true"
deps: "testing"
- description: "Content: Directives"
test-id: "content-services"
artifact-id: "content-services-directives"
folder: "content-services/directives"
provider: "ECM"
auth: "BASIC"
check-cs-env: "true"
deps: "testing"
- description: "Content: Document List"
test-id: "content-services"
artifact-id: "content-services-document-list"
folder: "content-services/document-list"
provider: "ECM"
auth: "BASIC"
check-cs-env: "true"
deps: "testing"
- description: "Content: Metadata"
test-id: "content-services"
artifact-id: "content-services-metadata"
folder: "content-services/metadata"
provider: "ECM"
auth: "BASIC"
check-cs-env: "true"
deps: "testing"
- description: "Content: Upload and Versioning"
test-id: "content-services"
artifact-id: "content-services-upload"
folder: "content-services/upload"
provider: "ECM"
auth: "BASIC"
check-cs-env: "true"
deps: "testing"
- description: "Search"
test-id: "content-services"
artifact-id: "content-services-search"
folder: "search"
provider: "ECM"
auth: "BASIC"
check-cs-env: "true"
deps: "testing"
- description: "Process: Form"
test-id: "process-services"
artifact-id: "process-services-form"
folder: "process-services/form"
provider: "BPM"
auth: "OAUTH"
check-ps-env: "true"
check-external-cs-env: "true"
deps: "testing"
- description: "Process: Process"
test-id: "process-services"
artifact-id: "process-services-process"
folder: "process-services/process"
provider: "BPM"
auth: "OAUTH"
check-ps-env: "true"
check-external-cs-env: "true"
deps: "testing"
- description: "Process: Tasks"
test-id: "process-services"
artifact-id: "process-services-tasks"
folder: "process-services/tasks"
provider: "BPM"
auth: "OAUTH"
check-ps-env: "true"
check-external-cs-env: "true"
deps: "testing"
- description: "Process: Widget"
test-id: "process-services"
artifact-id: "process-services-widgets"
folder: "process-services/widgets"
provider: "BPM"
auth: "OAUTH"
check-ps-env: "true"
check-external-cs-env: "true"
deps: "testing"
- description: "Process Cloud: Form"
test-id: "process-services-cloud"
artifact-id: "process-services-cloud-form-field"
folder: "process-services-cloud/form-field"
provider: "ALL"
auth: "OAUTH"
apa-proxy: true
check-cs-env: "true"
check-ps-cloud-env: "true"
deps: "testing"
- description: "Process Cloud: Process"
test-id: "process-services-cloud"
artifact-id: "process-services-cloud-process"
folder: "process-services-cloud/process"
provider: "ALL"
auth: "OAUTH"
apa-proxy: true
check-cs-env: "true"
check-ps-cloud-env: "true"
deps: "testing"
- description: "Process Cloud: Start Task"
test-id: "process-services-cloud"
artifact-id: "process-services-cloud-start-task"
folder: "process-services-cloud/start-task"
provider: "ALL"
auth: "OAUTH"
apa-proxy: true
check-cs-env: "true"
check-ps-cloud-env: "true"
deps: "testing"
- description: "Process Cloud: Tasks List"
test-id: "process-services-cloud"
artifact-id: "process-services-cloud-task-list"
folder: "process-services-cloud/task-list"
provider: "ALL"
auth: "OAUTH"
apa-proxy: true
check-cs-env: "true"
check-ps-cloud-env: "true"
deps: "testing"
steps:
- name: Checkout repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 0 # Fetch all history for all
- uses: ./.github/actions/setup
with:
enable-cache: "true"
enable-node-modules-cache: "true"
- uses: ./.github/actions/download-node-modules-and-artifacts
- name: e2e
uses: ./.github/actions/e2e
with:
e2e-test-id: ${{ matrix.e2e-test.test-id }}
e2e-test-folder: ${{ matrix.e2e-test.folder }}
e2e-artifact-id: ${{matrix.e2e-test.artifact-id}}
e2e-test-provider: ${{ matrix.e2e-test.provider }}
e2e-test-auth: ${{ matrix.e2e-test.auth }}
check-cs-env: ${{ matrix.e2e-test.check-cs-env }}
check-ps-env: ${{ matrix.e2e-test.check-ps-env }}
check-ps-cloud-env: ${{ matrix.e2e-test.check-ps-cloud-env }}
check-external-cs-env: ${{ matrix.e2e-test.check-external-cs-env }}
apa-proxy: ${{ matrix.e2e-test.apa-proxy }}
deps: ${{ matrix.e2e-test.deps }}
PR-forbidden-labels:
if: ${{ inputs.cron-run == '' || inputs.cron-run == 'false' }}
runs-on: ubuntu-latest
@@ -496,7 +270,7 @@ jobs:
if: ${{ always() }}
runs-on: ubuntu-latest
name: Final Results
needs: [check-if-pr-is-approved, pre-checks, setup, unit-tests, lint, build-libs, e2e, e2e-storybook]
needs: [check-if-pr-is-approved, pre-checks, setup, unit-tests, lint, build-libs]
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: identify-slack-group

View File

@@ -22,57 +22,20 @@ env:
GH_RUN_NUMBER: ${{ github.run_attempt }}
GH_BUILD_NUMBER: ${{ github.run_id }}
JOB_ID: ${{ github.run_id }}
PROXY_HOST_BPM: ${{ secrets.E2E_HOST }}
E2E_IDENTITY_HOST_APA: ${{ secrets.E2E_IDENTITY_HOST_APA }}
E2E_HOST_APA: ${{ secrets.E2E_HOST_APA }}
E2E_HOST: ${{ secrets.E2E_HOST }}
E2E_USERNAME: ${{ secrets.E2E_ADMIN_EMAIL_IDENTITY }}
E2E_PASSWORD: ${{ secrets.E2E_PASSWORD }}
E2E_ADMIN_EMAIL_IDENTITY: ${{ secrets.E2E_ADMIN_EMAIL_IDENTITY }}
E2E_ADMIN_PASSWORD_IDENTITY: ${{ secrets.E2E_ADMIN_PASSWORD_IDENTITY }}
#USERNAME_ADF: ${{ secrets.E2E_USERNAME }}
USERNAME_ADF: ${{ secrets.E2E_ADMIN_EMAIL_IDENTITY }}
PASSWORD_ADF: ${{ secrets.E2E_PASSWORD }}
URL_HOST_ADF: "http://localhost:4200"
IDENTITY_ADMIN_EMAIL: ${{ secrets.E2E_ADMIN_EMAIL_IDENTITY }}
IDENTITY_ADMIN_PASSWORD: ${{ secrets.E2E_ADMIN_PASSWORD_IDENTITY }}
AWS_S3_BUCKET_ACTIVITI_LICENSE: ${{ secrets.AWS_S3_BUCKET_ACTIVITI_LICENSE }}
HOST_SSO: ${{ secrets.HOST_SSO }}
LOG_LEVEL: "ERROR"
E2E_LOG_LEVEL: "ERROR"
E2E_MODELER_USERNAME: ${{ secrets.E2E_MODELER_USERNAME }}
E2E_MODELER_PASSWORD: ${{ secrets.E2E_MODELER_PASSWORD }}
EXTERNAL_ACS_HOST: ${{ secrets.EXTERNAL_ACS_HOST }}
E2E_DEVOPS_USERNAME: ${{ secrets.E2E_DEVOPS_USERNAME }}
E2E_DEVOPS_PASSWORD: ${{ secrets.E2E_DEVOPS_PASSWORD }}
USERNAME_SUPER_ADMIN_ADF: ${{ secrets.USERNAME_SUPER_ADMIN_ADF }}
PASSWORD_SUPER_ADMIN_ADF: ${{ secrets.PASSWORD_SUPER_ADMIN_ADF }}
HR_USER: ${{ secrets.HR_USER }}
HR_USER_PASSWORD: ${{ secrets.HR_USER_PASSWORD }}
SMART_RUNNER_PATH: ".protractor-smartrunner"
S3_DBP_PATH: ${{ secrets.S3_DBP_PATH }}
S3_BUILD_BUCKET_SHORT_NAME: ${{ secrets.S3_BUILD_BUCKET_SHORT_NAME }}
NODE_OPTIONS: "--max-old-space-size=5120"
DOCKER_REPOSITORY_DOMAIN: ${{ secrets.DOCKER_REPOSITORY_DOMAIN }}
DOCKER_REPOSITORY_USER: ${{ secrets.DOCKER_REPOSITORY_USER }}
DOCKER_REPOSITORY_PASSWORD: ${{ secrets.DOCKER_REPOSITORY_PASSWORD }}
DOCKER_REPOSITORY_STORYBOOK: "${{ secrets.DOCKER_REPOSITORY_DOMAIN }}/alfresco/storybook"
DOCKER_REPOSITORY: "${{ secrets.DOCKER_REPOSITORY_DOMAIN }}/alfresco/demo-shell"
GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}
REPO_OWNER: "Alfresco"
REPO_NAME: "alfresco-ng2-components"
DEMO_SHELL_DIR: "./dist/demo-shell"
STORYBOOK_DIR: "./dist/storybook/stories"
BUILT_LIBS_DIR: "./dist/libs"
NODE_MODULES_DIR: "./node_modules"
SMART_RUNNER_DIRECTORY: ".protractor-smartrunner"
SAVE_SCREENSHOT: true
REDIRECT_URI: /
BROWSER_RUN: false
MAXINSTANCES: 2
PLAYWRIGHT_WORKERS: 2
PLAYWRIGHT_STORYBOOK_E2E_HOST: http://localhost
PLAYWRIGHT_STORYBOOK_E2E_PORT: 4400
jobs:
setup:
@@ -135,7 +98,7 @@ jobs:
setMigrations();
- name: Build libraries
run: |
npx nx affected:build $NX_CALCULATION_FLAGS --prod --exclude="demoshell" --skip-nx-cache
npx nx affected:build $NX_CALCULATION_FLAGS --prod --skip-nx-cache
npx nx affected $NX_CALCULATION_FLAGS --target=pretheme
npx nx affected $NX_CALCULATION_FLAGS --target=build-schematics
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2

View File

@@ -32,57 +32,22 @@ env:
GH_RUN_NUMBER: ${{ github.run_attempt }}
GH_BUILD_NUMBER: ${{ github.run_id }}
JOB_ID: ${{ github.run_id }}
PROXY_HOST_BPM: ${{ secrets.E2E_HOST }}
E2E_IDENTITY_HOST_APA: ${{ secrets.E2E_IDENTITY_HOST_APA }}
E2E_HOST_APA: ${{ secrets.E2E_HOST_APA }}
E2E_HOST: ${{ secrets.E2E_HOST }}
E2E_USERNAME: ${{ secrets.E2E_ADMIN_EMAIL_IDENTITY }}
E2E_PASSWORD: ${{ secrets.E2E_PASSWORD }}
E2E_ADMIN_EMAIL_IDENTITY: ${{ secrets.E2E_ADMIN_EMAIL_IDENTITY }}
E2E_ADMIN_PASSWORD_IDENTITY: ${{ secrets.E2E_ADMIN_PASSWORD_IDENTITY }}
#USERNAME_ADF: ${{ secrets.E2E_USERNAME }}
USERNAME_ADF: ${{ secrets.E2E_ADMIN_EMAIL_IDENTITY }}
PASSWORD_ADF: ${{ secrets.E2E_PASSWORD }}
URL_HOST_ADF: "http://localhost:4200"
IDENTITY_ADMIN_EMAIL: ${{ secrets.E2E_ADMIN_EMAIL_IDENTITY }}
IDENTITY_ADMIN_PASSWORD: ${{ secrets.E2E_ADMIN_PASSWORD_IDENTITY }}
AWS_S3_BUCKET_ACTIVITI_LICENSE: ${{ secrets.AWS_S3_BUCKET_ACTIVITI_LICENSE }}
HOST_SSO: ${{ secrets.HOST_SSO }}
LOG_LEVEL: "ERROR"
E2E_LOG_LEVEL: "ERROR"
E2E_MODELER_USERNAME: ${{ secrets.E2E_MODELER_USERNAME }}
E2E_MODELER_PASSWORD: ${{ secrets.E2E_MODELER_PASSWORD }}
EXTERNAL_ACS_HOST: ${{ secrets.EXTERNAL_ACS_HOST }}
E2E_DEVOPS_USERNAME: ${{ secrets.E2E_DEVOPS_USERNAME }}
E2E_DEVOPS_PASSWORD: ${{ secrets.E2E_DEVOPS_PASSWORD }}
USERNAME_SUPER_ADMIN_ADF: ${{ secrets.USERNAME_SUPER_ADMIN_ADF }}
PASSWORD_SUPER_ADMIN_ADF: ${{ secrets.PASSWORD_SUPER_ADMIN_ADF }}
HR_USER: ${{ secrets.HR_USER }}
HR_USER_PASSWORD: ${{ secrets.HR_USER_PASSWORD }}
SMART_RUNNER_PATH: ".protractor-smartrunner"
S3_DBP_PATH: ${{ secrets.S3_DBP_PATH }}
S3_BUILD_BUCKET_SHORT_NAME: ${{ secrets.S3_BUILD_BUCKET_SHORT_NAME }}
NODE_OPTIONS: "--max-old-space-size=5120"
DOCKER_REPOSITORY_DOMAIN: ${{ secrets.DOCKER_REPOSITORY_DOMAIN }}
DOCKER_REPOSITORY_USER: ${{ secrets.DOCKER_REPOSITORY_USER }}
DOCKER_REPOSITORY_PASSWORD: ${{ secrets.DOCKER_REPOSITORY_PASSWORD }}
DOCKER_REPOSITORY_STORYBOOK: "${{ secrets.DOCKER_REPOSITORY_DOMAIN }}/alfresco/storybook"
DOCKER_REPOSITORY: "${{ secrets.DOCKER_REPOSITORY_DOMAIN }}/alfresco/demo-shell"
GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}
REPO_OWNER: "Alfresco"
REPO_NAME: "alfresco-ng2-components"
DEMO_SHELL_DIR: "./dist/demo-shell"
STORYBOOK_DIR: "./dist/storybook/stories"
BUILT_LIBS_DIR: "./dist/libs"
NODE_MODULES_DIR: "./node_modules"
SMART_RUNNER_DIRECTORY: ".protractor-smartrunner"
SAVE_SCREENSHOT: true
REDIRECT_URI: /
BROWSER_RUN: false
MAXINSTANCES: 2
PLAYWRIGHT_WORKERS: 2
PLAYWRIGHT_STORYBOOK_E2E_HOST: http://localhost
PLAYWRIGHT_STORYBOOK_E2E_PORT: 4400
jobs:
setup:
@@ -107,32 +72,6 @@ jobs:
npx nx run testing:bundle
- uses: ./.github/actions/upload-node-modules-and-artifacts
release-demoshell:
needs: [setup]
timeout-minutes: 15
if: github.event.pull_request.merged == true || github.ref_name == 'master' || github.ref_name == 'master-patch-*'
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 1
- run: git fetch --all
- id: set-dryrun
uses: ./.github/actions/enable-dryrun
with:
dry-run-flag: ${{ inputs.dry-run-flag }}
- uses: ./.github/actions/setup
with:
enable-cache: false
enable-node-modules-cache: false
- uses: ./.github/actions/download-node-modules-and-artifacts
- name: release Demoshell docker
run: |
npx nx build demoshell --configuration production
. ./scripts/github/release/docker-tag.sh
./scripts/github/release/release-demoshell-docker.sh ${{ steps.set-dryrun.outputs.dryrun }}
release-storybook:
needs: [setup]
timeout-minutes: 15
@@ -194,7 +133,7 @@ jobs:
setMigrations();
- name: build libraries
run: |
npx nx affected:build $NX_CALCULATION_FLAGS --prod --exclude="demoshell" --skip-nx-cache
npx nx affected:build $NX_CALCULATION_FLAGS --prod --skip-nx-cache
npx nx affected $NX_CALCULATION_FLAGS --target=pretheme
npx nx affected $NX_CALCULATION_FLAGS --target=build-schematics
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
@@ -250,7 +189,7 @@ jobs:
if: always()
runs-on: ubuntu-latest
name: Final Results
needs: [release-demoshell, release-storybook, release-npm, npm-check-bundle]
needs: [release-storybook, release-npm, npm-check-bundle]
steps:
- uses: slackapi/slack-github-action@37ebaef184d7626c5f204ab8d3baff4262dd30f0 # v1.27.0