BB pipeline cannot find dependancies if run manually

Marta Kruneva September 3, 2018

Hi,

 

I am having an issue configuring BB pipelines to manually trigger certain steps.

For example pipeline 

 deploy-to-integration:
- step:
caches:
- node
script:
- make install_yarn
- make install_awscli
- make lint-test
- make deploy-integration

works with no problem , but 

 master:
- step:
name: Install Lint Test
caches:
- node
script:
- make install_yarn
- make install_awscli
- make lint-test
- step:
name: Deploy to Int
deployment: test
trigger: manual
script:
- make deploy-integration

 gives an error that one of the dependancies is not found 

sh: 1: webpack: not found

The make commands are the same 

Is there anything obviously wrong with this setup ? 

Do I need to install dependencies on each step ? 

 

Thanks 

 

1 answer

0 votes
Steven Vaccarella
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 13, 2018

Hi Marta,

Each step runs in a separate docker container on a separate machine, so none of the files that are created in the first step will be automatically available in the second step. That includes any software that is installed in the first step.

Generally you will want to install any required software again in the second step and transfer any other files generated in your first step using artifacts: https://confluence.atlassian.com/bitbucket/using-artifacts-in-steps-935389074.html

Note that artifacts can only be used to transfer files within your build directory, so generally can't be used to copy installed software.

If installing software takes a significant amount of time and you want to avoid doing that in every step then you should consider building a custom docker image and using that image for your build. https://confluence.atlassian.com/bitbucket/use-docker-images-as-build-environments-792298897.html

Cheers,
Steven

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events