Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ACS-9102] Local ACS deployment for E2Es #4324

Merged
merged 39 commits into from
Jan 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
cab167c
[ACS-9102] Local ACS deployment draft
MichalKinas Jan 3, 2025
3b5bf56
[ACS-9102] Move ACS deployment to composite action
MichalKinas Jan 3, 2025
df03d31
[ACS-9102] Remove obsolete checks
MichalKinas Jan 3, 2025
eddb4b4
[ACS-9102] Proper secrets for ACS deployment
MichalKinas Jan 3, 2025
7835348
[ACS-9102] Add required shell property
MichalKinas Jan 3, 2025
8cea9d0
[ACS-9102] Use fixed acs deployment version
MichalKinas Jan 3, 2025
15793c8
[ACS-9102] Proper acs deployment tag
MichalKinas Jan 3, 2025
35005a9
[ACS-9102] Add required shell property
MichalKinas Jan 3, 2025
177a777
[ACS-9102] Fix helm install params
MichalKinas Jan 3, 2025
4c2a0b4
[ACS-9102] Remove obsolete checkout
MichalKinas Jan 3, 2025
2879b8e
[ACS-9102] Use more powerful runner for E2Es
MichalKinas Jan 3, 2025
509bb18
[ACS-9102] Introduce temp secrets
MichalKinas Jan 3, 2025
321ac81
test curl localhost
gionn Jan 3, 2025
3d8cfb6
skip n-1 matrix jobs
gionn Jan 3, 2025
a62040c
test ipv4 first
gionn Jan 3, 2025
b64c592
[ACS-9102] Adjust Playwright E2E host
MichalKinas Jan 10, 2025
99d8160
[ACS-9102] Bring back matrix job
MichalKinas Jan 10, 2025
3cbe1f5
disable unnecessary acs components
gionn Jan 10, 2025
6b57e26
debug ingress after tests run
gionn Jan 10, 2025
46ae848
[ACS-9102] Fix folder-rules test suite
MichalKinas Jan 10, 2025
fd54a0d
[ACS-9102] Fix part of viewer test suite
MichalKinas Jan 10, 2025
99eeb70
[ACS-9102] Additional E2E fixes
MichalKinas Jan 10, 2025
d5c184e
[ACS-9102] fixes for e2es -> empty-list and search
datguychen Jan 13, 2025
359004b
[ACS-9102] more fixes for e2es and github actions artifacts added for…
datguychen Jan 13, 2025
bc4699c
[ACS-9102] removed artifacts from GHA
datguychen Jan 13, 2025
66f7725
print all logs
gionn Jan 14, 2025
e3c451c
[ACS-9102] Remove outdated secrets
MichalKinas Jan 14, 2025
f5a6213
[ACS-9102] Remove after-e2e action
MichalKinas Jan 14, 2025
b873b3e
do not wait for reindexing
gionn Jan 14, 2025
5be8291
test on latest runner
gionn Jan 14, 2025
a42815a
Always debug ingress logs
gionn Jan 14, 2025
b5a0f76
avoid sleep waiting for app startup
gionn Jan 14, 2025
606419e
cleanup unnecessary action input type
gionn Jan 14, 2025
5afb9c7
fixup indent
gionn Jan 14, 2025
c72b9fc
test with latest acs alpha
gionn Jan 14, 2025
82705fa
Revert "do not wait for reindexing"
gionn Jan 14, 2025
373acd2
[ACS-9102] Exclude unstable test cases
MichalKinas Jan 15, 2025
a981200
[ACS-9102] Exclude unstable test cases
MichalKinas Jan 15, 2025
003acf7
[ACS-9102] Exclude unstable test cases
MichalKinas Jan 15, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .github/acs-deployment-values-override.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
share:
enabled: false
postgresql-sync:
enabled: false
alfresco-sync-service:
enabled: false
alfresco-digital-workspace:
enabled: false
alfresco-control-center:
enabled: false
alfresco-ai-transformer:
enabled: false
elasticsearch-audit:
enabled: false
alfresco-audit-storage:
enabled: false
kibana-audit:
enabled: false
alfresco-repository:
image:
tag: 25.1.0-A.7
9 changes: 0 additions & 9 deletions .github/actions/after-e2e/action.yml

This file was deleted.

97 changes: 97 additions & 0 deletions .github/actions/deploy-local-acs/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
name: deploy-local-acs
description: Deploy local ACS for E2E testing

inputs:
docker_username:
description: 'Docker username'
required: true
docker_password:
description: 'Docker password'
required: true
quay_username:
description: 'Quay username'
required: true
quay_password:
description: 'Quay password'
required: true

runs:
using: "composite"
steps:
- uses: azure/setup-helm@fe7b79cd5ee1e45176fcad797de68ecaf3ca4814
with:
version: "3.14.3"

- name: Login to Docker Hub
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
with:
username: ${{ inputs.docker_username }}
password: ${{ inputs.docker_password }}

- name: Login to Quay.io
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
with:
registry: quay.io
username: ${{ inputs.quay_username }}
password: ${{ inputs.quay_password }}

- name: Setup cluster
uses: Alfresco/alfresco-build-tools/.github/actions/[email protected]
with:
ingress-nginx-ref: controller-v1.8.2
metrics: "true"

- name: Set nginx ingress config
shell: bash
run: >-
kubectl -n ingress-nginx patch cm ingress-nginx-controller
-p '{"data": {"allow-snippet-annotations":"true"}}'

- name: Create registries auth secret
shell: bash
run: >-
kubectl create secret generic regcred
--from-file=.dockerconfigjson=$HOME/.docker/config.json
--type=kubernetes.io/dockerconfigjson

- name: Add dependency chart repos
shell: bash
run: |
helm repo add self https://alfresco.github.io/alfresco-helm-charts/
helm repo add elastic https://helm.elastic.co/

- name: Checkout acs-deployment sources
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
repository: Alfresco/acs-deployment
ref: v8.6.1
path: acs-deployment

- name: Helm install
shell: bash
run: >-
helm dep build acs-deployment/helm/alfresco-content-services &&
helm install acs acs-deployment/helm/alfresco-content-services
--set global.search.sharedSecret="$(openssl rand -hex 24)"
--set global.known_urls=http://localhost
--set global.alfrescoRegistryPullSecrets=regcred
--values acs-deployment/test/enterprise-integration-test-values.yaml
--values .github/acs-deployment-values-override.yaml

- name: Watch Helm deployment
shell: bash
run: |
kubectl get pods --watch &
KWPID=$!
kubectl wait --timeout=7m --all=true --for=condition=Available deploy && kill $KWPID
echo -n "Waiting for ESC Reindexing job to complete... "
kubectl wait --timeout=5m --for=condition=complete job/acs-alfresco-search-enterprise-reindexing
echo "Completed."

- name: Spit cluster status after install
if: always()
shell: bash
run: |
helm ls --all-namespaces --all
helm status acs --show-resources
kubectl describe pod
1 change: 0 additions & 1 deletion .github/actions/get-image-tag/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ inputs:
branch_name:
description: 'Name of the branch the workflow runs on'
required: true
type: string

runs:
using: "composite"
Expand Down
3 changes: 0 additions & 3 deletions .github/actions/git-tag/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,12 @@ inputs:
github_token:
description: 'Github token'
required: true
type: string
branch_name:
description: 'Name of the branch the workflow runs on'
required: true
type: string
dry-run:
description: dry run flag
required: true
type: boolean

runs:
using: "composite"
Expand Down
5 changes: 0 additions & 5 deletions .github/actions/publish-libs/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,18 @@ inputs:
branch_name:
description: 'Name of the branch the workflow runs on'
required: true
type: string
github_token:
description: 'Github token'
required: true
type: string
npm_registry_token:
description: 'NPM registry token'
required: true
type: string
npm_tag:
description: 'NPM tag'
required: true
type: string
dry-run:
description: dry run flag
required: true
type: boolean

runs:
using: "composite"
Expand Down
12 changes: 7 additions & 5 deletions .github/actions/run-e2e-playwright/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,13 @@ inputs:
options:
description: 'Options'
required: true
type: string
test-runner:
description: 'Test runner'
required: false
type: string
default: 'Playwright'
artifact-name:
description: Name of the artifact cache
required: true
type: string

runs:
using: "composite"
Expand All @@ -25,7 +22,12 @@ runs:
run: |
npm start > /dev/null &\

printf "Waiting for the application to be ready..."
while ! curl -sf ${PLAYWRIGHT_E2E_HOST} > /dev/null; do
printf "."
sleep 1
done
printf "\nApplication is ready.\n"

echo "Running playwright tests with options ${{ inputs.options }}"
sleep 90
npx nx run ${{ inputs.options }}-e2e:e2e

2 changes: 0 additions & 2 deletions .github/actions/update-library-versions/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@ inputs:
branch_name:
description: 'Name of the branch the workflow runs on'
required: true
type: string
dry-run:
description: dry run flag
required: true
type: boolean

runs:
using: "composite"
Expand Down
33 changes: 24 additions & 9 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ concurrency:
cancel-in-progress: true

env:
BASE_URL: ${{ secrets.PIPELINE_ENV_URL }}
ADMIN_EMAIL: ${{ secrets.PIPELINE_ADMIN_USERNAME }}
ADMIN_PASSWORD: ${{ secrets.PIPELINE_ADMIN_PASSWORD }}
HR_USER: ${{ secrets.HR_USER }}
HR_USER_PASSWORD: ${{ secrets.HR_USER_PASSWORD }}
BASE_URL: http://localhost
ADMIN_EMAIL: admin
ADMIN_PASSWORD: admin
HR_USER: admin
HR_USER_PASSWORD: admin
SCREENSHOT_USERNAME: ${{ secrets.SCREENSHOT_USERNAME }}
SCREENSHOT_PASSWORD: ${{ secrets.SCREENSHOT_PASSWORD}}
PLAYWRIGHT_E2E_HOST: ${{ secrets.PLAYWRIGHT_E2E_HOST }}
PLAYWRIGHT_E2E_HOST: http://localhost:4200
GH_BUILD_NUMBER: ${{ github.run_id }}
REPORT_PORTAL_URL: ${{ secrets.REPORT_PORTAL_URL }}
REPORT_PORTAL_TOKEN: ${{ secrets.REPORT_PORTAL_TOKEN }}
Expand Down Expand Up @@ -105,7 +105,9 @@ jobs:
e2es-playwright:
needs: [lint, build, unit-tests]
name: 'E2E Playwright - ${{ matrix.e2e-suites.name }}'
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
env:
NODE_OPTIONS: --dns-result-order=ipv4first
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -165,18 +167,31 @@ jobs:
path: ./dist/content-ce
key: cache-dist-${{ github.run_id }}

- name: Deploy local ACS
uses: ./.github/actions/deploy-local-acs
with:
docker_username: ${{ secrets.DOCKER_USERNAME }}
docker_password: ${{ secrets.DOCKER_PASSWORD }}
quay_username: ${{ secrets.QUAY_USERNAME }}
quay_password: ${{ secrets.QUAY_PASSWORD }}

- name: Before e2e
uses: ./.github/actions/before-e2e

- name: before playwright
- name: Before playwright
shell: bash
run: npx playwright install chromium

- uses: ./.github/actions/run-e2e-playwright
with:
options: "${{ matrix.e2e-suites.name }}"
artifact-name: ${{ matrix.e2e-suites.name }}
test-runner: playwright
- uses: ./.github/actions/after-e2e

- name: Debug Ingress Controller Logs
if: always()
run: |
kubectl logs -n ingress-nginx -l app.kubernetes.io/name=ingress-nginx --tail=-1

finalize:
if: ${{ always() }}
Expand Down
4 changes: 3 additions & 1 deletion e2e/playwright/edit-actions/exclude.tests.json
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
{}
{
"XAT-5304": "https://hyland.atlassian.net/browse/ACS-9154"
}
2 changes: 1 addition & 1 deletion e2e/playwright/edit-actions/src/tests/edit-offline.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ test.describe('Edit offline - on Personal Files', () => {
await personalFiles.dataTable.selectItems(file1);
await personalFiles.acaHeader.clickMoreActions();
await personalFiles.matMenu.clickMenuItem('Edit Offline');
const [download] = await Promise.all([personalFiles.page.waitForEvent('download')]);
const [download] = await Promise.all([personalFiles.page.waitForEvent('download', { timeout: 5000 })]);
expect(download.suggestedFilename()).toBe(file1);
});

Expand Down
41 changes: 20 additions & 21 deletions e2e/playwright/folder-rules/src/tests/create-rules.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,24 +131,23 @@ test.describe('Folder Rules Actions', () => {

test('[XAT-888] Create a rule with multiple actions', async ({ personalFiles, nodesPage }) => {
const checkInValue = 'check In Value';
const actionValue = ' A site which contains sfdc content [sfdc:site] ';
const autoDeclareOptionsValue = 'For all major and minor versions [ALL]';
const actionValue = 'Site Container [st:siteContainer]';
const specialiseTypeValue = 'Action Base Type [act:actionbase]';
const simpleWorkFlow = 'accept reject';

await personalFiles.navigate({ remoteUrl: `#/nodes/${randomFolderName1Id}/rules` });
await nodesPage.toolbar.clickCreateRuleButton();
await nodesPage.manageRulesDialog.ruleNameInputLocator.fill(randomRuleName);

await nodesPage.actionsDropdown.selectAction(ActionType.HideRecord, 0);
await nodesPage.actionsDropdown.selectAction(ActionType.IncrementCounter, 1);
await nodesPage.actionsDropdown.selectAction(ActionType.CheckIn, 2);
await nodesPage.actionsDropdown.insertCheckInActionValues(checkInValue, 2);
await nodesPage.actionsDropdown.selectAction(ActionType.AddAspect, 3);
await nodesPage.actionsDropdown.insertAddAspectActionValues(actionValue, 3);
await nodesPage.actionsDropdown.selectAction(ActionType.AutoDeclareOptions, 4);
await nodesPage.actionsDropdown.insertAutoDeclareOptionsActionValues(autoDeclareOptionsValue, 4);
await nodesPage.actionsDropdown.selectAction(ActionType.SimpleWorkflow, 5);
await nodesPage.actionsDropdown.insertSimpleWorkflowActionValues(simpleWorkFlow, 5);
await nodesPage.actionsDropdown.selectAction(ActionType.IncrementCounter, 0);
await nodesPage.actionsDropdown.selectAction(ActionType.CheckIn, 1);
await nodesPage.actionsDropdown.insertCheckInActionValues(checkInValue, 1);
await nodesPage.actionsDropdown.selectAction(ActionType.AddAspect, 2);
await nodesPage.actionsDropdown.insertAddAspectActionValues(actionValue, 2);
await nodesPage.actionsDropdown.selectAction(ActionType.SpecialiseType, 3);
await nodesPage.actionsDropdown.insertSpecialiseTypeActionValues(specialiseTypeValue, 3);
await nodesPage.actionsDropdown.selectAction(ActionType.SimpleWorkflow, 4);
await nodesPage.actionsDropdown.insertSimpleWorkflowActionValues(simpleWorkFlow, 4);

await nodesPage.manageRulesDialog.createRuleButton.click();

Expand Down Expand Up @@ -185,26 +184,26 @@ test.describe('Folder Rules Actions', () => {
await nodesPage.toolbar.clickCreateRuleButton();
await nodesPage.manageRulesDialog.ruleNameInputLocator.fill(randomRuleName);
await nodesPage.actionsDropdown.selectAction(ActionType.AddAspect, 0);
await nodesPage.actionsDropdown.insertAddAspectActionValues('Controls', 0);
await nodesPage.actionsDropdown.insertAddAspectActionValues('Classifiable', 0);
await nodesPage.actionsDropdown.selectAction(ActionType.AddAspect, 1);
await nodesPage.actionsDropdown.insertAddAspectActionValues('CMM', 1);
await nodesPage.actionsDropdown.insertAddAspectActionValues('Countable', 1);
await nodesPage.actionsDropdown.selectAction(ActionType.AddAspect, 2);
await nodesPage.actionsDropdown.insertAddAspectActionValues('folder', 2);
await nodesPage.actionsDropdown.insertAddAspectActionValues('Incomplete', 2);
await nodesPage.actionsDropdown.selectAction(ActionType.AddAspect, 3);
await nodesPage.actionsDropdown.insertAddAspectActionValues('site which', 3);
await nodesPage.actionsDropdown.insertAddAspectActionValues('Site container', 3);
await nodesPage.manageRulesDialog.createRuleButton.click();
await nodesPage.manageRulesDialog.createRuleButton.waitFor({ state: 'hidden' });
await nodesPage.manageRules.getGroupsList(randomRuleName).click();

await nodesPage.manageRules.checkAspects(['sc:controlsAreClearance', 'sfdc:objectModel', 'sfdc:folder', 'sfdc:site']);
await nodesPage.manageRules.checkAspects(['cm:generalclassifiable', 'cm:countable', 'sys:incomplete', 'st:siteContainer']);
});

test('[XAT-891] Prevent rule creation after clicking on cancel during selecting destination folder', async ({ nodesPage, personalFiles }) => {
await personalFiles.navigate({ remoteUrl: `#/nodes/${randomFolderName1Id}/rules` });
await nodesPage.toolbar.clickCreateRuleButton();
await nodesPage.manageRulesDialog.ruleNameInputLocator.fill(randomRuleName);
await nodesPage.actionsDropdown.selectAction(ActionType.AddAspect, 0);
await nodesPage.actionsDropdown.insertAddAspectActionValues('Controls', 0);
await nodesPage.actionsDropdown.insertAddAspectActionValues('Classifiable', 0);
await expect(nodesPage.manageRulesDialog.createRuleButton).toBeEnabled();
await nodesPage.actionsDropdown.selectAction(ActionType.Copy, 1);
await nodesPage.manageRulesDialog.destinationFolderButton.click();
Expand All @@ -217,7 +216,7 @@ test.describe('Folder Rules Actions', () => {
await nodesPage.toolbar.clickCreateRuleButton();
await nodesPage.manageRulesDialog.ruleNameInputLocator.fill(randomRuleName);
await nodesPage.actionsDropdown.selectAction(ActionType.AddAspect, 0);
await nodesPage.actionsDropdown.insertAddAspectActionValues('Controls', 0);
await nodesPage.actionsDropdown.insertAddAspectActionValues('Classifiable', 0);
await expect(nodesPage.manageRulesDialog.createRuleButton).toBeEnabled();
await nodesPage.actionsDropdown.selectAction(ActionType.Copy, 1);
await expect(nodesPage.manageRulesDialog.createRuleButton).toBeDisabled();
Expand All @@ -228,7 +227,7 @@ test.describe('Folder Rules Actions', () => {
await nodesPage.toolbar.clickCreateRuleButton();
await nodesPage.manageRulesDialog.ruleNameInputLocator.fill(randomRuleName);
await nodesPage.actionsDropdown.selectAction(ActionType.AddAspect, 0);
await nodesPage.actionsDropdown.insertAddAspectActionValues('Controls', 0);
await nodesPage.actionsDropdown.insertAddAspectActionValues('Classifiable', 0);
await expect(nodesPage.manageRulesDialog.createRuleButton).toBeEnabled();
await nodesPage.actionsDropdown.insertAddAspectActionValues('None', 0);
await expect(nodesPage.manageRulesDialog.createRuleButton).toBeDisabled();
Expand All @@ -239,7 +238,7 @@ test.describe('Folder Rules Actions', () => {
await nodesPage.toolbar.clickCreateRuleButton();
await nodesPage.manageRulesDialog.ruleNameInputLocator.fill(randomRuleName);
await nodesPage.actionsDropdown.selectAction(ActionType.AddAspect, 0);
await nodesPage.actionsDropdown.insertAddAspectActionValues('Controls', 0);
await nodesPage.actionsDropdown.insertAddAspectActionValues('Classifiable', 0);
await expect(nodesPage.manageRulesDialog.createRuleButton).toBeEnabled();
await nodesPage.actionsDropdown.selectAction(ActionType.CheckIn, 1);
await expect(nodesPage.manageRulesDialog.createRuleButton).toBeEnabled();
Expand Down
Loading
Loading