parent
a634deb885
commit
d374787db6
@ -117,12 +117,13 @@ var_12: &publish_branches_filter
|
|||||||
# e.g. 7.0.x, 7.1.x, etc.
|
# e.g. 7.0.x, 7.1.x, etc.
|
||||||
- /\d+\.\d+\.x/
|
- /\d+\.\d+\.x/
|
||||||
|
|
||||||
# Workspace initially persisted by the `install` job, and then enhanced by test_aio and
|
# Workspace initially persisted by the `install` job, and then enhanced by `test_aio` and
|
||||||
# build-npm-packages.
|
# `build-npm-packages`.
|
||||||
# https://circleci.com/docs/2.0/workflows/#using-workspaces-to-share-data-among-jobs
|
# https://circleci.com/docs/2.0/workflows/#using-workspaces-to-share-data-among-jobs
|
||||||
# https://circleci.com/blog/deep-diving-into-circleci-workspaces/
|
# https://circleci.com/blog/deep-diving-into-circleci-workspaces/
|
||||||
var_13: &attach_options
|
var_13: &attach_workspace
|
||||||
at: .
|
attach_workspace:
|
||||||
|
at: ~/
|
||||||
|
|
||||||
version: 2
|
version: 2
|
||||||
jobs:
|
jobs:
|
||||||
@ -136,16 +137,26 @@ jobs:
|
|||||||
- *init_environment
|
- *init_environment
|
||||||
- *yarn_install
|
- *yarn_install
|
||||||
- run: yarn --cwd aio install --frozen-lockfile --non-interactive
|
- run: yarn --cwd aio install --frozen-lockfile --non-interactive
|
||||||
|
# Make the bazel directories and add a file to them if they don't exist already so that
|
||||||
|
# persist_to_workspace does not fail.
|
||||||
|
- run: |
|
||||||
|
if [ ! -d ~/bazel_repository_cache ]; then
|
||||||
|
mkdir ~/bazel_repository_cache
|
||||||
|
touch ~/bazel_repository_cache/MARKER
|
||||||
|
fi
|
||||||
# Persist any changes at this point to be reused by further jobs.
|
# Persist any changes at this point to be reused by further jobs.
|
||||||
|
# **NOTE 1 **: Folders persisted here should be kept in sync with `var_13: &attach_workspace`.
|
||||||
|
# **NOTE 2 **: To add new content to the workspace, always persist on the same root.
|
||||||
- persist_to_workspace:
|
- persist_to_workspace:
|
||||||
root: .
|
root: ~/
|
||||||
paths:
|
paths:
|
||||||
- ./*
|
- ./ng
|
||||||
|
- ./bazel_repository_cache
|
||||||
|
|
||||||
lint:
|
lint:
|
||||||
<<: *job_defaults
|
<<: *job_defaults
|
||||||
steps:
|
steps:
|
||||||
- attach_workspace: *attach_options
|
- *attach_workspace
|
||||||
- *init_environment
|
- *init_environment
|
||||||
|
|
||||||
- run: 'yarn bazel:format -mode=check ||
|
- run: 'yarn bazel:format -mode=check ||
|
||||||
@ -160,7 +171,7 @@ jobs:
|
|||||||
<<: *job_defaults
|
<<: *job_defaults
|
||||||
resource_class: xlarge
|
resource_class: xlarge
|
||||||
steps:
|
steps:
|
||||||
- attach_workspace: *attach_options
|
- *attach_workspace
|
||||||
- *init_environment
|
- *init_environment
|
||||||
- *setup_circleci_bazel_config
|
- *setup_circleci_bazel_config
|
||||||
|
|
||||||
@ -176,7 +187,7 @@ jobs:
|
|||||||
<<: *job_defaults
|
<<: *job_defaults
|
||||||
resource_class: xlarge
|
resource_class: xlarge
|
||||||
steps:
|
steps:
|
||||||
- attach_workspace: *attach_options
|
- *attach_workspace
|
||||||
- *init_environment
|
- *init_environment
|
||||||
- *setup_circleci_bazel_config
|
- *setup_circleci_bazel_config
|
||||||
- *setup_bazel_remote_execution
|
- *setup_bazel_remote_execution
|
||||||
@ -211,7 +222,7 @@ jobs:
|
|||||||
# Needed because the AIO tests and the PWA score test depend on Chrome being available.
|
# Needed because the AIO tests and the PWA score test depend on Chrome being available.
|
||||||
- image: *browsers_docker_image
|
- image: *browsers_docker_image
|
||||||
steps:
|
steps:
|
||||||
- attach_workspace: *attach_options
|
- *attach_workspace
|
||||||
- *init_environment
|
- *init_environment
|
||||||
# Build aio
|
# Build aio
|
||||||
- run: yarn --cwd aio build --progress=false
|
- run: yarn --cwd aio build --progress=false
|
||||||
@ -236,7 +247,7 @@ jobs:
|
|||||||
# Needed because before deploying the deploy-production script runs the PWA score tests.
|
# Needed because before deploying the deploy-production script runs the PWA score tests.
|
||||||
- image: *browsers_docker_image
|
- image: *browsers_docker_image
|
||||||
steps:
|
steps:
|
||||||
- attach_workspace: *attach_options
|
- *attach_workspace
|
||||||
- *init_environment
|
- *init_environment
|
||||||
# Deploy angular.io to production (if necessary)
|
# Deploy angular.io to production (if necessary)
|
||||||
- run: setPublicVar CI_STABLE_BRANCH "$(npm info @angular/core dist-tags.latest | sed -r 's/^\s*([0-9]+\.[0-9]+)\.[0-9]+.*$/\1.x/')"
|
- run: setPublicVar CI_STABLE_BRANCH "$(npm info @angular/core dist-tags.latest | sed -r 's/^\s*([0-9]+\.[0-9]+)\.[0-9]+.*$/\1.x/')"
|
||||||
@ -248,7 +259,7 @@ jobs:
|
|||||||
# Needed because the AIO tests and the PWA score test depend on Chrome being available.
|
# Needed because the AIO tests and the PWA score test depend on Chrome being available.
|
||||||
- image: *browsers_docker_image
|
- image: *browsers_docker_image
|
||||||
steps:
|
steps:
|
||||||
- attach_workspace: *attach_options
|
- *attach_workspace
|
||||||
- *init_environment
|
- *init_environment
|
||||||
# Build aio (with local Angular packages)
|
# Build aio (with local Angular packages)
|
||||||
- run: yarn --cwd aio build-local --progress=false
|
- run: yarn --cwd aio build-local --progress=false
|
||||||
@ -263,7 +274,7 @@ jobs:
|
|||||||
test_aio_local_ivy:
|
test_aio_local_ivy:
|
||||||
<<: *job_defaults
|
<<: *job_defaults
|
||||||
steps:
|
steps:
|
||||||
- attach_workspace: *attach_options
|
- *attach_workspace
|
||||||
- *init_environment
|
- *init_environment
|
||||||
# Build aio with Ivy (using local Angular packages)
|
# Build aio with Ivy (using local Angular packages)
|
||||||
- run: yarn --cwd aio build-with-ivy --progress=false
|
- run: yarn --cwd aio build-with-ivy --progress=false
|
||||||
@ -271,7 +282,7 @@ jobs:
|
|||||||
test_aio_tools:
|
test_aio_tools:
|
||||||
<<: *job_defaults
|
<<: *job_defaults
|
||||||
steps:
|
steps:
|
||||||
- attach_workspace: *attach_options
|
- *attach_workspace
|
||||||
- *init_environment
|
- *init_environment
|
||||||
# Install
|
# Install
|
||||||
- run: yarn --cwd aio install --frozen-lockfile --non-interactive
|
- run: yarn --cwd aio install --frozen-lockfile --non-interactive
|
||||||
@ -287,7 +298,7 @@ jobs:
|
|||||||
- image: *browsers_docker_image
|
- image: *browsers_docker_image
|
||||||
parallelism: 3
|
parallelism: 3
|
||||||
steps:
|
steps:
|
||||||
- attach_workspace: *attach_options
|
- *attach_workspace
|
||||||
- *init_environment
|
- *init_environment
|
||||||
# Install aio
|
# Install aio
|
||||||
- run: yarn --cwd aio install --frozen-lockfile --non-interactive
|
- run: yarn --cwd aio install --frozen-lockfile --non-interactive
|
||||||
@ -303,7 +314,7 @@ jobs:
|
|||||||
- image: *browsers_docker_image
|
- image: *browsers_docker_image
|
||||||
parallelism: 3
|
parallelism: 3
|
||||||
steps:
|
steps:
|
||||||
- attach_workspace: *attach_options
|
- *attach_workspace
|
||||||
- *init_environment
|
- *init_environment
|
||||||
# Install aio
|
# Install aio
|
||||||
- run: yarn --cwd aio install --frozen-lockfile --non-interactive
|
- run: yarn --cwd aio install --frozen-lockfile --non-interactive
|
||||||
@ -318,7 +329,7 @@ jobs:
|
|||||||
environment:
|
environment:
|
||||||
AIO_SNAPSHOT_ARTIFACT_PATH: &aio_preview_artifact_path 'aio/tmp/snapshot.tgz'
|
AIO_SNAPSHOT_ARTIFACT_PATH: &aio_preview_artifact_path 'aio/tmp/snapshot.tgz'
|
||||||
steps:
|
steps:
|
||||||
- attach_workspace: *attach_options
|
- *attach_workspace
|
||||||
- *init_environment
|
- *init_environment
|
||||||
- run: ./aio/scripts/build-artifacts.sh $AIO_SNAPSHOT_ARTIFACT_PATH $CI_PULL_REQUEST $CI_COMMIT
|
- run: ./aio/scripts/build-artifacts.sh $AIO_SNAPSHOT_ARTIFACT_PATH $CI_PULL_REQUEST $CI_COMMIT
|
||||||
- store_artifacts:
|
- store_artifacts:
|
||||||
@ -335,7 +346,7 @@ jobs:
|
|||||||
# Needed because the test-preview script runs e2e tests and the PWA score test with Chrome.
|
# Needed because the test-preview script runs e2e tests and the PWA score test with Chrome.
|
||||||
- image: *browsers_docker_image
|
- image: *browsers_docker_image
|
||||||
steps:
|
steps:
|
||||||
- attach_workspace: *attach_options
|
- *attach_workspace
|
||||||
- *init_environment
|
- *init_environment
|
||||||
- run: yarn --cwd aio install --frozen-lockfile --non-interactive
|
- run: yarn --cwd aio install --frozen-lockfile --non-interactive
|
||||||
- run:
|
- run:
|
||||||
@ -355,7 +366,7 @@ jobs:
|
|||||||
<<: *job_defaults
|
<<: *job_defaults
|
||||||
resource_class: xlarge
|
resource_class: xlarge
|
||||||
steps:
|
steps:
|
||||||
- attach_workspace: *attach_options
|
- *attach_workspace
|
||||||
- *init_environment
|
- *init_environment
|
||||||
- *setup_circleci_bazel_config
|
- *setup_circleci_bazel_config
|
||||||
- *setup_bazel_remote_execution
|
- *setup_bazel_remote_execution
|
||||||
@ -364,10 +375,11 @@ jobs:
|
|||||||
|
|
||||||
# Save the npm packages from //packages/... for other workflow jobs to read
|
# Save the npm packages from //packages/... for other workflow jobs to read
|
||||||
- persist_to_workspace:
|
- persist_to_workspace:
|
||||||
root: .
|
root: ~/
|
||||||
paths:
|
paths:
|
||||||
- dist/packages-dist
|
- ng/dist/packages-dist
|
||||||
|
|
||||||
|
# Save dependencies and bazel repository cache to use on subsequent runs.
|
||||||
- save_cache:
|
- save_cache:
|
||||||
key: *cache_key
|
key: *cache_key
|
||||||
paths:
|
paths:
|
||||||
@ -375,13 +387,12 @@ jobs:
|
|||||||
- "aio/node_modules"
|
- "aio/node_modules"
|
||||||
- "~/bazel_repository_cache"
|
- "~/bazel_repository_cache"
|
||||||
|
|
||||||
|
|
||||||
# Build the ivy npm packages.
|
# Build the ivy npm packages.
|
||||||
build-ivy-npm-packages:
|
build-ivy-npm-packages:
|
||||||
<<: *job_defaults
|
<<: *job_defaults
|
||||||
resource_class: xlarge
|
resource_class: xlarge
|
||||||
steps:
|
steps:
|
||||||
- attach_workspace: *attach_options
|
- *attach_workspace
|
||||||
- *init_environment
|
- *init_environment
|
||||||
- *setup_circleci_bazel_config
|
- *setup_circleci_bazel_config
|
||||||
- *setup_bazel_remote_execution
|
- *setup_bazel_remote_execution
|
||||||
@ -390,9 +401,9 @@ jobs:
|
|||||||
|
|
||||||
# Save the npm packages from //packages/... for other workflow jobs to read
|
# Save the npm packages from //packages/... for other workflow jobs to read
|
||||||
- persist_to_workspace:
|
- persist_to_workspace:
|
||||||
root: .
|
root: ~/
|
||||||
paths:
|
paths:
|
||||||
- dist/packages-dist-ivy-aot
|
- ng/dist/packages-dist-ivy-aot
|
||||||
|
|
||||||
# We run the integration tests outside of Bazel for now.
|
# We run the integration tests outside of Bazel for now.
|
||||||
# They are a separate workflow job so that they can be easily re-run.
|
# They are a separate workflow job so that they can be easily re-run.
|
||||||
@ -411,7 +422,7 @@ jobs:
|
|||||||
# on a 4G worker so we use a larger machine here too.
|
# on a 4G worker so we use a larger machine here too.
|
||||||
resource_class: xlarge
|
resource_class: xlarge
|
||||||
steps:
|
steps:
|
||||||
- attach_workspace: *attach_options
|
- *attach_workspace
|
||||||
- *init_environment
|
- *init_environment
|
||||||
# Runs the integration tests in parallel across multiple CircleCI container instances. The
|
# Runs the integration tests in parallel across multiple CircleCI container instances. The
|
||||||
# amount of container nodes for this job is controlled by the "parallelism" option.
|
# amount of container nodes for this job is controlled by the "parallelism" option.
|
||||||
@ -422,7 +433,7 @@ jobs:
|
|||||||
publish_snapshot:
|
publish_snapshot:
|
||||||
<<: *job_defaults
|
<<: *job_defaults
|
||||||
steps:
|
steps:
|
||||||
- attach_workspace: *attach_options
|
- *attach_workspace
|
||||||
- *init_environment
|
- *init_environment
|
||||||
# See below - ideally this job should not trigger for non-upstream builds.
|
# See below - ideally this job should not trigger for non-upstream builds.
|
||||||
# But since it does, we have to check this condition.
|
# But since it does, we have to check this condition.
|
||||||
@ -450,7 +461,7 @@ jobs:
|
|||||||
# which does not load the browser through the Bazel webtesting rules.
|
# which does not load the browser through the Bazel webtesting rules.
|
||||||
- image: *browsers_docker_image
|
- image: *browsers_docker_image
|
||||||
steps:
|
steps:
|
||||||
- attach_workspace: *attach_options
|
- *attach_workspace
|
||||||
- *init_environment
|
- *init_environment
|
||||||
- run:
|
- run:
|
||||||
name: Run tests against the deployed apps
|
name: Run tests against the deployed apps
|
||||||
@ -469,7 +480,7 @@ jobs:
|
|||||||
# and therefore the tunnel and Karma need to process a lot of file requests and tests.
|
# and therefore the tunnel and Karma need to process a lot of file requests and tests.
|
||||||
resource_class: xlarge
|
resource_class: xlarge
|
||||||
steps:
|
steps:
|
||||||
- attach_workspace: *attach_options
|
- *attach_workspace
|
||||||
- *init_environment
|
- *init_environment
|
||||||
- run:
|
- run:
|
||||||
name: Preparing environment for running tests on Saucelabs.
|
name: Preparing environment for running tests on Saucelabs.
|
||||||
@ -491,7 +502,7 @@ jobs:
|
|||||||
legacy-misc-tests:
|
legacy-misc-tests:
|
||||||
<<: *job_defaults
|
<<: *job_defaults
|
||||||
steps:
|
steps:
|
||||||
- attach_workspace: *attach_options
|
- *attach_workspace
|
||||||
- *init_environment
|
- *init_environment
|
||||||
- run: yarn gulp check-cycle
|
- run: yarn gulp check-cycle
|
||||||
# TODO: disabled because the Bazel packages-dist does not seem to have map files for
|
# TODO: disabled because the Bazel packages-dist does not seem to have map files for
|
||||||
|
Loading…
x
Reference in New Issue
Block a user