Forums

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

How to push select files to heroku with pipeline

ashinzekene September 25, 2018

I have two folders in my bitbucket repository but I want to deploy the contents of only the back-end folder to heroku. I tried this

script:
- cp ./front-end/dist ./back-end -r
- cp ./front-end/index.html ./back-end
- rm -rf front-end
- mv back-end/* .
- ls -Al
- rm back-end -rf
- git push https://heroku:$HEROKU_API_KEY@git.heroku.com/$HEROKU_APP_NAME.git HEAD

But I still get this error 

+ git push https://heroku:$HEROKU_API_KEY@git.heroku.com/$HEROKU_APP_NAME.git HEAD
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> App not compatible with buildpack: https://buildpack-registry.s3.amazonaws.com/buildpacks/heroku/nodejs.tgz
remote: Node.js: package.json not found in application root
remote:
remote: More info: https://devcenter.heroku.com/articles/buildpacks#detection-failure
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:

But the ls -Al logs

total 144
drwxrwxrwx. 8 root root 4096 Sep 25 12:35 .git
drwxrwxrwx. 2 root root 4096 Sep 25 12:35 back-end
drwxrwxrwx. 2 root root 4096 Sep 25 12:35 bin
-rw-rw-rw-. 1 root root 1617 Sep 25 12:35 bitbucket-pipelines.yml
drwxrwxrwx. 2 root root 4096 Sep 25 12:35 controllers
-rwxrwxrwx. 1 root root 1223 Sep 25 12:35 data.json
drwxr-xr-x. 4 root root 4096 Sep 25 12:35 dist
-rwxr-xr-x. 1 root root 2634 Sep 25 12:35 index.html
drwxrwxrwx. 2 root root 4096 Sep 25 12:35 models
-rw-rw-rw-. 1 root root 85391 Sep 25 12:35 package-lock.json
-rw-rw-rw-. 1 root root 611 Sep 25 12:35 package.json
-rwxrwxrwx. 1 root root 563 Sep 25 12:35 readme.md
drwxrwxrwx. 2 root root 4096 Sep 25 12:35 routes
-rw-rw-rw-. 1 root root 1024 Sep 25 12:35 server.js
drwxrwxrwx. 2 root root 4096 Sep 25 12:35 test
-rw-rw-rw-. 1 root root 886 Sep 25 12:35 utils.js

 

How do I make this work?

1 answer

0 votes
Philip Hodder
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 2, 2018

Hi Ekene,

Since this is a duplicate question, I'll redirect you (and any future viewers) here: https://community.atlassian.com/t5/Bitbucket-questions/How-to-push-select-files-to-heroku-with-pipeline/qaq-p/899716#U905113

Thanks,

Phil

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events