Reputation: 2480
I have this generic config.yml
in CircleCi.
version: 2
jobs:
build:
docker:
- image: circleci/node:7.10
steps:
- checkout
- run: npm install
- run: npm run lint
deploy:
machine: true
steps:
- checkout
- run: npm install
- run: npm run build
As you can see, npm install
is called twice, which is a duplication of tasks.
Is it possible to share the results of npm install
between the 2 jobs?
The end goal is to install the package only one time.
Upvotes: 2
Views: 679
Reputation: 4017
What you're looking for is Workspaces: https://circleci.com/docs/2.0/workflows/#using-workspaces-to-share-data-among-jobs
Upvotes: 1