Skip to content

Instantly share code, notes, and snippets.

@ghaiklor

ghaiklor/config.yml

Created Aug 4, 2018
Embed
What would you like to do?
CircleCI configuration for mono-repository
version: 2
aliases:
- &docker_environment
- image: circleci/node:8-stretch
- image: circleci/mongo:3.6
- image: circleci/rabbitmq:3.6.6
- &checkout
path: ~/elasticio
- &restore_cache_dependencies
name: "Restoring node_modules from the cache"
keys:
- node-modules-cache-{{ checksum "package-lock.json" }}
- &run_npm_install
name: Installing Dependencies
command: npm install --no-package-lock --no-audit --verbose
- &save_cache_dependencies
name: "Saving node_modules into the cache"
key: node-modules-cache-{{ checksum "package-lock.json" }}
paths:
- node_modules
- &run_build
name: Building an Image
command: ~/elasticio/.circleci/run.sh
- &common_steps
- checkout: *checkout
- restore_cache: *restore_cache_dependencies
- run: *run_npm_install
- save_cache: *save_cache_dependencies
- setup_remote_docker
- run: *run_build
- &common_environment
docker: *docker_environment
steps: *common_steps
jobs:
api:
<<: *common_environment
working_directory: ~/elasticio/src/api
frontend:
<<: *common_environment
working_directory: ~/elasticio/src/frontend
workflows:
version: 2
build:
jobs:
- api
- frontend
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.