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

Allow local changes to be uploaded #26

Closed bre7 closed 2 years ago

bre7 commented 3 years ago

Is your feature request related to a problem? Please describe. Stumbled upon https://discuss.circleci.com/t/deploying-circleci-changes-to-heroku-using-git/25210/5 which described my issue: how to deploy to Heroku local changes using CircleCI.

Describe the solution you'd like New job/command to allow local changes to be pushed to Heroku

Describe alternatives you've considered Use dpl (like Travis does, it's public gem), which allows local modifications to be deployed to Heroku.

Last stable version: https://github.com/travis-ci/dpl/tree/v1#heroku (without skip_cleanup, local changes are stashed)

dpl --provider=heroku --strategy=api --app=$HEROKU_APP_NAME --api_key=$HEROKU_API_KEY --skip_cleanup=true

Beta: https://github.com/travis-ci/dpl#heroku-api (cleanup is optin)

dpl heroku api --app=$HEROKU_APP_NAME --api_key=$HEROKU_API_KEY

The configuration is the same as the current deploy-via-git job/command (API KEY and APP NAME)

gmemstr commented 3 years ago

The deploy-via-git command should allow this to happen if I'm not mistaken, unless I'm missing something. I would rather keep dependencies minimal and generic where possible.

ppentakota1 commented 3 years ago

We have similar use case , where we would update the code based during the circleci build and we want those changes to be pushed along with the committed code in git

We use circleci/heroku orb and we have option called force:true to push local changes forcefully to heroku app

  deploy_test
    executor: heroku/default
    steps:
      - checkout
      - heroku/install
      - run:
          name: "Set Heroku App name"
          command: |
            echo "export HEROKU_APP_NAME=test-deploy" >> $BASH_ENV
      - run:
          name: "Heroku Pre-deploy Steps"
          command: |
            echo "App Name : [${HEROKU_APP_NAME}]"
            git config --global user.email "abc@gmail.com"
            git config --global user.name "abc"
           # below is the extra code changes 
            echo "web: yarn storybook-test-deploy" > Procfile
            git add .
            git commit -m "Procfile file creation commit"
      - heroku/deploy-via-git:
          force: true
EricRibeiro commented 2 years ago

It sounds like the orb already supports this functionality with the command heroku/deploy-via-git in conjunction with the parameter force: true. This being the case, I'll close this issue.