I’m deploying a Node.js app using Bitbucket Pipelines to Heroku. Here’s the situation:
The old Heroku app (with a different name) was deleted in September 2024
That old app used a custom domain: http://dev.lightningrentals.com.au
Recently, I created a new Heroku app with the name crm-lr
in my code ,y pipleline
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
ZIP_FILE: backend/application.tar.gz
WAIT: "true"
caches:
- node
In Bitbucket → Repository Variables, I’ve added:
HEROKU_API_KEY = [valid key from Heroku account]
HEROKU_APP_NAME = crm-lr
When I push to the dev branch:
The pipeline succeeds
The deployment goes through, but the app is still accessible via the old custom domain (http://dev.lightningrentals.com.au), which was previously mapped to the old (deleted) Heroku account on same email
The newly created app shows up in the Heroku dashboard with name crm-lr, and its Heroku URL is:
https://crm-lr-c6e51a6eb746.herokuapp.com/
though i have updated the repo variables and i am expecting it to deploy on my new app but somehow it is getting uploaded on old app
is there something that i am missing?