Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

BitBucket Pipeline to Heroku npm run build script

blubberbo October 28, 2018
I am not 100% on how pipelines work, but I think I understand at least the basics. Following the guide here: https://confluence.atlassian.com/bitbucket/deploy-to-heroku-872013667.html, it believe it deploys the code that has been committed to the branch, correct? If I have an npm script that I run to build for production, such as "npm run build", do I need to run that before I commit my code to the BitBucket branch for the pipeline to deploy it correctly? Or can I commit the code right from being developed and have the pipeline run "npm run build" without having to commit the newly built files to the BitBucket repo?

Does that make sense?

Thank you!

1 answer

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

Hi Sydney,

The standard and recommended approach is to only commit the source code to the repository and build all other files within your pipeline.

blubberbo November 6, 2018

So if my pipeline executes "npm run build", will those newly created files then be pushed to Heroku, or will they need to be "committed" first?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events