Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 50 additions & 16 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,58 @@
version: 2.1

job_defaults: &job_defaults
working_directory: ~/ng-build-monolithic
docker:
- image: cimg/node:lts-browsers

orbs:
browser-tools: circleci/browser-tools@1.2.3
jobs:
build:
docker:
- image: cimg/node:16.13.1-browsers
node: circleci/node@5.2.0
build-tools: circleci/build-tools@3.0.0
browser-tools: circleci/browser-tools@1.5.3

commands:
checkout_and_rebase:
description: Checkout and verify clean merge with main branch
steps:
- checkout
- browser-tools/install-chrome
- browser-tools/install-chromedriver
- run:
name: Set git user.name and user.email for rebase.
# User is required for rebase.
command: |
google-chrome --version
chromedriver --version
name: Check install
- restore_cache:
key: ng-project-{{ .Branch }}-{{ checksum "package-lock.json" }}
- run: npm install
- save_cache:
key: ng-project-{{ .Branch }}-{{ checksum "package-lock.json" }}
git config user.name "devintent-ci"
git config user.email "ci@devintent.com"
- build-tools/merge-with-parent:
parent: main

setup:
description: 'Set up executor'
steps:
- attach_workspace:
at: ~/

jobs:
initialize:
<<: *job_defaults
steps:
- checkout_and_rebase
- browser-tools/install-chrome
- browser-tools/install-chromedriver
- node/install-packages
- persist_to_workspace:
root: ~/
paths:
- "node_modules"
- ng-build-monolithic

build:
<<: *job_defaults
steps:
- setup
- run: npm run build

workflows:
build:
jobs:
- initialize
- build:
requires:
- initialize