herokubitbucketdyno

How to add dynos on newly created heroku app


I am trying to deploy build on heroku, its a nodejs app, i have pipeline that gets trigger on push

here is the pipeline

image: node:18

pipelines:
branches:
dev:
- step:
name: Build Application - (Dev)
script:
- cd backend
- npm install
- npm run build

  - step:
        name: Create Artifact (Dev)
        script:
          - cd backend
          - git archive --format=tar.gz dev -o application.tar.gz
        artifacts:
          - backend/application.tar.gz

  - step:
      name: Deploy to Heroku (Dev)
      deployment: Staging
      script:
        - pipe: atlassian/heroku-deploy:2.3.0
          variables:
            HEROKU_API_KEY: $HEROKU_API_KEY
            HEROKU_APP_NAME: $HEROKU_APP_NAME_TEST
            # JWT_SECRET_KEY: $JWT_SECRET_KEY
            ZIP_FILE: backend/application.tar.gz
            WAIT: "true"
      caches:
        - node

on last step Deploy to Heroku (Dev) it is showing error

Status: Downloaded newer image for bitbucketpipelines/heroku-deploy:2.3.0
WARNING: New version available: atlassian/heroku-deploy '2.3.0' to '2.4.0'
INFO: Creating Heroku sources...
INFO: Uploading binary sources from backend/application.tar.gz
INFO: Starting a new build in Heroku...
✖ Failed to upload binary sources. Expected HTTP Status 201, got 404. Error message: {"id":"not_found","message":"The requested API endpoint was not found. Are you using the right HTTP verb (i.e. GET vs. POST), and did you specify your intended version with the Accept header?"

enter image description here

i guess this is due there is no dyno in my this app, i am trying to add basic dyno type to this but there is no option to add dyno

enter image description here

Heroku api key for bitbucket deployment variables crated from

https://dashboard.heroku.com/account/applications -> Authorizations

that i filled on the bitbucket deployment variables


Solution

  • There is minor issue, i was not adding all the variables in bitbucket's deployment pipelines. I added the variables and deployed the build.

    After sucessfull deployment, now there is option to change the dynos as well