alfresco-content-app/.travis.yml

244 lines
10 KiB
YAML

# =================
# merge anchor
# =================
dist: bionic
sudo: required
services:
- xvfb
addons:
chrome: stable
language: node_js
node_js:
- '14'
cache:
directories:
- node_modules
branches:
only:
- master
- develop
- /.*beta.*/
before_install: . ./scripts/ci/job_hooks/before_install.sh
install: echo "no install"
stages:
- name: Quality and Unit tests
if: type = cron || type = pull_request
- name: Publish Docker Registry
if: type = push
- name: Release Tag and Publish to Dockerhub
if: branch = master AND type = push
- name: e2e
if: type = cron || type = pull_request
- name: Trigger DW
if: branch = develop AND (type = cron OR (type = api AND commit_message =~ /\[trigger aca\]/))
env:
global:
- ADMIN_EMAIL=$ADMIN_EMAIL_REMOTE
- ADMIN_PASSWORD=$ADMIN_PASSWORD_REMOTE
- CONTENT_CE_DIST_PATH="./dist/content-ce"
# APP CONFIG DEFAULTS
- APP_CONFIG_PROVIDER=ECM
- APP_CONFIG_AUTH_TYPE=BASIC
- APP_CONFIG_OAUTH2_HOST=http://localhost:4200/auth/realms/alfresco
- APP_CONFIG_OAUTH2_CLIENTID=alfresco
- APP_CONFIG_PLUGIN_AOS=true
- APP_CONFIG_PLUGIN_CONTENT_SERVICE=true
- APP_CONFIG_OAUTH2_IMPLICIT_FLOW=true
- APP_CONFIG_OAUTH2_SILENT_LOGIN=true
- APP_CONFIG_OAUTH2_REDIRECT_LOGOUT=/
- APP_CONFIG_OAUTH2_REDIRECT_LOGIN=/
- APP_CONFIG_OAUTH2_REDIRECT_SILENT_IFRAME_URI="{protocol}//{hostname}{:port}/assets/silent-refresh.html"
jobs:
include:
- stage: Quality and Unit tests
name: 'Code quality checks'
script: npm ci && npm run lint
- stage: Quality and Unit tests
name: 'Build (without animation)'
before_script: npx @alfresco/adf-cli update-commit-sha --pointer "HEAD" --pathPackage "$(pwd)"
script: npm ci && npm run build -- $BUILD_OPTS
after_success: ./scripts/ci/utils/artifact-to-s3.sh -a $CONTENT_CE_DIST_PATH -o "$S3_DBP_FOLDER/alfresco-content-app.tar.bz2" || travis_terminate 1
cache: false
- stage: Quality and Unit tests
name: 'Unit tests: aos'
script: npm ci && ng test adf-office-services-ext $TEST_OPTS
cache: false
- stage: Quality and Unit tests
name: 'Unit tests: aca-shared'
script: npm ci && ng test aca-shared $TEST_OPTS
cache: false
- stage: Quality and Unit tests
name: 'Unit tests: aca-settings'
script: npm ci && ng test aca-settings $TEST_OPTS
cache: false
- stage: Quality and Unit tests
name: 'Unit tests: aca-folder-rules'
script: npm ci && ng test aca-folder-rules $TEST_OPTS
cache: false
- stage: Quality and Unit tests
name: 'Unit tests: ACA'
script:
- npm ci
- ng test content-ce $TEST_OPTS
cache: false
- stage: e2e
name: 'Test Suites: authentication,listViews,navigation,application'
before_script:
- ./scripts/ci/job_hooks/before_e2e.sh "$S3_DBP_FOLDER/alfresco-content-app.tar.bz2" "$CONTENT_CE_DIST_PATH" "-a" || travis_terminate 1
script: ./scripts/ci/jobs/affected-project-with.sh -target e2e -options "--suite=authentication,listViews,navigation,application"
after_script:
- ./scripts/ci/job_hooks/after_e2e.sh
- stage: e2e
name: 'Test Suites: search'
before_script:
- ./scripts/ci/job_hooks/before_e2e.sh "$S3_DBP_FOLDER/alfresco-content-app.tar.bz2" "$CONTENT_CE_DIST_PATH" "-a" || travis_terminate 1
script: ./scripts/ci/jobs/affected-project-with.sh -target e2e -options "--suite=search"
after_script:
- ./scripts/ci/job_hooks/after_e2e.sh
- stage: e2e
name: 'Test Suites: viewer,infoDrawer,extensions'
before_script:
- ./scripts/ci/job_hooks/before_e2e.sh "$S3_DBP_FOLDER/alfresco-content-app.tar.bz2" "$CONTENT_CE_DIST_PATH" "-a" || travis_terminate 1
script: ./scripts/ci/jobs/affected-project-with.sh -target e2e -options "--suite=viewer,infoDrawer,extensions"
after_script:
- ./scripts/ci/job_hooks/after_e2e.sh
- stage: e2e
name: 'Test Suites: shareActions'
before_script:
- ./scripts/ci/job_hooks/before_e2e.sh "$S3_DBP_FOLDER/alfresco-content-app.tar.bz2" "$CONTENT_CE_DIST_PATH" "-a" || travis_terminate 1
script: ./scripts/ci/jobs/affected-project-with.sh -target e2e -options "--suite=shareActions"
after_script:
- ./scripts/ci/job_hooks/after_e2e.sh
- stage: e2e
name: 'Test Suites: pagination'
before_script:
- ./scripts/ci/job_hooks/before_e2e.sh "$S3_DBP_FOLDER/alfresco-content-app.tar.bz2" "$CONTENT_CE_DIST_PATH" "-a" || travis_terminate 1
script: ./scripts/ci/jobs/affected-project-with.sh -target e2e -options "--suite=pagination"
after_script:
- ./scripts/ci/job_hooks/after_e2e.sh
- stage: e2e
name: 'Test Suites: actionsAvailableFilesFolders'
before_script:
- ./scripts/ci/job_hooks/before_e2e.sh "$S3_DBP_FOLDER/alfresco-content-app.tar.bz2" "$CONTENT_CE_DIST_PATH" "-a" || travis_terminate 1
script: ./scripts/ci/jobs/affected-project-with.sh -target e2e -options "--suite=actionsAvailableFilesFolders"
after_script:
- ./scripts/ci/job_hooks/after_e2e.sh
- stage: e2e
name: 'Test Suites: actionsAvailableLibraries,actionsAvailableNewMenu'
before_script:
- ./scripts/ci/job_hooks/before_e2e.sh "$S3_DBP_FOLDER/alfresco-content-app.tar.bz2" "$CONTENT_CE_DIST_PATH" "-a" || travis_terminate 1
script: ./scripts/ci/jobs/affected-project-with.sh -target e2e -options "--suite=actionsAvailableLibraries,actionsAvailableNewMenu"
after_script:
- ./scripts/ci/job_hooks/after_e2e.sh
- stage: e2e
name: 'Test Suites: actionsAvailableSpecialPermissions'
before_script:
- ./scripts/ci/job_hooks/before_e2e.sh "$S3_DBP_FOLDER/alfresco-content-app.tar.bz2" "$CONTENT_CE_DIST_PATH" "-a" || travis_terminate 1
script: ./scripts/ci/jobs/affected-project-with.sh -target e2e -options "--suite=actionsAvailableSpecialPermissions"
after_script:
- ./scripts/ci/job_hooks/after_e2e.sh
- stage: e2e
name: 'Test Suites: copyMoveActions'
before_script:
- ./scripts/ci/job_hooks/before_e2e.sh "$S3_DBP_FOLDER/alfresco-content-app.tar.bz2" "$CONTENT_CE_DIST_PATH" "-a" || travis_terminate 1
script: ./scripts/ci/jobs/affected-project-with.sh -target e2e -options "--suite=copyMoveActions"
after_script:
- ./scripts/ci/job_hooks/after_e2e.sh
- stage: e2e
name: 'Test Suites: createActions'
before_script:
- ./scripts/ci/job_hooks/before_e2e.sh "$S3_DBP_FOLDER/alfresco-content-app.tar.bz2" "$CONTENT_CE_DIST_PATH" "-a" || travis_terminate 1
script: ./scripts/ci/jobs/affected-project-with.sh -target e2e -options "--suite=createActions"
after_script:
- ./scripts/ci/job_hooks/after_e2e.sh
- stage: e2e
name: 'Test Suites: deleteActions'
before_script:
- ./scripts/ci/job_hooks/before_e2e.sh "$S3_DBP_FOLDER/alfresco-content-app.tar.bz2" "$CONTENT_CE_DIST_PATH" "-a" || travis_terminate 1
script: ./scripts/ci/jobs/affected-project-with.sh -target e2e -options "--suite=deleteActions"
after_script:
- ./scripts/ci/job_hooks/after_e2e.sh
- stage: e2e
name: 'Test Suites: editActions,favoriteActions'
before_script:
- ./scripts/ci/job_hooks/before_e2e.sh "$S3_DBP_FOLDER/alfresco-content-app.tar.bz2" "$CONTENT_CE_DIST_PATH" "-a" || travis_terminate 1
script: ./scripts/ci/jobs/affected-project-with.sh -target e2e -options "--suite=editActions,favoriteActions"
after_script:
- ./scripts/ci/job_hooks/after_e2e.sh
- stage: e2e
name: 'Test Suites: libraryActions'
before_script:
- ./scripts/ci/job_hooks/before_e2e.sh "$S3_DBP_FOLDER/alfresco-content-app.tar.bz2" "$CONTENT_CE_DIST_PATH" "-a" || travis_terminate 1
script: ./scripts/ci/jobs/affected-project-with.sh -target e2e -options "--suite=libraryActions"
after_script:
- ./scripts/ci/job_hooks/after_e2e.sh
- stage: e2e
name: 'Test Suites: uploadDownloadActions'
before_script:
- ./scripts/ci/job_hooks/before_e2e.sh "$S3_DBP_FOLDER/alfresco-content-app.tar.bz2" "$CONTENT_CE_DIST_PATH" "-a" || travis_terminate 1
script: ./scripts/ci/jobs/affected-project-with.sh -target e2e -options "--suite=uploadDownloadActions"
after_script:
- ./scripts/ci/job_hooks/after_e2e.sh
- stage: Finalize
name: Check build with link-adf
if: type = pull_request AND commit_message =~ \[link-adf:*
script:
- ./scripts/ci/jobs/check-link-adf.sh
- stage: Publish Docker Registry
name: Publish Docker Registry
script: ./scripts/travis/deploy/publish.sh "content-ce" "$DOCKER_REPOSITORY_DOMAIN" "$QUAY_USERNAME" "$QUAY_PASSWORD"
- stage: Release Tag and Publish to Dockerhub
name: Release Tag
script: ./scripts/travis/release/git-tag.sh
- name: Publish to Dockerhub
script: ./scripts/travis/deploy/publish.sh "content-ce" "$DOCKER_HUB_REPOSITORY_DOMAIN" "$DOCKER_HUB_USERNAME" "$DOCKER_HUB_PASSWORD"
- stage: Trigger DW
script: ./scripts/trigger-travis.sh --branch $TRAVIS_BRANCH Alfresco alfresco-apps $TRAVIS_API_TOKEN
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}'