mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
* Try to build on travis * Use the new quay repository called storybook * Build and release demoshell and storybook toghether
457 lines
16 KiB
YAML
457 lines
16 KiB
YAML
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_ADF=$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"
|
|
|
|
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
|
|
- name: "Trigger Alpha ADF child build"
|
|
if: branch = develop AND (type = cron || type = api)
|
|
- 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 process-services-cloud: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: "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"
|
|
|
|
- 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"
|
|
|
|
- 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"
|
|
|
|
- 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"
|
|
|
|
- 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"
|
|
|
|
- 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
|