Maurizio Vitale 1fa81962a0
👽 Angular 14 rebase 👽 (#7769)
* fix after rebase

* new release strategy for ng next

Signed-off-by: eromano <eugenioromano16@gmail.com>

* peer dep

Signed-off-by: eromano <eugenioromano16@gmail.com>

* Angular 14

fix unit test and storybook

Signed-off-by: eromano <eugenioromano16@gmail.com>

fix after rebase

Signed-off-by: eromano <eugenioromano16@gmail.com>

update pkg.json

Signed-off-by: eromano <eugenioromano16@gmail.com>

missing dep

Signed-off-by: eromano <eugenioromano16@gmail.com>

Fix mistake and missing code

Dream....build only affected libs

Add utility run commands

* Use nx command to run affected tests

* Fix nx test core

fix content tests

Run unit with watch false

core test fixes

reduce test warnings

Fix process cloud unit

Fix adf unit test

Fix lint process cloud

Disable lint next line

Use right core path

Fix insights unit

fix linting insights

Fix process-services unit

fix the extensions test report

fix test warnings

Fix content unit

Fix bunch of content unit

* Produce an adf alpha of 14

* hopefully fixing the content

* Push back the npm publish

* Remove flaky unit

* Fix linting

* Make the branch as root

* Get rid of angualar13

* Remove the travis depth

* Fixing version for npm

* Enabling cache for unit and build

* Fix scss for core and paths

Copy i18 and asset by using ng-packager

Export the theming alias and fix path

Use ng-package to copy assets process-services-cloud

Use ng-package to copy assets process-services

Use ng-package to copy assets content-services

Use ng-package to copy assets insights

* feat: fix api secondary entry point

* fix storybook rebase

* Move dist under dist/libs from lib/dist

* Fix the webstyle

* Use only necessary nrwl deps and improve lint

* Fix unit for libs

* Convert lint.sh to targets - improve performance

* Use latest of angular

* Align alfresco-js-api

Signed-off-by: eromano <eugenioromano16@gmail.com>
Co-authored-by: eromano <eugenioromano16@gmail.com>
Co-authored-by: Mikolaj Serwicki <mikolaj.serwicki@hyland.com>
Co-authored-by: Tomasz <tomasz.gnyp@hyland.com>
2022-08-25 10:50:30 +01:00

566 lines
20 KiB
YAML

import:
- source: Alfresco/alfresco-build-tools:.travis.docker_hub_login.yml@v1.1.1
git:
depth: false
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="./dist/libs"
- 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(-patch.*)?$/
- /^develop(-patch.*)?$/
- master
- develop
#remove after upgrade
- angular-14-rebase
- /.*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(-patch.*)?$/
- name: "Deprecate develop builds"
if: branch =~ /^master(-patch.*)?$/
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: nx affected:lint $NX_CALCULATION_FLAGS --parallel=5
workspaces:
use: node_modules_cache
- stage: "Build Demo shell"
name: "Demo Shell & Storybook :Build && dockerize"
before_script:
- NODE_OPTIONS="--max-old-space-size=8192" $(npm bin)/nx run cli:build --prod
- ./scripts/build/build-cli.sh
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: nx affected:test $NX_CALCULATION_FLAGS --exclude="insights,core,extensions,process-services,process-services-cloud"
workspaces:
use: built_libs_cache
- stage: "Unit test Lib"
name: "core-extension::unit"
script: nx affected:test $NX_CALCULATION_FLAGS --exclude="insights,content-services,process-services,process-services-cloud"
workspaces:
use: built_libs_cache
- stage: "Unit test Lib"
name: "process-insights::unit"
script: nx affected:test $NX_CALCULATION_FLAGS --exclude="core,extensions,content-services,process-services-cloud"
workspaces:
use: built_libs_cache
- stage: "Unit test Lib"
name: "process-cloud::unit"
script: nx affected:test $NX_CALCULATION_FLAGS --exclude="insights,core,extensions,content-services,process-services"
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 -c $TRAVIS_COMMIT
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: Storybook 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:
create:
name: e2e_cache
paths:
- "$SMART_RUNNER_DIRECTORY"
use:
- built_libs_cache
- built_demo_shell_cache
- e2e_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:
create:
name: e2e_cache
paths:
- "$SMART_RUNNER_DIRECTORY"
use:
- built_libs_cache
- built_demo_shell_cache
- e2e_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:
create:
name: e2e_cache
paths:
- "$SMART_RUNNER_DIRECTORY"
use:
- built_libs_cache
- built_demo_shell_cache
- e2e_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:
create:
name: e2e_cache
paths:
- "$SMART_RUNNER_DIRECTORY"
use:
- built_libs_cache
- built_demo_shell_cache
- e2e_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:
create:
name: e2e_cache
paths:
- "$SMART_RUNNER_DIRECTORY"
use:
- built_libs_cache
- built_demo_shell_cache
- e2e_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:
create:
name: e2e_cache
paths:
- "$SMART_RUNNER_DIRECTORY"
use:
- built_libs_cache
- built_demo_shell_cache
- e2e_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:
create:
name: e2e_cache
paths:
- "$SMART_RUNNER_DIRECTORY"
use:
- built_libs_cache
- built_demo_shell_cache
- e2e_cache
env:
- FOLDER="search"
- PROVIDER="ECM"
- AUTH_TYPE="BASIC"
- stage: "e2e Test"
name: "Process: Form"
before_script:
- ./scripts/ci/job_hooks/before_e2e.sh
- ./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:
create:
name: e2e_cache
paths:
- "$SMART_RUNNER_DIRECTORY"
use:
- built_libs_cache
- built_demo_shell_cache
- e2e_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
- ./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:
create:
name: e2e_cache
paths:
- "$SMART_RUNNER_DIRECTORY"
use:
- built_libs_cache
- built_demo_shell_cache
- e2e_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
- ./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:
create:
name: e2e_cache
paths:
- "$SMART_RUNNER_DIRECTORY"
use:
- built_libs_cache
- built_demo_shell_cache
- e2e_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
- ./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:
create:
name: e2e_cache
paths:
- "$SMART_RUNNER_DIRECTORY"
use:
- built_libs_cache
- built_demo_shell_cache
- e2e_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:
create:
name: e2e_cache
paths:
- "$SMART_RUNNER_DIRECTORY"
use:
- built_libs_cache
- built_demo_shell_cache
- e2e_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:
create:
name: e2e_cache
paths:
- "$SMART_RUNNER_DIRECTORY"
use:
- built_libs_cache
- built_demo_shell_cache
- e2e_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:
create:
name: e2e_cache
paths:
- "$SMART_RUNNER_DIRECTORY"
use:
- built_libs_cache
- built_demo_shell_cache
- e2e_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:
create:
name: e2e_cache
paths:
- "$SMART_RUNNER_DIRECTORY"
use:
- built_libs_cache
- built_demo_shell_cache
- e2e_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:
create:
name: e2e_cache
paths:
- "$SMART_RUNNER_DIRECTORY"
use:
- built_libs_cache
- built_demo_shell_cache
- e2e_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