[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:
- name: Prerequisite
- name: Setup
- name: "Build lib"
- name: "Build"
if: tag IS blank AND type = pull_request
- name: "Trigger Alpha ADF child build"
if: (branch = develop AND (type = cron || type = api)) OR commit_message =~ /\[trigger adf\]/
@ -105,8 +105,9 @@ jobs:
- "$NODE_MODULES_DIR"
use: node_modules_cache
- stage: "Build lib"
- stage: "Build"
name: "Lib::Build"
install: echo "no install"
script: nx affected:build $NX_CALCULATION_FLAGS --prod --exclude="demoshell"
workspaces:
@ -117,49 +118,61 @@ jobs:
- "$NODE_MODULES_DIR"
use: node_modules_cache
- stage: "Build lib"
- stage: "Build"
name: "Lint"
install: echo "no install"
script: nx affected:lint $NX_CALCULATION_FLAGS --parallel=5
workspaces:
use: node_modules_cache
- stage: "Build Demo shell"
name: "Demo Shell & Storybook :Build"
before_script:
- NODE_OPTIONS="--max-old-space-size=8192" $(npm bin)/nx run cli:build --prod
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
- stage: "Build"
name: "Demo Shell::Build"
install: echo "no install"
script: 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: nx run stories:build-storybook --configuration ci
workspaces:
create:
name: built_storybook_cache
paths:
- "$STORYBOOK_DIR"
use:
- built_libs_cache
- node_modules_cache
- stage: "Unit test Lib"
name: "content::unit"
install: echo "no install"
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"
install: echo "no install"
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"
install: echo "no install"
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"
install: echo "no install"
script: nx affected:test $NX_CALCULATION_FLAGS --exclude="insights,core,extensions,content-services,process-services"
workspaces:
use: built_libs_cache
@ -172,6 +185,7 @@ jobs:
- stage: "Release"
name: "release libs::npm"
install: echo "no install"
script:
- ./scripts/travis/build/bumpversion.sh || travis_terminate 1
- nx affected:build $NX_CALCULATION_FLAGS --prod --exclude="demoshell" || travis_terminate 1
@ -182,9 +196,9 @@ jobs:
- stage: "Release"
name: "release demoshell::docker"
install: echo "no install"
script:
- 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/release-demoshell-docker.sh
workspaces:
@ -192,6 +206,7 @@ jobs:
- stage: "Release"
name: "release storybook::docker"
install: echo "no install"
script:
- nx run stories:build-storybook --configuration ci || travis_terminate 1
- . ./scripts/travis/release/docker-tag.sh || travis_terminate 1
@ -209,6 +224,7 @@ jobs:
- 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:
@ -218,6 +234,7 @@ jobs:
- 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
@ -240,6 +257,7 @@ jobs:
- 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
@ -261,6 +279,7 @@ jobs:
- 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
@ -282,6 +301,7 @@ jobs:
- 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
@ -303,6 +323,7 @@ jobs:
- 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
@ -324,6 +345,7 @@ jobs:
- 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
@ -345,6 +367,7 @@ jobs:
- 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
@ -366,6 +389,7 @@ jobs:
- 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
@ -388,6 +412,7 @@ jobs:
- 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
@ -410,6 +435,7 @@ jobs:
- 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
@ -432,6 +458,7 @@ jobs:
- 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
@ -454,6 +481,7 @@ jobs:
- 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
@ -500,6 +528,7 @@ jobs:
- 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
@ -523,6 +552,7 @@ jobs:
- 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
@ -546,6 +576,7 @@ jobs:
- 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
@ -568,6 +599,7 @@ jobs:
- 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}

View File

@ -4,7 +4,7 @@
<head>
<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="no-cache" />
<meta http-equiv="expires" content="0" />