Say I have a feature branch `feature/my-feature` and using pipelines I want to deploy to a Heroku app called `dev-server`.
My pipelines config has the branch config:
branches:
feature/*:
- step:
name: Build feature branch and push to Heroku dev server
deployment: test
script:
- npm install
- git push https://heroku:$HEROKU_API_KEY@git.heroku.com/$HEROKU_APP_NAME_DEV.git HEAD
When deploying, logs say:
+ git push https://heroku:$HEROKU_API_KEY@git.heroku.com/$HEROKU_APP_NAME_DEV.git HEAD
remote: Pushed to non-master branch, skipping build.
And the app does not get built on the Heroku server.
Apparently this is because Heroku needs the app to be built on the master branch.
What should the git push command be to have the build occur on the master branch?
I tried replacing "HEAD" with "master" but the build failed with error
+ git push https://heroku:$HEROKU_API_KEY@git.heroku.com/$HEROKU_APP_NAME_DEV.git master
error: src refspec master does not match any.
Figured it out: using HEAD:master works.
+ git push https://heroku:$HEROKU_API_KEY@git.heroku.com/$HEROKU_APP_NAME_DEV.git HEAD:master
Like this?
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.