2022-11-04 16:34:58 +00:00

623 lines
23 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"
- STORYBOOK_DIR="./dist/storybook/stories"
- BUILT_LIBS_DIR="./dist/libs"
- NODE_MODULES_DIR="./node_modules"
- SMART_RUNNER_DIRECTORY=".protractor-smartrunner"
#E2E VARIABLES
- SAVE_SCREENSHOT=true
- REDIRECT_URI=/
- BROWSER_RUN=false
- 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
- /.*old-env.*/
- /.*next-release.*/
- /.*beta.*/
stages:
- name: Prerequisite
- name: Setup
- name: "Build"
if: tag IS blank AND (type = pull_request OR type = cron OR type = api)
- name: "Trigger Alpha ADF child build"
if: type = cron OR (type = api AND commit_message =~ /\[trigger adf\]/)
- name: "Release"
if: type = push
- name: "Unit test Lib"
if: type = pull_request OR type = cron OR type = api
- name: "e2e Test"
if: type = pull_request OR type = cron OR type = api
- name: "Release tag"
if: branch =~ /^master(-patch.*)?$/
- name: "Check bundle"
if: type = push AND tag IS blank OR (type = cron || type = api)
- 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
- stage: "Build"
name: "Lib::Build"
install: echo "no install"
script: $(npm bin)/nx affected:build $NX_CALCULATION_FLAGS --prod --exclude="demoshell"
workspaces:
create:
name: built_libs_cache
paths:
- "$BUILT_LIBS_DIR"
- "$NODE_MODULES_DIR"
use: node_modules_cache
- stage: "Build"
name: "Lint"
install: echo "no install"
script: $(npm bin)/nx affected:lint $NX_CALCULATION_FLAGS --parallel=5
workspaces:
use: node_modules_cache
- stage: "Build"
name: "Demo Shell::Build"
install: echo "no install"
script: $(npm bin)/nx build demoshell --configuration production
workspaces:
create:
name: built_demo_shell_cache
paths:
- "$DEMO_SHELL_DIR"
use:
- node_modules_cache
- stage: "Build"
name: "Storybook::Build"
install: echo "no install"
script: $(npm bin)/nx run stories:build-storybook --configuration ci
workspaces:
create:
name: built_storybook_cache
paths:
- "$STORYBOOK_DIR"
use:
- node_modules_cache
- stage: "Unit test Lib"
name: "content::unit"
install: echo "no install"
script: $(npm bin)/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"
install: echo "no install"
script: $(npm bin)/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"
install: echo "no install"
script: $(npm bin)/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"
install: echo "no install"
script: $(npm bin)/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"
name: "release libs::npm"
install: echo "no install"
script:
- ./scripts/travis/build/bumpversion.sh || travis_terminate 1
- $(npm bin)/nx affected:build $NX_CALCULATION_FLAGS --prod --exclude="demoshell" || travis_terminate 1
- $(npm bin)/nx affected $NX_CALCULATION_FLAGS --target=pretheme || travis_terminate 1
- ./scripts/travis/release/release-npm.sh || travis_terminate 1
workspaces:
use: node_modules_cache
- stage: "Release"
name: "release demoshell::docker"
install: echo "no install"
script:
- $(npm bin)/nx build demoshell --configuration production || travis_terminate 1
- . ./scripts/travis/release/docker-tag.sh || travis_terminate 1
- ./scripts/travis/release/release-demoshell-docker.sh
workspaces:
use: node_modules_cache
- stage: "Release"
name: "release storybook::docker"
install: echo "no install"
script:
- $(npm bin)/nx run stories:build-storybook --configuration ci || travis_terminate 1
- . ./scripts/travis/release/docker-tag.sh || travis_terminate 1
- ./scripts/travis/release/release-storybook-docker.sh || travis_terminate 1
workspaces:
use: node_modules_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"
install: echo "no install"
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"
install: echo "no install"
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 "core"
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"
install: echo "no install"
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 "content-services"
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"
install: echo "no install"
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 "content-services"
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"
install: echo "no install"
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 "content-services"
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"
install: echo "no install"
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 "content-services"
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"
install: echo "no install"
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 "content-services" "browser"
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"
install: echo "no install"
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 "content-services"
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"
install: echo "no install"
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 "process-services"
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"
install: echo "no install"
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 "process-services"
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"
install: echo "no install"
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 "process-services"
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"
install: echo "no install"
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 "process-services"
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"
install: echo "no install"
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 "process-services-cloud"
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 "process-services-cloud"
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"
install: echo "no install"
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 "process-services-cloud"
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"
install: echo "no install"
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 "process-services-cloud"
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"
install: echo "no install"
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 "process-services-cloud"
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
install: echo "no install"
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