heroku / heroku-gradle-plugin

A Gradle plugin for deploying JAR and WAR files to Heroku.
MIT License
0 stars 1 forks source link

Heroku pipelines integration #7

Closed nedtwigg closed 7 years ago

nedtwigg commented 7 years ago

I love the Heroku pipelines feature. Here's why:

My app builds fine on CI, but I can't get it to build on Heroku. The deployHeroku task works great, and makes a nice tiny slug.

Is there a way I can make this plugin integrate with my Heroku pipeline? Review apps and all? Thanks.

jkutner commented 7 years ago

@nedtwigg yes and no. The app you deploy to with deployHeroku can be an app in your pipeline, and you can promote it through the pipeline like any other app. But Review apps will only work with code pulled from Github.

To mimic review apps, you could deploy to a temporary app from CI. That's the only workaround I can think of.

I'd be happy to try and help get the Gradle build working on Heroku with git push too. Please open a ticket and we can take a look.

nedtwigg commented 7 years ago

Roger. So yes for staging apps, no for review apps.

Thanks @jkutner! I've got an open ticket here: https://help.heroku.com/sharing/66569475-ed98-40f2-a17e-662286b3af44

nedtwigg commented 7 years ago

Thanks a lot for the great support inside that ticket, @jkutner. For anybody else wishing to deploy small fatjars using the standard heroku build (not the gradle plugin), here was the trick:

task stage {
  dependsOn 'TASK_THAT_MAKES_FATJAR'
  doLast {
    delete fileTree(dir: '.', exclude: [
      'Procfile', 'app.json',
      'system.properties', '.profile.d/**', '.jdk/**', '.heroku/**',
      'YOURFATJAR')
  }
}
nedtwigg commented 4 years ago

Is it still true that it is not possible to create review apps programmatically? I noticed that there was a new review app rollout, didn't know if perhaps the new system allows review apps built outside of Heroku. I get a lot of joy out of these two features:

I get no joy out of supporting two different build environments, and I definitely prefer a dedicated CI tool.

Malax commented 4 years ago

Hey @nedtwigg! With the new review apps, it's now possible to couple any existing app to the "review" stage: https://devcenter.heroku.com/articles/platform-api-reference#pipeline-coupling-create

However, the app will not show up in a GitHub pull-request. If I understood you correctly, this is something you want to achieve. You might be able to do this by using the GitHub API to comment on the associated pull request.

Let me know if you have further questions. :)

Malax commented 4 years ago

Alternatively, you can use this API to create a review app where you provide us with the correct branch name and commit hash in the "source_blob:version"

When you prepare your source blob tar.gz, you can put in your fat JAR that you built on CircleCI together with a Procfile. This should get you your desired result of having only one build setup on CircleCI and review apps on Heroku that are linked in GitHub PRs.

nedtwigg commented 4 years ago

Thanks very much for the links!