<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: @postalice</title>
    <description>The latest articles on DEV Community by @postalice (@apostalice).</description>
    <link>https://dev.to/apostalice</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F284422%2Fad447b6b-3952-473f-9562-f227577c17aa.jpg</url>
      <title>DEV Community: @postalice</title>
      <link>https://dev.to/apostalice</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/apostalice"/>
    <language>en</language>
    <item>
      <title>How to Setup Heroku Review App for Rails</title>
      <dc:creator>@postalice</dc:creator>
      <pubDate>Tue, 03 Dec 2019 20:01:53 +0000</pubDate>
      <link>https://dev.to/apostalice/how-to-setup-heroku-review-apps-for-rails-1i74</link>
      <guid>https://dev.to/apostalice/how-to-setup-heroku-review-apps-for-rails-1i74</guid>
      <description>&lt;p&gt;&lt;strong&gt;Problem:&lt;/strong&gt; You have a Rails app deploying successfully to Heroku, but as you make changes you don't want to deploy directly to your production app. You want to see your hard-earned edits running remotely first!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Solution:&lt;/strong&gt; Review Apps&lt;/p&gt;

&lt;h3&gt;App and Pipeline Setup:&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Create app on Heroku per &lt;a href="https://devcenter.heroku.com/articles/git"&gt;support docs&lt;/a&gt;. Be sure to get your &lt;a href="https://devcenter.heroku.com/articles/getting-started-with-ruby#use-a-database"&gt;database&lt;/a&gt; up and running too.&lt;/li&gt;
&lt;li&gt;From Heroku dashboard, click &lt;code&gt;New -&amp;gt; Create new pipeline&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;On the Production app (far right), add your app.
&lt;/li&gt;
&lt;li&gt;Enable automatic deploys on the production app with &lt;code&gt;Configure Automatic Deploys&lt;/code&gt; from the dropdown of your production app. You will be required to connect your GitHub account to Heroku so that Heroku knows which repo to deploy from.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;Make a review app&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Inside your pipeline, you'll see 3 columns: Review Apps, Staging, and Production. You've already added your production app from the steps above.&lt;/li&gt;
&lt;li&gt;Match your pipeline Config Vars with your Production App's.

&lt;ul&gt;
&lt;li&gt;Your config vars are stored under the settings for both the production app and the pipeline. The easiest way to get the Review app up and running is to make sure these match.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Make a change to your local repo and &lt;code&gt;git add&lt;/code&gt;, &lt;code&gt;git commit&lt;/code&gt; and &lt;code&gt;git push&lt;/code&gt; to a remote branch.&lt;/li&gt;
&lt;li&gt;Back in your pipeline, under Review Apps, select &lt;code&gt;+ New App&lt;/code&gt; and the branch you just pushed up. Click &lt;code&gt;Create&lt;/code&gt; and watch your app build.&lt;/li&gt;
&lt;li&gt;Select the &lt;code&gt;Open App&lt;/code&gt; button on your review app build to see what it looks like on Heroku.&lt;/li&gt;
&lt;li&gt;Now you can merge your pull request on GitHub into your master branch which will trigger the automatic deploys to your production app.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Notes:&lt;br&gt;
The main difference to the Heroku Pipeline per their documentation on the &lt;a href="https://devcenter.heroku.com/articles/github-integration-review-apps"&gt;New Review Apps - as of November 2019&lt;/a&gt; is the ability to create review apps without having to make pull requests - you can make a review app straight from a branch.&lt;/p&gt;

&lt;p&gt;Before the November 2019 changes, Heroku had a way of spinning up a custom &lt;code&gt;app.json&lt;/code&gt; file to help with automatic deployments from pull requests. They don't automatically make one for you anymore, but they have provided &lt;a href="https://devcenter.heroku.com/articles/app-json-schema"&gt;app.json Schema Docs&lt;/a&gt; for you to create your own.&lt;/p&gt;

&lt;p&gt;Heroku Docs:  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://devcenter.heroku.com/articles/getting-started-with-ruby"&gt;https://devcenter.heroku.com/articles/getting-started-with-ruby&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://devcenter.heroku.com/articles/pipelines"&gt;https://devcenter.heroku.com/articles/pipelines&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://devcenter.heroku.com/articles/github-integration-review-apps"&gt;https://devcenter.heroku.com/articles/github-integration-review-apps&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>heroku</category>
      <category>rails</category>
      <category>pipeline</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
