0

I want to use a circle ci yaml pipeline to deploy to a Heroku App.

The yaml file I have right now is:

version: 2.1

orbs:
  heroku: circleci/heroku@0.0.10

jobs:
  heroku_deploy_review_app:
    executor: heroku/default
    steps:
      - checkout
      - heroku/install
      - heroku/deploy-via-git:
          app-name: $HEROKU_APP_NAME

workflows:
  heroku_deploy:
    jobs:
      - heroku_deploy_review_app:
          filters:
            branches:
              only:
                - test-123/test-heroku-orb

There are no issues from syntax side for this YAML. However, when I run this pipeline, I see enter image description here

I am not sure what I am doing wrong because this code looks all fine to me. I also confirmed with doc https://circleci.com/docs/deploy-to-heroku/ and https://circleci.com/developer/orbs/orb/circleci/heroku

devgirl
  • 671
  • 3
  • 16
  • 39

2 Answers2

1

This means that your filter is not matched.

For your defined workflow to actually run, you'd need to push commits to test-123/test-heroku-orb branch.

yaningo
  • 353
  • 2
  • 7
1

First thing first, You can only see this workflow if you are pushing your code to test-123/test-heroku-orb branch, please check if you are mistakenly pushing to the main branch.

Secondly, you need to make a small adjustment to .circleci/config.yml

version: 2

orbs:
  heroku: circleci/heroku@0.0.10

jobs:
  heroku_deploy_review_app:
    executor: heroku/default
    steps:
      - checkout
      - heroku/install
      - heroku/deploy-via-git:
          app-name: $HEROKU_APP_NAME

workflows:
  version: 2
  heroku_deploy:
    jobs:
      - heroku_deploy_review_app:
          filters:
            branches:
              only:
                - test-123/test-heroku-orb
svikramjeet
  • 1,779
  • 13
  • 27
  • Actually, the first `version: 2` would cause this config not to work. Using orbs requires `version: 2.1`. And once you have `version: 2.1` at the top of your `.circleci/config.yml`, the `version: 2` under `workflows` is not mandatory. – yaningo Nov 26 '22 at 16:27