Skip to content

Instantly share code, notes, and snippets.

@wkei
Created May 7, 2019 10:27
Show Gist options
  • Save wkei/4751f9c4cd6a4ec954a25807a127219a to your computer and use it in GitHub Desktop.
Save wkei/4751f9c4cd6a4ec954a25807a127219a to your computer and use it in GitHub Desktop.
CircleCI
#https://circleci.com/docs/2.0/workflows/#using-workspaces-to-share-data-among-jobs
version: 2.1
jobs:
build:
docker:
- image: circleci/node:10.15.3
working_directory: ~/test-ci
steps:
- checkout
- run: mkdir -p dist
- run: echo "xxx" > dist/xxxxx.txt
- persist_to_workspace:
root: dist
paths: .
test:
docker:
- image: circleci/node:10.15.3
working_directory: ~/test-ci
steps:
- attach_workspace:
at: dist
- run: cat dist/xxxxx.txt
workflows:
version: 2
build_and_test:
jobs:
- build
- test:
requires:
- build
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment