<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Jade Beresford on Medium]]></title>
        <description><![CDATA[Stories by Jade Beresford on Medium]]></description>
        <link>https://medium.com/@jadeberesford?source=rss-c51247b677b4------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*4JQHt9Eg-trLgDWZ</url>
            <title>Stories by Jade Beresford on Medium</title>
            <link>https://medium.com/@jadeberesford?source=rss-c51247b677b4------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 21:20:31 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@jadeberesford/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Travis CI — a love/hate relationship]]></title>
            <link>https://medium.com/true-grit/travis-ci-a-love-hate-relationship-38f19d92a52f?source=rss-c51247b677b4------2</link>
            <guid isPermaLink="false">https://medium.com/p/38f19d92a52f</guid>
            <category><![CDATA[rails]]></category>
            <category><![CDATA[girls-in-tech]]></category>
            <category><![CDATA[heroku]]></category>
            <category><![CDATA[beginner-coding]]></category>
            <category><![CDATA[travis-ci]]></category>
            <dc:creator><![CDATA[Jade Beresford]]></dc:creator>
            <pubDate>Tue, 14 Jan 2020 14:21:31 GMT</pubDate>
            <atom:updated>2020-01-14T14:28:03.312Z</atom:updated>
            <content:encoded><![CDATA[<h3>Travis CI — a love/hate relationship</h3><p>If Travis were a person, he would not be our friend.</p><figure><img alt="Travis CI logo" src="https://cdn-images-1.medium.com/max/642/1*ReJCeRt3UrdFp65T8mWs1A.png" /><figcaption>Travis looking all smug with his hard hat on.</figcaption></figure><p>It is still Day 1 of our project build and we are wrestling with Travis CI. This is a very handy tool for automatically testing code changes and providing a safeguarding layer before deployment, in our case on Heroku (read more in the docs <a href="https://docs.travis-ci.com/user/for-beginners/">here</a>), but the set up can be very unforgiving.</p><p>So as not to repeat the excellent tips of those who have gone before us, here are the links that got us started:</p><ul><li><a href="https://medium.com/full-taxx/how-to-setup-travis-ci-for-a-rails-application-78a453963300">How to set up Travis CI for a rails application</a></li><li><a href="https://medium.com/@felipeluizsoares/automatically-deploy-with-travis-ci-and-heroku-ddba1361647f">Automatically deploy with Travis CI and Heroku</a></li></ul><p>Our functional .travis.yml ended up looking like this… and yes, it does look deceptively short, but don’t be fooled!</p><pre>language: ruby<br>rvm:<br>- 2.5<br>services:<br>- postgresql<br>before_script:<br>- bundle exec rails db:create<br>- bundle exec rails db:migrate</pre><pre>deploy:<br>  provider: heroku<br>  app: heroku-app-name<br>  on:<br>    repo: repo-owner/repo-name<br>  run:<br>  - bundle exec rails db:migrate<br>  api_key:<br>    secure: encrypted-heroku-api-key</pre><p>The first code section: With a little bit of research, we got the tests up and running automatically via Travis on our Github pull requests. We’re feeling optimistic! Top tip: make sure you have the correct indentations.</p><p>The second code section aka <em>deploy</em>: This would theoretically make deployment to Heroku automatic from our master branch, once and only once the tests passed in Travis. As mentioned before, a very handy protection indeed, but drama quickly ensued.</p><ul><li>Under <em>app</em> we add the name of the app. Under <em>repo</em> we add the full name of our repo. Under <em>api_key</em> we follow the instructions in the links above to obtain the Heroku API key and then encrypt it.</li><li>Commit and merge it to master branch, check Travis in Github. We get this error message: <strong><em>Invalid credentials provided.</em></strong></li><li>Ok, maybe we have the app name wrong. The app name in our Github and Heroku are different because Heroku automatically generated a random name for us (our fault — we didn’t specify a name on setup). So we change that to the Heroku app name.</li><li>Error message: <strong><em>Invalid credentials provided.</em></strong></li><li>Hmm, let’s double check there’s no typos in our <em>app</em> or <em>repo</em> sections. Nope, not that we can see.</li><li>Hold on, which <em>api_key</em> are we meant to be using? Does it have to be the owner of the project’s? Oh dang, we were using another teammate’s by running heroku auth:token in their terminal, and then encrypting it. So we try the key from the project owner’s terminal.</li><li>Error message: <strong><em>Invalid credentials provided.</em></strong></li></ul><p>Believe it or not, this is the shortened version of events. We tried about 3 different API keys with little success.</p><ul><li>We turn once more to Google and hit gold: <a href="https://github.com/travis-ci/travis-ci/issues/10018">Issues with Deploying to Heroku via Travis-CI</a></li><li>Eureka moment! It turns out there are two Travis CI websites, travis-ci.com &amp; travis-ci.org. Our project is running in travis-ci.com, but the encryption of the API key was not drawing from here.</li><li>We specify the correct location for encryption in our terminal command, using the project owner’s API key: travis encrypt pasteAPIKeyHere --add deploy.api_key --pro (--pro specifies <em>.com</em> and --org specifies <em>.org</em>).</li><li>We wait with bated breath… message: <strong><em>Deploying application. Done. Your build exited with 0. </em></strong>High fives all round!</li><li>PS: Unfortunately deployment will not run from pull requests, it will only run from master. So if you are troubleshooting the <em>deploy </em>section, you have to experiment directly in master, rather than in separate branches, resulting in numerous messy commits in the master branch.</li></ul><p>In short, Travis, we are super grateful for the service you provide. We know we need you… but we also now know why you wear that hard hat (violence implied).</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=38f19d92a52f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/true-grit/travis-ci-a-love-hate-relationship-38f19d92a52f">Travis CI — a love/hate relationship</a> was originally published in <a href="https://medium.com/true-grit">True GrIT</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>