CircleCI-Public / heroku-orb

Easily install and use the Heroku CLI with CircleCI to build, test, and deploy your applications to Heroku.
https://circleci.com/orbs/registry/orb/circleci/heroku
MIT License
6 stars 20 forks source link

Examples use pre/post deploy hooks #5

Closed hmcfletch closed 4 years ago

hmcfletch commented 4 years ago

Is your feature request related to a problem? Please describe. We currently use the commands individually because we need to execute a migration after we deploy. It would be nice if there was an example of running heroku run rake db:migrate --app <<app_name>> as a post deploy hook. I'd imagine a lot of people automatically execute migrations as part of staging deploys.

Describe the solution you'd like Some more usage examples

Describe alternatives you've considered We currently manually do this by executing the individual commands from the orb.

gmemstr commented 4 years ago

Hi @hmcfletch - can you confirm whether the workflow would work for you with post-steps, as detailed here: https://circleci.com/docs/2.0/reusing-config/#defining-pre-and-post-steps? Otherwise, we can definetly look into something more integrated. I'n slightly hesistant to implement this specific command since migration commands will vary from project to project.

hmcfletch commented 4 years ago

@gmemstr thanks for getting back to me. We've actually moved to using Heroku's builtin post deploy hooks, but this issue was more of a request for some more examples in the documentation, not more functionality. I was just suggestion using a database migration command as an example since it is probably a pretty common use case.

gmemstr commented 4 years ago

Ah, that makes more sense :) I misread that. Will put together a PR for this.