2017-07-13 15:16:02 -04:00
|
|
|
# Configuration file for https://circleci.com/gh/angular/angular
|
|
|
|
|
|
|
|
# Note: YAML anchors allow an object to be re-used, reducing duplication.
|
|
|
|
# The ampersand declares an alias for an object, then later the `<<: *name`
|
|
|
|
# syntax dereferences it.
|
|
|
|
# See http://blog.daemonl.com/2016/02/yaml.html
|
|
|
|
# To validate changes, use an online parser, eg.
|
|
|
|
# http://yaml-online-parser.appspot.com/
|
|
|
|
|
2017-12-12 04:23:09 -05:00
|
|
|
# Variables
|
|
|
|
|
|
|
|
## IMPORTANT
|
|
|
|
# If you change the `docker_image` version, also change the `cache_key` suffix and the version of
|
|
|
|
# `com_github_bazelbuild_buildtools` in the `/WORKSPACE` file.
|
2018-10-15 19:51:26 -04:00
|
|
|
var_1: &docker_image angular/ngcontainer:0.7.0
|
|
|
|
var_2: &cache_key v2-angular-{{ .Branch }}-{{ checksum "yarn.lock" }}-0.7.0
|
2017-12-12 04:23:09 -05:00
|
|
|
|
2018-04-13 14:53:48 -04:00
|
|
|
# Define common ENV vars
|
|
|
|
var_3: &define_env_vars
|
2018-10-17 12:19:15 -04:00
|
|
|
run:
|
|
|
|
name: Define environment variables
|
|
|
|
command: |
|
|
|
|
echo "export PROJECT_ROOT=$(pwd)" | tee -a $BASH_ENV
|
|
|
|
echo "export CI_AIO_MIN_PWA_SCORE=95" | tee -a $BASH_ENV
|
|
|
|
# This is the branch being built; e.g. `pull/12345` for PR builds.
|
|
|
|
echo "export CI_BRANCH=$CIRCLE_BRANCH" | tee -a $BASH_ENV
|
|
|
|
echo "export CI_COMMIT=$CIRCLE_SHA1" | tee -a $BASH_ENV
|
2018-10-18 08:43:58 -04:00
|
|
|
# `CI_COMMIT_RANGE` will only be available when `CIRCLE_COMPARE_URL` is also available,
|
|
|
|
# i.e. on push builds (a.k.a. non-PR builds). That is fine, since we only need it in push builds.
|
|
|
|
echo "export CI_COMMIT_RANGE=$(sed -r 's|^.*/([0-9a-f]+\.\.\.[0-9a-f]+)$|\1|i' <<< ${CIRCLE_COMPARE_URL:-})" | tee -a $BASH_ENV
|
2018-10-17 12:19:15 -04:00
|
|
|
echo "export CI_PULL_REQUEST=${CIRCLE_PR_NUMBER:-false}" | tee -a $BASH_ENV
|
|
|
|
echo "export CI_REPO_NAME=$CIRCLE_PROJECT_REPONAME" | tee -a $BASH_ENV
|
|
|
|
echo "export CI_REPO_OWNER=$CIRCLE_PROJECT_USERNAME" | tee -a $BASH_ENV
|
|
|
|
# WARNING: Secrets (do not print).
|
|
|
|
echo "export CI_SECRET_AIO_DEPLOY_FIREBASE_TOKEN=$AIO_DEPLOY_TOKEN" >> $BASH_ENV
|
|
|
|
echo "export CI_SECRET_PAYLOAD_FIREBASE_TOKEN=$ANGULAR_PAYLOAD_TOKEN" >> $BASH_ENV
|
2018-04-13 14:53:48 -04:00
|
|
|
|
2018-01-25 12:55:27 -05:00
|
|
|
# See remote cache documentation in /docs/BAZEL.md
|
2018-04-13 14:53:48 -04:00
|
|
|
var_4: &setup-bazel-remote-cache
|
2018-01-25 12:55:27 -05:00
|
|
|
run:
|
|
|
|
name: Start up bazel remote cache proxy
|
|
|
|
command: ~/bazel-remote-proxy -backend circleci://
|
|
|
|
background: true
|
|
|
|
|
2018-08-02 00:02:36 -04:00
|
|
|
var_5: &setup_bazel_remote_execution
|
|
|
|
run:
|
|
|
|
name: "Setup bazel RBE remote execution"
|
2018-10-17 12:19:15 -04:00
|
|
|
command: openssl aes-256-cbc -d -in .circleci/gcp_token -k "$CI_REPO_NAME" -out /home/circleci/.gcp_credentials && echo "export GOOGLE_APPLICATION_CREDENTIALS=/home/circleci/.gcp_credentials" >> $BASH_ENV && sudo bash -c "cat .circleci/rbe-bazel.rc >> /etc/bazel.bazelrc"
|
2018-08-02 00:02:36 -04:00
|
|
|
|
2017-07-13 15:16:02 -04:00
|
|
|
# Settings common to each job
|
|
|
|
anchor_1: &job_defaults
|
2017-06-14 19:38:27 -04:00
|
|
|
working_directory: ~/ng
|
|
|
|
docker:
|
2017-12-12 04:23:09 -05:00
|
|
|
- image: *docker_image
|
2017-06-14 19:38:27 -04:00
|
|
|
|
2017-07-13 15:16:02 -04:00
|
|
|
# After checkout, rebase on top of master.
|
|
|
|
# Similar to travis behavior, but not quite the same.
|
|
|
|
# See https://discuss.circleci.com/t/1662
|
|
|
|
anchor_2: &post_checkout
|
2018-10-17 12:19:15 -04:00
|
|
|
post: git pull --ff-only origin "refs/pull/${CI_PULL_REQUEST//*pull\//}/merge"
|
2017-07-13 15:16:02 -04:00
|
|
|
|
2017-06-02 20:03:15 -04:00
|
|
|
version: 2
|
|
|
|
jobs:
|
2017-06-14 19:38:27 -04:00
|
|
|
lint:
|
2017-07-13 15:16:02 -04:00
|
|
|
<<: *job_defaults
|
2018-09-13 12:18:28 -04:00
|
|
|
resource_class: xlarge
|
2017-06-02 20:03:15 -04:00
|
|
|
steps:
|
2018-10-17 12:19:15 -04:00
|
|
|
- *define_env_vars
|
2017-06-22 17:55:33 -04:00
|
|
|
- checkout:
|
2017-07-13 15:16:02 -04:00
|
|
|
<<: *post_checkout
|
2018-09-13 12:18:28 -04:00
|
|
|
- run: sudo cp .circleci/bazel.rc /etc/bazel.bazelrc
|
2018-01-25 12:55:27 -05:00
|
|
|
|
2018-03-01 10:15:30 -05:00
|
|
|
# Check BUILD.bazel formatting before we have a node_modules directory
|
|
|
|
# Then we don't need any exclude pattern to avoid checking those files
|
2018-09-13 12:18:28 -04:00
|
|
|
- run: 'yarn buildifier -mode=check ||
|
2018-03-01 10:15:30 -05:00
|
|
|
(echo "BUILD files not formatted. Please run ''yarn buildifier''" ; exit 1)'
|
|
|
|
# Run the skylark linter to check our Bazel rules
|
2018-09-13 12:18:28 -04:00
|
|
|
- run: 'yarn skylint ||
|
2018-01-05 13:53:55 -05:00
|
|
|
(echo -e "\n.bzl files have lint errors. Please run ''yarn skylint''"; exit 1)'
|
2018-01-25 12:55:27 -05:00
|
|
|
|
2017-06-02 20:03:15 -04:00
|
|
|
- restore_cache:
|
2017-12-12 04:23:09 -05:00
|
|
|
key: *cache_key
|
2017-06-21 00:08:20 -04:00
|
|
|
|
2017-10-19 05:19:45 -04:00
|
|
|
- run: yarn install --frozen-lockfile --non-interactive
|
2017-06-02 20:03:15 -04:00
|
|
|
- run: ./node_modules/.bin/gulp lint
|
2017-06-21 00:08:20 -04:00
|
|
|
|
2018-04-23 14:46:02 -04:00
|
|
|
test:
|
2017-07-13 15:16:02 -04:00
|
|
|
<<: *job_defaults
|
2018-03-07 20:26:03 -05:00
|
|
|
resource_class: xlarge
|
2017-06-14 19:38:27 -04:00
|
|
|
steps:
|
2018-04-13 14:53:48 -04:00
|
|
|
- *define_env_vars
|
2017-07-13 15:16:02 -04:00
|
|
|
- checkout:
|
|
|
|
<<: *post_checkout
|
2018-01-25 12:55:27 -05:00
|
|
|
- run: sudo cp .circleci/bazel.rc /etc/bazel.bazelrc
|
2018-01-05 13:53:55 -05:00
|
|
|
|
2017-12-05 14:36:08 -05:00
|
|
|
- run: bazel info release
|
2018-05-30 21:15:38 -04:00
|
|
|
- run: bazel run @nodejs//:yarn
|
2018-08-02 00:02:36 -04:00
|
|
|
# Setup remote execution and run RBE-compatible tests.
|
|
|
|
- *setup_bazel_remote_execution
|
2018-10-16 02:24:22 -04:00
|
|
|
- run: bazel test //... --build_tag_filters=-ivy-only --test_tag_filters=-ivy-only,-local
|
2018-08-02 00:02:36 -04:00
|
|
|
# Now run RBE incompatible tests locally.
|
|
|
|
- run: sudo cp .circleci/bazel.rc /etc/bazel.bazelrc
|
2018-10-16 02:24:22 -04:00
|
|
|
- run: bazel test //... --build_tag_filters=-ivy-only,local --test_tag_filters=-ivy-only,local
|
2017-12-13 12:18:16 -05:00
|
|
|
|
2018-02-02 18:25:33 -05:00
|
|
|
# CircleCI will allow us to go back and view/download these artifacts from past builds.
|
|
|
|
# Also we can use a service like https://buildsize.org/ to automatically track binary size of these artifacts.
|
2018-05-03 04:46:20 -04:00
|
|
|
# The destination keys need be format {projectName}/{context}/{fileName} so that the github-robot can process them for size calculations
|
|
|
|
# projectName should remain consistant to group files
|
|
|
|
# context and fileName can be almost anything (within usual URI rules)
|
|
|
|
# There should only be exactly 2 forward slashes in the path
|
|
|
|
# This is so they're backwards compatiable with the existing data we have on bundle sizes
|
2018-02-02 18:25:33 -05:00
|
|
|
- store_artifacts:
|
|
|
|
path: dist/bin/packages/core/test/bundling/hello_world/bundle.min.js
|
2018-05-03 04:46:20 -04:00
|
|
|
destination: core/hello_world/bundle
|
2018-04-02 19:34:48 -04:00
|
|
|
- store_artifacts:
|
|
|
|
path: dist/bin/packages/core/test/bundling/todo/bundle.min.js
|
2018-05-03 04:46:20 -04:00
|
|
|
destination: core/todo/bundle
|
2018-02-06 20:56:35 -05:00
|
|
|
- store_artifacts:
|
2018-04-16 17:55:47 -04:00
|
|
|
path: dist/bin/packages/core/test/bundling/hello_world/bundle.min.js.br
|
2018-05-03 04:46:20 -04:00
|
|
|
destination: core/hello_world/bundle.br
|
2018-04-02 19:34:48 -04:00
|
|
|
- store_artifacts:
|
2018-04-16 17:55:47 -04:00
|
|
|
path: dist/bin/packages/core/test/bundling/todo/bundle.min.js.br
|
2018-05-03 04:46:20 -04:00
|
|
|
destination: core/todo/bundle.br
|
2017-06-02 20:03:15 -04:00
|
|
|
- save_cache:
|
2017-12-12 04:23:09 -05:00
|
|
|
key: *cache_key
|
2017-06-02 20:03:15 -04:00
|
|
|
paths:
|
|
|
|
- "node_modules"
|
2018-03-07 20:26:03 -05:00
|
|
|
- "~/bazel_repository_cache"
|
2018-10-05 10:16:47 -04:00
|
|
|
|
2018-06-05 14:38:46 -04:00
|
|
|
# Temporary job to test what will happen when we flip the Ivy flag to true
|
|
|
|
test_ivy_jit:
|
|
|
|
<<: *job_defaults
|
|
|
|
resource_class: xlarge
|
|
|
|
steps:
|
|
|
|
- *define_env_vars
|
|
|
|
- checkout:
|
|
|
|
<<: *post_checkout
|
|
|
|
- run: sudo cp .circleci/bazel.rc /etc/bazel.bazelrc
|
|
|
|
|
|
|
|
- run: bazel run @yarn//:yarn
|
2018-08-02 00:02:36 -04:00
|
|
|
- *setup_bazel_remote_execution
|
2018-10-16 02:24:22 -04:00
|
|
|
- run: bazel test //... --define=compile=jit --build_tag_filters=ivy-jit --test_tag_filters=ivy-jit
|
2018-06-05 14:38:46 -04:00
|
|
|
|
|
|
|
test_ivy_aot:
|
|
|
|
<<: *job_defaults
|
|
|
|
resource_class: xlarge
|
|
|
|
steps:
|
|
|
|
- *define_env_vars
|
|
|
|
- checkout:
|
|
|
|
<<: *post_checkout
|
|
|
|
- run: sudo cp .circleci/bazel.rc /etc/bazel.bazelrc
|
|
|
|
|
|
|
|
- run: bazel run @yarn//:yarn
|
2018-08-02 00:02:36 -04:00
|
|
|
- *setup_bazel_remote_execution
|
2018-10-23 12:54:12 -04:00
|
|
|
- run: bazel test //... --define=compile=aot --build_tag_filters=ivy-aot --test_tag_filters=ivy-aot
|
2017-06-14 19:38:27 -04:00
|
|
|
|
2018-10-10 16:55:45 -04:00
|
|
|
test_aio:
|
|
|
|
<<: *job_defaults
|
|
|
|
steps:
|
|
|
|
- *define_env_vars
|
|
|
|
- checkout:
|
|
|
|
<<: *post_checkout
|
|
|
|
- restore_cache:
|
|
|
|
key: *cache_key
|
|
|
|
# Build aio
|
|
|
|
- run: yarn --cwd aio build --progress=false
|
|
|
|
# Lint the code
|
|
|
|
- run: yarn --cwd aio lint
|
|
|
|
# Run PWA-score tests
|
|
|
|
# (Run before unit and e2e tests, which destroy the `dist/` directory.)
|
|
|
|
- run:
|
|
|
|
name: Run PWA-score tests
|
|
|
|
command: xvfb-run --auto-servernum yarn --cwd aio test-pwa-score-localhost $CI_AIO_MIN_PWA_SCORE
|
|
|
|
# Check the bundle sizes.
|
|
|
|
# (Run before unit and e2e tests, which destroy the `dist/` directory.)
|
2018-10-18 08:43:58 -04:00
|
|
|
- run: yarn --cwd aio payload-size
|
2018-10-10 16:55:45 -04:00
|
|
|
# Run unit tests
|
|
|
|
- run: xvfb-run --auto-servernum yarn --cwd aio test --watch=false
|
|
|
|
# Run e2e tests
|
|
|
|
- run: xvfb-run --auto-servernum yarn --cwd aio e2e
|
|
|
|
# Run unit tests for Firebase redirects
|
|
|
|
- run: yarn --cwd aio redirects-test
|
|
|
|
|
|
|
|
test_aio_local:
|
|
|
|
<<: *job_defaults
|
|
|
|
steps:
|
|
|
|
- *define_env_vars
|
|
|
|
- checkout:
|
|
|
|
<<: *post_checkout
|
|
|
|
- attach_workspace:
|
|
|
|
at: dist
|
|
|
|
- restore_cache:
|
|
|
|
key: *cache_key
|
|
|
|
# Build aio (with local Angular packages)
|
|
|
|
- run: yarn --cwd aio build-local --progress=false
|
|
|
|
# Run PWA-score tests
|
|
|
|
# (Run before unit and e2e tests, which destroy the `dist/` directory.)
|
|
|
|
- run:
|
|
|
|
name: Run PWA-score tests
|
|
|
|
command: xvfb-run --auto-servernum yarn --cwd aio test-pwa-score-localhost $CI_AIO_MIN_PWA_SCORE
|
|
|
|
# Run unit tests
|
|
|
|
- run: xvfb-run --auto-servernum yarn --cwd aio test --watch=false
|
|
|
|
# Run e2e tests
|
|
|
|
- run: xvfb-run --auto-servernum yarn --cwd aio e2e
|
|
|
|
|
|
|
|
test_aio_tools:
|
|
|
|
<<: *job_defaults
|
|
|
|
steps:
|
|
|
|
- *define_env_vars
|
|
|
|
- checkout:
|
|
|
|
<<: *post_checkout
|
|
|
|
- attach_workspace:
|
|
|
|
at: dist
|
|
|
|
- restore_cache:
|
|
|
|
key: *cache_key
|
|
|
|
# Install
|
|
|
|
- run: yarn --cwd aio install --frozen-lockfile --non-interactive
|
|
|
|
- run: yarn --cwd aio extract-cli-command-docs
|
|
|
|
# Run tools tests
|
|
|
|
- run: yarn --cwd aio tools-test
|
|
|
|
- run: ./aio/aio-builds-setup/scripts/test.sh
|
|
|
|
|
|
|
|
test_docs_examples_0:
|
|
|
|
<<: *job_defaults
|
|
|
|
steps:
|
|
|
|
- *define_env_vars
|
|
|
|
- checkout:
|
|
|
|
<<: *post_checkout
|
|
|
|
- attach_workspace:
|
|
|
|
at: dist
|
|
|
|
- restore_cache:
|
|
|
|
key: *cache_key
|
|
|
|
# Install root
|
|
|
|
- run: yarn install --frozen-lockfile --non-interactive
|
|
|
|
# Install aio
|
|
|
|
- run: yarn --cwd aio install --frozen-lockfile --non-interactive
|
|
|
|
# Run examples tests
|
|
|
|
- run: xvfb-run --auto-servernum yarn --cwd aio example-e2e --setup --local --shard=0/2
|
|
|
|
|
|
|
|
test_docs_examples_1:
|
|
|
|
<<: *job_defaults
|
|
|
|
steps:
|
|
|
|
- *define_env_vars
|
|
|
|
- checkout:
|
|
|
|
<<: *post_checkout
|
|
|
|
- attach_workspace:
|
|
|
|
at: dist
|
|
|
|
- restore_cache:
|
|
|
|
key: *cache_key
|
|
|
|
# Install root
|
|
|
|
- run: yarn install --frozen-lockfile --non-interactive
|
|
|
|
# Install aio
|
|
|
|
- run: yarn --cwd aio install --frozen-lockfile --non-interactive
|
|
|
|
# Run examples tests
|
|
|
|
- run: xvfb-run --auto-servernum yarn --cwd aio example-e2e --setup --local --shard=1/2
|
|
|
|
|
2018-10-17 12:19:15 -04:00
|
|
|
# This job should only be run on PR builds, where `CI_PULL_REQUEST` is not `false`.
|
2018-05-09 13:54:13 -04:00
|
|
|
aio_preview:
|
|
|
|
<<: *job_defaults
|
|
|
|
environment:
|
|
|
|
AIO_SNAPSHOT_ARTIFACT_PATH: &aio_preview_artifact_path 'aio/tmp/snapshot.tgz'
|
|
|
|
steps:
|
2018-10-17 12:19:15 -04:00
|
|
|
- *define_env_vars
|
2018-05-09 13:54:13 -04:00
|
|
|
- checkout:
|
|
|
|
<<: *post_checkout
|
|
|
|
- restore_cache:
|
|
|
|
key: *cache_key
|
2018-08-17 04:14:26 -04:00
|
|
|
- run: yarn install --frozen-lockfile --non-interactive
|
2018-10-17 12:19:15 -04:00
|
|
|
- run: ./aio/scripts/build-artifacts.sh $AIO_SNAPSHOT_ARTIFACT_PATH $CI_PULL_REQUEST $CI_COMMIT
|
2018-05-09 13:54:13 -04:00
|
|
|
- store_artifacts:
|
|
|
|
path: *aio_preview_artifact_path
|
|
|
|
# The `destination` needs to be kept in synch with the value of
|
|
|
|
# `AIO_ARTIFACT_PATH` in `aio/aio-builds-setup/Dockerfile`
|
|
|
|
destination: aio/dist/aio-snapshot.tgz
|
|
|
|
|
2018-10-17 12:19:15 -04:00
|
|
|
# This job should only be run on PR builds, where `CI_PULL_REQUEST` is not `false`.
|
2018-08-25 17:40:58 -04:00
|
|
|
test_aio_preview:
|
|
|
|
<<: *job_defaults
|
|
|
|
steps:
|
2018-10-17 12:19:15 -04:00
|
|
|
- *define_env_vars
|
2018-08-25 17:40:58 -04:00
|
|
|
- checkout:
|
|
|
|
<<: *post_checkout
|
|
|
|
- restore_cache:
|
|
|
|
key: *cache_key
|
|
|
|
- run: yarn install --cwd aio --frozen-lockfile --non-interactive
|
|
|
|
- run:
|
|
|
|
name: Wait for preview and run tests
|
2018-10-17 12:19:15 -04:00
|
|
|
command: xvfb-run --auto-servernum node aio/scripts/test-preview.js $CI_PULL_REQUEST $CI_COMMIT $CI_AIO_MIN_PWA_SCORE
|
2018-08-25 17:40:58 -04:00
|
|
|
|
2018-04-23 14:46:02 -04:00
|
|
|
# This job exists only for backwards-compatibility with old scripts and tests
|
|
|
|
# that rely on the pre-Bazel dist/packages-dist layout.
|
|
|
|
# It duplicates some work with the job above: we build the bazel packages
|
|
|
|
# twice. Even though we have a remote cache, these jobs will typically run in
|
|
|
|
# parallel so up-to-date outputs will not be available at the time the build
|
|
|
|
# starts.
|
|
|
|
# No new jobs should depend on this one.
|
|
|
|
build-packages-dist:
|
|
|
|
<<: *job_defaults
|
|
|
|
resource_class: xlarge
|
|
|
|
steps:
|
|
|
|
- *define_env_vars
|
|
|
|
- checkout:
|
|
|
|
<<: *post_checkout
|
|
|
|
- run: sudo cp .circleci/bazel.rc /etc/bazel.bazelrc
|
2018-05-30 21:15:38 -04:00
|
|
|
- run: bazel run @nodejs//:yarn
|
2018-08-02 00:02:36 -04:00
|
|
|
- *setup_bazel_remote_execution
|
|
|
|
- run: scripts/build-packages-dist.sh
|
2018-04-23 14:46:02 -04:00
|
|
|
|
|
|
|
# Save the npm packages from //packages/... for other workflow jobs to read
|
|
|
|
# https://circleci.com/docs/2.0/workflows/#using-workspaces-to-share-data-among-jobs
|
|
|
|
- persist_to_workspace:
|
|
|
|
root: dist
|
|
|
|
paths:
|
|
|
|
- packages-dist
|
2018-06-05 14:38:46 -04:00
|
|
|
- packages-dist-ivy-jit
|
2018-10-23 12:54:12 -04:00
|
|
|
- packages-dist-ivy-aot
|
2018-04-23 14:46:02 -04:00
|
|
|
|
|
|
|
# We run the integration tests outside of Bazel for now.
|
|
|
|
# They are a separate workflow job so that they can be easily re-run.
|
|
|
|
# When the tests are ported to bazel test targets, they should move to the "test"
|
|
|
|
# job above, as part of the bazel test command. That has flaky_test_attempts so the
|
|
|
|
# need to re-run manually should be alleviated.
|
|
|
|
# See comments inside the integration/run_tests.sh script.
|
|
|
|
integration_test:
|
|
|
|
<<: *job_defaults
|
2018-06-14 10:37:06 -04:00
|
|
|
# Note: we run Bazel in one of the integration tests, and it can consume >2G
|
|
|
|
# of memory. Together with the system under test, this can exhaust the RAM
|
|
|
|
# on a 4G worker so we use a larger machine here too.
|
|
|
|
resource_class: xlarge
|
2018-04-23 14:46:02 -04:00
|
|
|
steps:
|
|
|
|
- *define_env_vars
|
|
|
|
- checkout:
|
|
|
|
<<: *post_checkout
|
|
|
|
- attach_workspace:
|
|
|
|
at: dist
|
|
|
|
- run: xvfb-run --auto-servernum ./integration/run_tests.sh
|
|
|
|
|
|
|
|
# This job updates the content of repos like github.com/angular/core-builds
|
|
|
|
# for every green build on angular/angular.
|
|
|
|
publish_snapshot:
|
|
|
|
<<: *job_defaults
|
|
|
|
steps:
|
2018-10-17 12:19:15 -04:00
|
|
|
- *define_env_vars
|
2018-04-27 19:21:38 -04:00
|
|
|
# See below - ideally this job should not trigger for non-upstream builds.
|
|
|
|
# But since it does, we have to check this condition.
|
|
|
|
- run:
|
|
|
|
name: Skip this job for Pull Requests and Fork builds
|
|
|
|
# Note, `|| true` on the end makes this step always exit 0
|
|
|
|
command: '[[
|
2018-10-17 12:19:15 -04:00
|
|
|
"$CI_PULL_REQUEST" != "false"
|
|
|
|
|| "$CI_REPO_OWNER" != "angular"
|
|
|
|
|| "$CI_REPO_NAME" != "angular"
|
2018-04-27 19:21:38 -04:00
|
|
|
]] && circleci step halt || true'
|
2018-04-23 14:46:02 -04:00
|
|
|
- checkout:
|
|
|
|
<<: *post_checkout
|
|
|
|
- attach_workspace:
|
|
|
|
at: dist
|
|
|
|
# CircleCI has a config setting to force SSH for all github connections
|
|
|
|
# This is not compatible with our mechanism of using a Personal Access Token
|
|
|
|
# Clear the global setting
|
|
|
|
- run: git config --global --unset "url.ssh://git@github.com.insteadof"
|
2018-04-27 19:21:38 -04:00
|
|
|
- run:
|
|
|
|
name: Decrypt github credentials
|
|
|
|
command: 'openssl aes-256-cbc -d -in .circleci/github_token -k "${KEY}" -out ~/.git_credentials'
|
2018-04-23 14:46:02 -04:00
|
|
|
- run: ./scripts/ci/publish-build-artifacts.sh
|
|
|
|
|
2018-02-27 18:24:07 -05:00
|
|
|
aio_monitoring:
|
|
|
|
<<: *job_defaults
|
|
|
|
steps:
|
2018-10-17 12:19:15 -04:00
|
|
|
- *define_env_vars
|
2018-02-27 18:24:07 -05:00
|
|
|
- checkout:
|
|
|
|
<<: *post_checkout
|
|
|
|
- restore_cache:
|
|
|
|
key: *cache_key
|
2018-09-27 09:35:05 -04:00
|
|
|
- run:
|
|
|
|
name: Run tests against the deployed apps
|
2018-10-17 12:19:15 -04:00
|
|
|
command: xvfb-run --auto-servernum ./aio/scripts/test-production.sh $CI_AIO_MIN_PWA_SCORE
|
2018-02-27 18:24:07 -05:00
|
|
|
|
2017-06-14 19:38:27 -04:00
|
|
|
workflows:
|
|
|
|
version: 2
|
|
|
|
default_workflow:
|
|
|
|
jobs:
|
|
|
|
- lint
|
2018-04-23 14:46:02 -04:00
|
|
|
- test
|
2018-06-05 14:38:46 -04:00
|
|
|
- test_ivy_jit
|
|
|
|
- test_ivy_aot
|
2018-04-23 14:46:02 -04:00
|
|
|
- build-packages-dist
|
2018-10-10 16:55:45 -04:00
|
|
|
- test_aio
|
|
|
|
- test_aio_local:
|
|
|
|
requires:
|
|
|
|
- build-packages-dist
|
|
|
|
- test_aio_tools:
|
|
|
|
requires:
|
|
|
|
- build-packages-dist
|
|
|
|
- test_docs_examples_0:
|
|
|
|
requires:
|
|
|
|
- build-packages-dist
|
|
|
|
- test_docs_examples_1:
|
|
|
|
requires:
|
|
|
|
- build-packages-dist
|
2018-09-20 04:21:53 -04:00
|
|
|
- aio_preview:
|
|
|
|
# Only run on PR builds. (There can be no previews for non-PR builds.)
|
|
|
|
filters:
|
|
|
|
branches:
|
|
|
|
only: /pull\/\d+/
|
2018-08-25 17:40:58 -04:00
|
|
|
- test_aio_preview:
|
|
|
|
requires:
|
|
|
|
- aio_preview
|
2018-04-23 14:46:02 -04:00
|
|
|
- integration_test:
|
|
|
|
requires:
|
|
|
|
- build-packages-dist
|
|
|
|
- publish_snapshot:
|
|
|
|
# Note: no filters on this job because we want it to run for all upstream branches
|
|
|
|
# We'd really like to filter out pull requests here, but not yet available:
|
|
|
|
# https://discuss.circleci.com/t/workflows-pull-request-filter/14396/4
|
2018-04-27 19:21:38 -04:00
|
|
|
# Instead, the job just exits immediately at the first step.
|
2018-04-23 14:46:02 -04:00
|
|
|
requires:
|
2018-04-23 19:41:10 -04:00
|
|
|
# Only publish if tests and integration tests pass
|
2018-04-23 19:14:34 -04:00
|
|
|
- test
|
2018-06-05 14:38:46 -04:00
|
|
|
- test_ivy_jit
|
|
|
|
- test_ivy_aot
|
2018-04-23 19:41:10 -04:00
|
|
|
- integration_test
|
2018-04-23 19:14:34 -04:00
|
|
|
# Get the artifacts to publish from the build-packages-dist job
|
|
|
|
# since the publishing script expects the legacy outputs layout.
|
2018-04-23 14:46:02 -04:00
|
|
|
- build-packages-dist
|
|
|
|
|
2018-02-27 18:24:07 -05:00
|
|
|
aio_monitoring:
|
|
|
|
jobs:
|
|
|
|
- aio_monitoring
|
|
|
|
triggers:
|
|
|
|
- schedule:
|
|
|
|
cron: "0 0 * * *"
|
|
|
|
filters:
|
|
|
|
branches:
|
|
|
|
only:
|
|
|
|
- master
|
2018-09-20 04:21:53 -04:00
|
|
|
|
2018-05-09 13:54:13 -04:00
|
|
|
notify:
|
|
|
|
webhooks:
|
2018-08-07 19:41:58 -04:00
|
|
|
- url: https://ngbuilds.io/circle-build
|