Hello there!
So, I have the follow bitbucket-pipelines.yml
image: juliocsmelo/awscliandnode
pipelines:
branches:
master:
- step:
name: Lerna bootstrap
image: node:8-alpine
caches:
- node
script:
- npm install -g yarn lerna
- lerna bootstrap
artifacts:
- node_modules
- step:
name: Deploy web application
caches:
- node
script:
- sh deploy.sh web
- step:
name: Deploy storybook
caches:
- node
trigger: manual
script:
# build and upload storybook to S3 bucket
- sh deploy.sh storybook
When the first step is finished the artifacts node_modules that is a directory should be available to following steps. But is not happening. Why?
Hello Julio
Your current definition will only copy the node_modules directory. Not the contents itself. To have the entire directory and its files copied, you can change your configuration to:
artifacts:
- node_modules/**
The other issue is you have the node cache enable on all your steps, which caches the same directory. This will cause conflicts on file writes. So instead you can remove the caches on the second and third steps. i.e.
image: juliocsmelo/awscliandnode
pipelines:
branches:
master:
- step:
name: Lerna bootstrap
image: node:8-alpine
caches:
- node
script:
- npm install -g yarn lerna
- lerna bootstrap
artifacts:
- node_modules/**
- step:
name: Deploy web application
script:
- sh deploy.sh web
- step:
name: Deploy storybook
trigger: manual
script:
# build and upload storybook to S3 bucket
- sh deploy.sh storybook
Everything else looks like it should be good to go! :)
Thanks,
Phil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.