[AAE-11279] Pipeline - Build libs and apps in the same stage and avoid install (#7943)

* Build libs and apps in the same stage and avoid install

* Reduce install and affect all
This commit is contained in:
Maurizio Vitale 2022-11-03 12:16:11 +00:00 committed by GitHub
parent 0459e4eb0c
commit d1c82edb9d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 46 additions and 14 deletions

View File

@ -57,7 +57,7 @@ branches:
stages: stages:
- name: Prerequisite - name: Prerequisite
- name: Setup - name: Setup
- name: "Build lib" - name: "Build"
if: tag IS blank AND type = pull_request if: tag IS blank AND type = pull_request
- name: "Trigger Alpha ADF child build" - name: "Trigger Alpha ADF child build"
if: (branch = develop AND (type = cron || type = api)) OR commit_message =~ /\[trigger adf\]/ if: (branch = develop AND (type = cron || type = api)) OR commit_message =~ /\[trigger adf\]/
@ -105,8 +105,9 @@ jobs:
- "$NODE_MODULES_DIR" - "$NODE_MODULES_DIR"
use: node_modules_cache use: node_modules_cache
- stage: "Build lib" - stage: "Build"
name: "Lib::Build" name: "Lib::Build"
install: echo "no install"
script: nx affected:build $NX_CALCULATION_FLAGS --prod --exclude="demoshell" script: nx affected:build $NX_CALCULATION_FLAGS --prod --exclude="demoshell"
workspaces: workspaces:
@ -117,49 +118,61 @@ jobs:
- "$NODE_MODULES_DIR" - "$NODE_MODULES_DIR"
use: node_modules_cache use: node_modules_cache
- stage: "Build lib" - stage: "Build"
name: "Lint" name: "Lint"
install: echo "no install"
script: nx affected:lint $NX_CALCULATION_FLAGS --parallel=5 script: nx affected:lint $NX_CALCULATION_FLAGS --parallel=5
workspaces: workspaces:
use: node_modules_cache use: node_modules_cache
- stage: "Build Demo shell" - stage: "Build"
name: "Demo Shell & Storybook :Build" name: "Demo Shell::Build"
before_script: install: echo "no install"
- NODE_OPTIONS="--max-old-space-size=8192" $(npm bin)/nx run cli:build --prod script: nx build demoshell --configuration production
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
workspaces: workspaces:
create: create:
name: built_demo_shell_cache name: built_demo_shell_cache
paths: paths:
- "$DEMO_SHELL_DIR" - "$DEMO_SHELL_DIR"
use:
- node_modules_cache
- stage: "Build"
name: "Storybook::Build"
install: echo "no install"
script: nx run stories:build-storybook --configuration ci
workspaces:
create:
name: built_storybook_cache
paths:
- "$STORYBOOK_DIR" - "$STORYBOOK_DIR"
use: use:
- built_libs_cache - node_modules_cache
- stage: "Unit test Lib" - stage: "Unit test Lib"
name: "content::unit" name: "content::unit"
install: echo "no install"
script: nx affected:test $NX_CALCULATION_FLAGS --exclude="insights,core,extensions,process-services,process-services-cloud" script: nx affected:test $NX_CALCULATION_FLAGS --exclude="insights,core,extensions,process-services,process-services-cloud"
workspaces: workspaces:
use: built_libs_cache use: built_libs_cache
- stage: "Unit test Lib" - stage: "Unit test Lib"
name: "core-extension::unit" name: "core-extension::unit"
install: echo "no install"
script: nx affected:test $NX_CALCULATION_FLAGS --exclude="insights,content-services,process-services,process-services-cloud" script: nx affected:test $NX_CALCULATION_FLAGS --exclude="insights,content-services,process-services,process-services-cloud"
workspaces: workspaces:
use: built_libs_cache use: built_libs_cache
- stage: "Unit test Lib" - stage: "Unit test Lib"
name: "process-insights::unit" name: "process-insights::unit"
install: echo "no install"
script: nx affected:test $NX_CALCULATION_FLAGS --exclude="core,extensions,content-services,process-services-cloud" script: nx affected:test $NX_CALCULATION_FLAGS --exclude="core,extensions,content-services,process-services-cloud"
workspaces: workspaces:
use: built_libs_cache use: built_libs_cache
- stage: "Unit test Lib" - stage: "Unit test Lib"
name: "process-cloud::unit" name: "process-cloud::unit"
install: echo "no install"
script: nx affected:test $NX_CALCULATION_FLAGS --exclude="insights,core,extensions,content-services,process-services" script: nx affected:test $NX_CALCULATION_FLAGS --exclude="insights,core,extensions,content-services,process-services"
workspaces: workspaces:
use: built_libs_cache use: built_libs_cache
@ -172,6 +185,7 @@ jobs:
- stage: "Release" - stage: "Release"
name: "release libs::npm" name: "release libs::npm"
install: echo "no install"
script: script:
- ./scripts/travis/build/bumpversion.sh || travis_terminate 1 - ./scripts/travis/build/bumpversion.sh || travis_terminate 1
- nx affected:build $NX_CALCULATION_FLAGS --prod --exclude="demoshell" || travis_terminate 1 - nx affected:build $NX_CALCULATION_FLAGS --prod --exclude="demoshell" || travis_terminate 1
@ -182,9 +196,9 @@ jobs:
- stage: "Release" - stage: "Release"
name: "release demoshell::docker" name: "release demoshell::docker"
install: echo "no install"
script: script:
- nx build demoshell --configuration production || travis_terminate 1 - nx build demoshell --configuration production || travis_terminate 1
- nx run stories:build-storybook --configuration ci || travis_terminate 1
- . ./scripts/travis/release/docker-tag.sh || travis_terminate 1 - . ./scripts/travis/release/docker-tag.sh || travis_terminate 1
- ./scripts/travis/release/release-demoshell-docker.sh - ./scripts/travis/release/release-demoshell-docker.sh
workspaces: workspaces:
@ -192,6 +206,7 @@ jobs:
- stage: "Release" - stage: "Release"
name: "release storybook::docker" name: "release storybook::docker"
install: echo "no install"
script: script:
- nx run stories:build-storybook --configuration ci || travis_terminate 1 - nx run stories:build-storybook --configuration ci || travis_terminate 1
- . ./scripts/travis/release/docker-tag.sh || travis_terminate 1 - . ./scripts/travis/release/docker-tag.sh || travis_terminate 1
@ -209,6 +224,7 @@ jobs:
- stage: "e2e Test" - stage: "e2e Test"
name: "Process Cloud: Storybook Playwright" name: "Process Cloud: Storybook Playwright"
install: echo "no install"
before_script: ./scripts/ci/jobs/dbpci-before-playwright before_script: ./scripts/ci/jobs/dbpci-before-playwright
script: ./scripts/travis/storybook-testing/storybook-test.sh script: ./scripts/travis/storybook-testing/storybook-test.sh
workspaces: workspaces:
@ -218,6 +234,7 @@ jobs:
- stage: "e2e Test" - stage: "e2e Test"
name: "Core" name: "Core"
install: echo "no install"
before_script: before_script:
- ./scripts/ci/job_hooks/before_e2e.sh - ./scripts/ci/job_hooks/before_e2e.sh
- ./scripts/ci/check-env/check-cs-env.sh || travis_terminate 1 - ./scripts/ci/check-env/check-cs-env.sh || travis_terminate 1
@ -240,6 +257,7 @@ jobs:
- stage: "e2e Test" - stage: "e2e Test"
name: "Content: Components" name: "Content: Components"
install: echo "no install"
before_script: before_script:
- ./scripts/ci/job_hooks/before_e2e.sh - ./scripts/ci/job_hooks/before_e2e.sh
- ./scripts/ci/check-env/check-cs-env.sh || travis_terminate 1 - ./scripts/ci/check-env/check-cs-env.sh || travis_terminate 1
@ -261,6 +279,7 @@ jobs:
- stage: "e2e Test" - stage: "e2e Test"
name: "Content: Directives" name: "Content: Directives"
install: echo "no install"
before_script: before_script:
- ./scripts/ci/job_hooks/before_e2e.sh - ./scripts/ci/job_hooks/before_e2e.sh
- ./scripts/ci/check-env/check-cs-env.sh || travis_terminate 1 - ./scripts/ci/check-env/check-cs-env.sh || travis_terminate 1
@ -282,6 +301,7 @@ jobs:
- stage: "e2e Test" - stage: "e2e Test"
name: "Content: Document List" name: "Content: Document List"
install: echo "no install"
before_script: before_script:
- ./scripts/ci/job_hooks/before_e2e.sh - ./scripts/ci/job_hooks/before_e2e.sh
- ./scripts/ci/check-env/check-cs-env.sh || travis_terminate 1 - ./scripts/ci/check-env/check-cs-env.sh || travis_terminate 1
@ -303,6 +323,7 @@ jobs:
- stage: "e2e Test" - stage: "e2e Test"
name: "Content: Metadata" name: "Content: Metadata"
install: echo "no install"
before_script: before_script:
- ./scripts/ci/job_hooks/before_e2e.sh - ./scripts/ci/job_hooks/before_e2e.sh
- ./scripts/ci/check-env/check-cs-env.sh || travis_terminate 1 - ./scripts/ci/check-env/check-cs-env.sh || travis_terminate 1
@ -324,6 +345,7 @@ jobs:
- stage: "e2e Test" - stage: "e2e Test"
name: "Content: Upload and Versioning" name: "Content: Upload and Versioning"
install: echo "no install"
before_script: before_script:
- ./scripts/ci/job_hooks/before_e2e.sh - ./scripts/ci/job_hooks/before_e2e.sh
- ./scripts/ci/check-env/check-cs-env.sh || travis_terminate 1 - ./scripts/ci/check-env/check-cs-env.sh || travis_terminate 1
@ -345,6 +367,7 @@ jobs:
- stage: "e2e Test" - stage: "e2e Test"
name: "Search" name: "Search"
install: echo "no install"
before_script: before_script:
- ./scripts/ci/job_hooks/before_e2e.sh - ./scripts/ci/job_hooks/before_e2e.sh
- ./scripts/ci/check-env/check-cs-env.sh || travis_terminate 1 - ./scripts/ci/check-env/check-cs-env.sh || travis_terminate 1
@ -366,6 +389,7 @@ jobs:
- stage: "e2e Test" - stage: "e2e Test"
name: "Process: Form" name: "Process: Form"
install: echo "no install"
before_script: before_script:
- ./scripts/ci/job_hooks/before_e2e.sh - ./scripts/ci/job_hooks/before_e2e.sh
- ./scripts/ci/check-env/check-ps-env.sh || travis_terminate 1 - ./scripts/ci/check-env/check-ps-env.sh || travis_terminate 1
@ -388,6 +412,7 @@ jobs:
- stage: "e2e Test" - stage: "e2e Test"
name: "Process: Process" name: "Process: Process"
install: echo "no install"
before_script: before_script:
- ./scripts/ci/job_hooks/before_e2e.sh - ./scripts/ci/job_hooks/before_e2e.sh
- ./scripts/ci/check-env/check-ps-env.sh || travis_terminate 1 - ./scripts/ci/check-env/check-ps-env.sh || travis_terminate 1
@ -410,6 +435,7 @@ jobs:
- stage: "e2e Test" - stage: "e2e Test"
name: "Process: Tasks" name: "Process: Tasks"
install: echo "no install"
before_script: before_script:
- ./scripts/ci/job_hooks/before_e2e.sh - ./scripts/ci/job_hooks/before_e2e.sh
- ./scripts/ci/check-env/check-ps-env.sh || travis_terminate 1 - ./scripts/ci/check-env/check-ps-env.sh || travis_terminate 1
@ -432,6 +458,7 @@ jobs:
- stage: "e2e Test" - stage: "e2e Test"
name: "Process: Widgets" name: "Process: Widgets"
install: echo "no install"
before_script: before_script:
- ./scripts/ci/job_hooks/before_e2e.sh - ./scripts/ci/job_hooks/before_e2e.sh
- ./scripts/ci/check-env/check-ps-env.sh || travis_terminate 1 - ./scripts/ci/check-env/check-ps-env.sh || travis_terminate 1
@ -454,6 +481,7 @@ jobs:
- stage: "e2e Test" - stage: "e2e Test"
name: "Process Cloud : Form" name: "Process Cloud : Form"
install: echo "no install"
before_script: before_script:
- ./scripts/ci/job_hooks/before_e2e.sh - ./scripts/ci/job_hooks/before_e2e.sh
- ./scripts/ci/check-env/check-cs-env.sh || travis_terminate 1 - ./scripts/ci/check-env/check-cs-env.sh || travis_terminate 1
@ -500,6 +528,7 @@ jobs:
- stage: "e2e Test" - stage: "e2e Test"
name: "Process Cloud : Process" name: "Process Cloud : Process"
install: echo "no install"
before_script: before_script:
- ./scripts/ci/job_hooks/before_e2e.sh - ./scripts/ci/job_hooks/before_e2e.sh
- ./scripts/ci/check-env/check-cs-env.sh || travis_terminate 1 - ./scripts/ci/check-env/check-cs-env.sh || travis_terminate 1
@ -523,6 +552,7 @@ jobs:
- stage: "e2e Test" - stage: "e2e Test"
name: "Process Cloud : Start Task" name: "Process Cloud : Start Task"
install: echo "no install"
before_script: before_script:
- ./scripts/ci/job_hooks/before_e2e.sh - ./scripts/ci/job_hooks/before_e2e.sh
- ./scripts/ci/check-env/check-cs-env.sh || travis_terminate 1 - ./scripts/ci/check-env/check-cs-env.sh || travis_terminate 1
@ -546,6 +576,7 @@ jobs:
- stage: "e2e Test" - stage: "e2e Test"
name: "Process Cloud : Tasks List" name: "Process Cloud : Tasks List"
install: echo "no install"
before_script: before_script:
- ./scripts/ci/job_hooks/before_e2e.sh - ./scripts/ci/job_hooks/before_e2e.sh
- ./scripts/ci/check-env/check-cs-env.sh || travis_terminate 1 - ./scripts/ci/check-env/check-cs-env.sh || travis_terminate 1
@ -568,6 +599,7 @@ jobs:
- PROXY_HOST_BPM=$E2E_HOST_APA - PROXY_HOST_BPM=$E2E_HOST_APA
- stage: Check bundle - stage: Check bundle
install: echo "no install"
script: script:
- ADF_VERSION=$(npm view @alfresco/adf-core@${TAG_NPM} version) - ADF_VERSION=$(npm view @alfresco/adf-core@${TAG_NPM} version)
- ./scripts/travis/build/npm-check-bundles.sh -v ${ADF_VERSION} - ./scripts/travis/build/npm-check-bundles.sh -v ${ADF_VERSION}

View File

@ -4,7 +4,7 @@
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<!-- Important: cache busting for index.html --> <!-- Important: cache busting for index.html -->
<meta http-equiv="cache-control" content="max-age=0" /> <meta http-equiv="cache-control" content="max-age=0" />
<meta http-equiv="cache-control" content="no-cache" /> <meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="expires" content="0" /> <meta http-equiv="expires" content="0" />