Created
August 4, 2018 10:40
-
-
Save ghaiklor/06dea20241b5fd36bea83a5d95add5ed to your computer and use it in GitHub Desktop.
CircleCI configuration for mono-repository
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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