Why is Heroku rebuilding my project when i deploy from Travis?

So i have a Java/maven/react project in a fat JAR. So travis checks out the code from github when there is a push to master.

I compile my project, then i run the project and do a health check on my build artifact (jar). Then i want to push my built jar to heroku, but when travis releases to Heroku, heroku suddenly rebuilds my project once more.

Im trying to use the build number env_variables from travis, but when travis deploys to heroku, heroku apparently rebuilds my entire project once again i loose all the env variables since they don’t exists at heroku.

I want to build by project ONCE, health check the build artifact, and then push only the artifact to heroku.

https://travis-ci.org/Tandolf/nordic/jobs/609474480

As described in


We use Heroku API or the git push strategy to deploy your application to Heroku. I don’t think “push the artifact to Heroku” fits either strategy.

You’ll have to find something else, perhaps the script provider (and write your custom script).

okey, thanks for the information, ill have to look in to maybe using heroku maven plugin for deployment instead