Maurizio Vitale e27833d770
[AAE-9019] - People/Group cloud with HxP ()
* Cover the use cases by mocking them

* Replace the mock with real stream and remove useless code

* Provide new service to fetch groups

* Fix group tests

* Use the interface and token injection

* [AAE-8870] add unit test and mock for new service

* Improve roles condifion

* initialize the stream as part of NgOnInit to be sure it relies on the correct FormControl instance(input)

* Rollback tmp change for roles

* [AAE-8641] people abstraction mock

* [AAE-8641] revert angular.json changes

* [AAE-8641] few conditions and code improvements

* [AAE-8641] revert change input controls name

* [AAE-8641] initialize the stream as part of ngOnInit

* [AAE-8641] people abstraction improvements

* [AAE-8870] cherry pick people abstraction

* [AAE-8641] fix people-group e2es

* fix lint

* remove hardcoded identityHost

* Use the identityhost api in case of cloud

* Solve issue with returnType array string

* Rebase and use GroupModel from cloud

* Rebase and use GroupModel from cloud

* Use the bpmHost instead of identityFor

* Add identity ingress for user access service

* Rename test

* Fix linting issues

* Fix playwright storybook e2e for people and group

* Trigger travis

* Fix people group e2e

* improved formatting

* Remove not needed travis var override

* Remove unused import after rebase

* Make roles in filter optional + remove comments

Co-authored-by: Tomasz <tomasz.gnyp@hyland.com>
Co-authored-by: arditdomi <ardit.domi@hyland.com>
2022-06-28 16:21:59 +01:00

479 lines
17 KiB
YAML

import:
- source: Alfresco/alfresco-build-tools:.travis.docker_hub_login.yml@v1.1.1
git:
depth: 3
quiet: true
language: node_js
arch: arm64-graviton2
dist: bionic
node_js:
- '14'
before_install: . ./scripts/ci/job_hooks/before_install.sh
install: ./scripts/ci/job_hooks/install.sh
env:
global:
# REPOSITORY
- REPO_OWNER="Alfresco"
- REPO_NAME="alfresco-ng2-components"
- S3_DBP_PATH="s3://alfresco-travis-builds/adf"
- DEMO_SHELL_DIR="./dist/demo-shell"
- BUILT_LIBS_DIR="./lib/dist"
- NODE_MODULES_DIR="./node_modules"
- SMART_RUNNER_DIRECTORY=".protractor-smartrunner"
#E2E VARIABLES
- SAVE_SCREENSHOT=true
- REDIRECT_URI=/
- BROWSER_RUN=true
- MAXINSTANCES=2
- PROXY_HOST_ECM=$E2E_HOST
- PROXY_HOST_BPM=$E2E_HOST
- HOST_SSO=$HOST_SSO
- USERNAME_ADF=$E2E_USERNAME
- PASSWORD_ADF=$E2E_PASSWORD
- IDENTITY_ADMIN_EMAIL=$E2E_ADMIN_EMAIL_IDENTITY
- IDENTITY_ADMIN_PASSWORD=$E2E_ADMIN_PASSWORD_IDENTITY
- URL_HOST_ADF="http://localhost:4200"
#PLAYWRIGHT VARIABLES
- PLAYWRIGHT_WORKERS=2
- PLAYWRIGHT_STORYBOOK_E2E_HOST=http://localhost
- PLAYWRIGHT_STORYBOOK_E2E_PORT=4400
branches:
only:
- master
- develop
- /.*old-env.*/
- /.*next-release.*/
- /.*beta.*/
stages:
- name: Prerequisite
- name: Setup
- name: "Build lib"
if: tag IS blank
- name: "Check bundle"
if: type = push AND tag IS blank OR (type = cron || type = api)
- name: "Trigger Alpha ADF child build"
if: (branch = develop AND (type = cron || type = api)) OR commit_message =~ /\[trigger adf\]/
- name: "Build Demo shell"
if: tag IS blank
- name: "Unit test Lib"
if: type = pull_request || (type = cron || type = api)
- name: "e2e Test"
if: type = pull_request || (type = cron || type = api)
- name: "Release tag"
if: branch = master
- name: "Deprecate develop builds"
if: branch = master
addons:
chrome: stable
before_script:
- export GIT_HASH=`git rev-parse HEAD`
services:
- xvfb
jobs:
include:
# Big Bang ===================
- stage: Prerequisite
name: "Before anything unnece$$ary happens..."
if: type == pull_request
language: python
python: 3.8
install: echo "no install here"
script: ./scripts/ci/jobs/dbpci-build-guard-check $TRAVIS_PULL_REQUEST || exit 1
# Setup ======================
- stage: Setup
name: "Node modules cache preparation"
script: echo "Only here for setting up the shared node_modules"
workspaces:
create:
name: node_modules_cache
paths:
- "$NODE_MODULES_DIR"
use: node_modules_cache
# Run Only for any PR
- stage: "Build lib"
name: "Lib::Build"
script:
- ./scripts/travis/build/build-libs.sh || travis_terminate 1
- ./scripts/travis/release/release-npm.sh || travis_terminate 1
workspaces:
create:
name: built_libs_cache
paths:
- "$BUILT_LIBS_DIR"
- "$NODE_MODULES_DIR"
use: node_modules_cache
- stage: "Build lib"
name: "Lint"
script: ./scripts/lint.sh
workspaces:
use: node_modules_cache
- stage: "Build Demo shell"
name: "Demo Shell & Storybook :Build && dockerize"
script:
# Build Demo shell & Storybook for production docker"
- NODE_OPTIONS=--max_old_space_size=8192 nx build demoshell --configuration production
- NODE_OPTIONS=--max_old_space_size=8192 nx run stories:build-storybook --configuration ci
- ./scripts/travis/release/release-docker.sh
workspaces:
create:
name: built_demo_shell_cache
paths:
- "$DEMO_SHELL_DIR"
use:
- built_libs_cache
- stage: "Unit test Lib"
name: "content::unit"
script: ./scripts/travis/unit-test/content.sh
workspaces:
use: built_libs_cache
- stage: "Unit test Lib"
name: "core-extension::unit"
script: ./scripts/travis/unit-test/core-extension.sh
workspaces:
use: built_libs_cache
- stage: "Unit test Lib"
name: "process-insights::unit"
script: ./scripts/travis/unit-test/process.sh
workspaces:
use: built_libs_cache
- stage: "Unit test Lib"
name: "process-cloud::unit"
script: ./scripts/travis/unit-test/process-cloud.sh
workspaces:
use: built_libs_cache
- stage: "Trigger Alpha ADF child build"
name: "Trigger Alpha ADF child build"
script: ./scripts/travis/update/update-project.sh -p $TRAVIS_BUILD_NUMBER -t $GITHUB_TOKEN -v alpha
workspaces:
use: built_libs_cache
- stage: "Release tag"
script: ./scripts/travis/release/git-tag.sh
- stage: "Deprecate develop builds"
script:
- ADF_VERSION=$(npm view @alfresco/adf-core@${TAG_NPM} version)
- ./scripts/travis/release/deprecate-develop-build.sh -v ${ADF_VERSION}
- stage: "e2e Test"
name: "Process Cloud:playwright"
before_script: ./scripts/ci/jobs/dbpci-before-playwright
script: ./scripts/travis/storybook-testing/storybook-test.sh
workspaces:
use:
- built_libs_cache
- built_demo_shell_cache
- stage: "e2e Test"
name: "Core"
before_script:
- ./scripts/ci/job_hooks/before_e2e.sh
- ./scripts/ci/check-env/check-cs-env.sh || travis_terminate 1
- ./scripts/ci/check-env/check-ps-env.sh || travis_terminate 1
script: ./scripts/travis/e2e/e2e.sh
after_script: ./scripts/ci/job_hooks/after_e2e.sh
workspaces:
use:
- built_libs_cache
- built_demo_shell_cache
env:
- FOLDER="core"
- PROVIDER='ALL'
- AUTH_TYPE='OAUTH'
- stage: "e2e Test"
name: "Content: Components"
before_script:
- ./scripts/ci/job_hooks/before_e2e.sh
- ./scripts/ci/check-env/check-cs-env.sh || travis_terminate 1
script: ./scripts/travis/e2e/e2e.sh
after_script: ./scripts/ci/job_hooks/after_e2e.sh
workspaces:
use:
- built_libs_cache
- built_demo_shell_cache
env:
- FOLDER="content-services/components"
- PROVIDER="ECM"
- AUTH_TYPE="BASIC"
- stage: "e2e Test"
name: "Content: Directives"
before_script:
- ./scripts/ci/job_hooks/before_e2e.sh
- ./scripts/ci/check-env/check-cs-env.sh || travis_terminate 1
script: ./scripts/travis/e2e/e2e.sh
after_script: ./scripts/ci/job_hooks/after_e2e.sh
workspaces:
use:
- built_libs_cache
- built_demo_shell_cache
env:
- FOLDER="content-services/directives"
- PROVIDER="ECM"
- AUTH_TYPE="BASIC"
- stage: "e2e Test"
name: "Content: Document List"
before_script:
- ./scripts/ci/job_hooks/before_e2e.sh
- ./scripts/ci/check-env/check-cs-env.sh || travis_terminate 1
script: ./scripts/travis/e2e/e2e.sh
after_script: ./scripts/ci/job_hooks/after_e2e.sh
workspaces:
use:
- built_libs_cache
- built_demo_shell_cache
env:
- FOLDER="content-services/document-list"
- PROVIDER="ECM"
- AUTH_TYPE="BASIC"
- stage: "e2e Test"
name: "Content: Metadata"
before_script:
- ./scripts/ci/job_hooks/before_e2e.sh
- ./scripts/ci/check-env/check-cs-env.sh || travis_terminate 1
script: ./scripts/travis/e2e/e2e.sh
after_script: ./scripts/ci/job_hooks/after_e2e.sh
workspaces:
use:
- built_libs_cache
- built_demo_shell_cache
env:
- FOLDER="content-services/metadata"
- PROVIDER="ECM"
- AUTH_TYPE="BASIC"
- stage: "e2e Test"
name: "Content: Upload and Versioning"
before_script:
- ./scripts/ci/job_hooks/before_e2e.sh
- ./scripts/ci/check-env/check-cs-env.sh || travis_terminate 1
script: ./scripts/travis/e2e/e2e.sh
after_script: ./scripts/ci/job_hooks/after_e2e.sh
workspaces:
use:
- built_libs_cache
- built_demo_shell_cache
env:
- FOLDER="content-services/upload"
- PROVIDER="ECM"
- AUTH_TYPE="BASIC"
- stage: "e2e Test"
name: "Search"
before_script:
- ./scripts/ci/job_hooks/before_e2e.sh
- ./scripts/ci/check-env/check-cs-env.sh || travis_terminate 1
script: ./scripts/travis/e2e/e2e.sh
after_script: ./scripts/ci/job_hooks/after_e2e.sh
workspaces:
use:
- built_libs_cache
- built_demo_shell_cache
env:
- FOLDER="search"
- PROVIDER="ECM"
- AUTH_TYPE="BASIC"
- stage: "e2e Test"
name: "Process: Form"
before_script:
- ./scripts/ci/job_hooks/before_e2e.sh || travis_terminate 1
- ./scripts/ci/check-env/check-ps-env.sh || travis_terminate 1
- ./scripts/ci/check-env/check-external-cs-env.sh || travis_terminate 1
script: ./scripts/travis/e2e/e2e.sh
after_script: ./scripts/ci/job_hooks/after_e2e.sh
workspaces:
use:
- built_libs_cache
- built_demo_shell_cache
env:
- FOLDER="process-services/form"
- PROVIDER="BPM"
- AUTH_TYPE="OAUTH"
- stage: "e2e Test"
name: "Process: Process"
before_script:
- ./scripts/ci/job_hooks/before_e2e.sh || travis_terminate 1
- ./scripts/ci/check-env/check-ps-env.sh || travis_terminate 1
- ./scripts/ci/check-env/check-external-cs-env.sh || travis_terminate 1
script: ./scripts/travis/e2e/e2e.sh
after_script: ./scripts/ci/job_hooks/after_e2e.sh
workspaces:
use:
- built_libs_cache
- built_demo_shell_cache
env:
- FOLDER="process-services/process"
- PROVIDER="BPM"
- AUTH_TYPE="OAUTH"
- stage: "e2e Test"
name: "Process: Tasks"
before_script:
- ./scripts/ci/job_hooks/before_e2e.sh || travis_terminate 1
- ./scripts/ci/check-env/check-ps-env.sh || travis_terminate 1
- ./scripts/ci/check-env/check-external-cs-env.sh || travis_terminate 1
script: ./scripts/travis/e2e/e2e.sh
after_script: ./scripts/ci/job_hooks/after_e2e.sh
workspaces:
use:
- built_libs_cache
- built_demo_shell_cache
env:
- FOLDER="process-services/tasks"
- PROVIDER="BPM"
- AUTH_TYPE="OAUTH"
- stage: "e2e Test"
name: "Process: Widgets"
before_script:
- ./scripts/ci/job_hooks/before_e2e.sh || travis_terminate 1
- ./scripts/ci/check-env/check-ps-env.sh || travis_terminate 1
- ./scripts/ci/check-env/check-external-cs-env.sh || travis_terminate 1
script: ./scripts/travis/e2e/e2e.sh
after_script: ./scripts/ci/job_hooks/after_e2e.sh
workspaces:
use:
- built_libs_cache
- built_demo_shell_cache
env:
- FOLDER="process-services/widgets"
- PROVIDER="BPM"
- AUTH_TYPE="OAUTH"
- stage: "e2e Test"
name: "Process Cloud : Form"
before_script:
- ./scripts/ci/job_hooks/before_e2e.sh
- ./scripts/ci/check-env/check-cs-env.sh || travis_terminate 1
- ./scripts/ci/check-env/check-ps-cloud-env.sh || travis_terminate 1
script: ./scripts/travis/e2e/e2e.sh
after_script: ./scripts/ci/job_hooks/after_e2e.sh
workspaces:
use:
- built_libs_cache
- built_demo_shell_cache
env:
- FOLDER="process-services-cloud/form-field"
- PROVIDER="ALL"
- AUTH_TYPE="OAUTH"
- PROXY_HOST_BPM=$E2E_HOST_APA
- stage: "e2e Test"
name: "Process Cloud : People"
before_script:
- ./scripts/ci/job_hooks/before_e2e.sh
- ./scripts/ci/check-env/check-cs-env.sh || travis_terminate 1
- ./scripts/ci/check-env/check-ps-cloud-env.sh || travis_terminate 1
script: ./scripts/travis/e2e/e2e.sh
after_script: ./scripts/ci/job_hooks/after_e2e.sh
workspaces:
use:
- built_libs_cache
- built_demo_shell_cache
env:
- FOLDER="process-services-cloud/people"
- PROVIDER="ALL"
- AUTH_TYPE="OAUTH"
- PROXY_HOST_BPM=$E2E_HOST_APA
- stage: "e2e Test"
name: "Process Cloud : Process"
before_script:
- ./scripts/ci/job_hooks/before_e2e.sh
- ./scripts/ci/check-env/check-cs-env.sh || travis_terminate 1
- ./scripts/ci/check-env/check-ps-cloud-env.sh || travis_terminate 1
script: ./scripts/travis/e2e/e2e.sh
after_script: ./scripts/ci/job_hooks/after_e2e.sh
workspaces:
use:
- built_libs_cache
- built_demo_shell_cache
env:
- FOLDER="process-services-cloud/process"
- PROVIDER="ALL"
- AUTH_TYPE="OAUTH"
- PROXY_HOST_BPM=$E2E_HOST_APA
- stage: "e2e Test"
name: "Process Cloud : Start Task"
before_script:
- ./scripts/ci/job_hooks/before_e2e.sh
- ./scripts/ci/check-env/check-cs-env.sh || travis_terminate 1
- ./scripts/ci/check-env/check-ps-cloud-env.sh || travis_terminate 1
script: ./scripts/travis/e2e/e2e.sh
after_script: ./scripts/ci/job_hooks/after_e2e.sh
workspaces:
use:
- built_libs_cache
- built_demo_shell_cache
env:
- FOLDER="process-services-cloud/start-task"
- PROVIDER="ALL"
- AUTH_TYPE="OAUTH"
- PROXY_HOST_BPM=$E2E_HOST_APA
- stage: "e2e Test"
name: "Process Cloud : Tasks List"
before_script:
- ./scripts/ci/job_hooks/before_e2e.sh
- ./scripts/ci/check-env/check-cs-env.sh || travis_terminate 1
- ./scripts/ci/check-env/check-ps-cloud-env.sh || travis_terminate 1
script: ./scripts/travis/e2e/e2e.sh
after_script: ./scripts/ci/job_hooks/after_e2e.sh
workspaces:
use:
- built_libs_cache
- built_demo_shell_cache
env:
- FOLDER="process-services-cloud/task-list"
- PROVIDER="ALL"
- AUTH_TYPE="OAUTH"
- PROXY_HOST_BPM=$E2E_HOST_APA
- stage: Check bundle
script:
- ADF_VERSION=$(npm view @alfresco/adf-core@${TAG_NPM} version)
- ./scripts/travis/build/npm-check-bundles.sh -v ${ADF_VERSION}
workspaces:
use: built_libs_cache
notifications:
slack:
on_pull_requests: false
rooms:
secure: "qcTP/+rhVweMSZZAQMPz4sW7boS8XC0RX1SPYgg7hIfxBr9747WpRLkJ1sirkVaXI/6XfYAyl42CTfPmTuJxIC+co/NSnEDknwVsnKZd0O/ykTpo+mxIN4BTZX8dm+gELR5IEYQPs+Yki3ZnD9b+0mCK1yD8JallKCQeE2U9BhzZhP/Fn0ce35EulybNp3QQDaox0XC+7gadMdxlvK8mzP1scw76wRLtx25QLxxV+OwEw0bzyh8y3onfjHfnoDcUQWRTNdnjapzmgf1LNdC202A5kwp5sJggfSDr+ActRqaMvv4BbMsFpdan34B6zPQJfyZL1r8IB8O8BEKcAaOUVcTjnZAOom8kHS8F07/mo5xnNYmV8oNX2/egr1CiG4U0EAGF2XGqM+vetYnF88LTEzy84kVxmSwKGVfzlGOyTplMXJ1iCENndtfWm1AXhAFj5RSsSAZg6IStTM+mcpnC75moEwQtj8bTenwehHz1HQAjQX7xeTQo27SxDc7oqp1ReyXCllMjKxckjVGmp2j6yxn1Jl55kivBj57vluLtEtziOGluVELP5E2fV0VAuErNhnjLm4LJARVN76PQaTOXYwATVVJJDhb/77TesvxQsr3VfiROEKm7QB7IDFjghjLLisSX67JQ5+7K/qMlqf9+9hNw4n0v1eMylVjt+gyxspc="
on_failure: always
on_success: change
template:
- "Repo `%{repository_slug}` *%{result}* build (<%{build_url}|#%{build_number}>) for commit (<%{compare_url}|%{commit}>) on branch `%{branch}`."
- "Author: %{author} Execution time: *%{duration}*"
- "Message: %{message}"
cache:
npm: false
directories:
- tmp