-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cbd36d5
commit 809138d
Showing
7 changed files
with
600 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,5 +12,158 @@ | |
<atom:link href="https://adriankoshka.github.io/blog/index.xml" rel="self" type="application/rss+xml" /> | ||
|
||
|
||
<item> | ||
<title>Using Travis to push container images to Quay.io</title> | ||
<link>https://adriankoshka.github.io/blog/post/travis-and-quay/</link> | ||
<pubDate>Thu, 24 Jan 2019 20:02:00 +0000</pubDate> | ||
<author>Adrian Lucrèce Céleste</author> | ||
<guid>https://adriankoshka.github.io/blog/post/travis-and-quay/</guid> | ||
<description></description> | ||
|
||
<content> | ||
|
||
<h2 id="preface">Preface</h2> | ||
|
||
<p>This blog post assumes:</p> | ||
|
||
<ul> | ||
<li>The user is familiar with: | ||
|
||
<ul> | ||
<li><a href="https://travis-ci.org">Travis-ci</a></li> | ||
<li><a href="https://www.docker.com/">Docker</a> (or <a href="https://podman.io">podman</a>/<a href="https://buildah.io">buildah</a>)</li> | ||
<li><a href="https://git-scm.com/">Git</a></li> | ||
<li><a href="https://github.com">Github</a></li> | ||
</ul></li> | ||
<li>The user has an account with: | ||
|
||
<ul> | ||
<li><a href="https://travis-ci.org">Travis-ci</a></li> | ||
<li><a href="https://github.com">Github</a></li> | ||
<li><a href="https://quay.io">Quay</a></li> | ||
</ul></li> | ||
</ul> | ||
|
||
<p>For those unfamiliar with the above, here are some <a href="#resources">resources</a></p> | ||
|
||
<h1 id="introduction">Introduction</h1> | ||
|
||
<p>I prefer using <a href="https://quay.io">Quay.io</a> as my container registry instead of | ||
<a href="https://hub.docker.com">Dockerhub</a>, and as such, I had to learn how setup | ||
<a href="https://travis-ci.org">Travis</a> to push to <a href="https://quay.io">quay.io</a>. This is | ||
something I hadn&rsquo;t done before, as I&rsquo;ve only recently started making my own | ||
container images.</p> | ||
|
||
<h3 id="step-one-fork-the-tutorial-repo">Step One: fork the tutorial repo</h3> | ||
|
||
<p>I&rsquo;ve setup a repo on github that I&rsquo;ll be using as a guide for this tutorial, it | ||
can be found <a href="https://github.com/AdrianKoshka/travis-quay-tutorial">here</a>. All | ||
you need to do is press the <code>Fork</code> button:</p> | ||
|
||
<p><img src="https://adriankoshka.github.io/blog/blog/imgs/fork-button.png" alt="fork button" /></p> | ||
|
||
<p>This will make a copy of my repo for you to use with your account. The next step | ||
is to clone this repo:</p> | ||
|
||
<p><code>git clone [email protected]:AdrianKoshka/travis-quay-tutorial.git</code></p> | ||
|
||
<p>You can find the URL to clone from when you press the <code>Clone or download</code> button.</p> | ||
|
||
<p><img src="https://adriankoshka.github.io/blog/blog/imgs/clone-button-quay-travis-tut.png" alt="clone or download button" /></p> | ||
|
||
<h3 id="step-two-initial-repo-setup">Step Two: Initial repo setup</h3> | ||
|
||
<p>You&rsquo;ll need to edit the <code>.travis.yml</code> and <code>docker_push</code> files in your repo, | ||
replacing <code>[yourusername]</code> with the username of your quay account.</p> | ||
|
||
<script src="https://gist.github.com/AdrianKoshka/52691ea092f24997488b0bcdefd6d0b5.js"></script> | ||
|
||
<script src="https://gist.github.com/AdrianKoshka/ee32d9157fd941f98c4eb60afac919ff.js"></script> | ||
|
||
<h3 id="step-three-creating-the-quay-repository">Step Three: Creating the quay repository</h3> | ||
|
||
<p>When signed into quay, in the upper right-hand corner, you&rsquo;ll see a | ||
<code>+ Create New Repository</code> button. Click the button,</p> | ||
|
||
<p><img src="https://adriankoshka.github.io/blog/blog/imgs/quay-plus-button.png" alt="quay plus button" /></p> | ||
|
||
<p>You&rsquo;ll want to select <code>Public</code> instead of <code>Private</code>, and enter the repository name. | ||
Then click <code>Create Public Repository</code>. You&rsquo;ve now created the empty repository | ||
we&rsquo;ll be pushing our container image to later.</p> | ||
|
||
<p><img src="https://adriankoshka.github.io/blog/blog/imgs/quay-new-repo.png" alt="quay new repo" /></p> | ||
|
||
<h3 id="step-four-creating-the-robot-account">Step Four: Creating the &ldquo;Robot Account&rdquo;</h3> | ||
|
||
<p>Robot accounts are &ldquo;accounts&rdquo; in quay.io under your user used for automated tasks.</p> | ||
|
||
<p>Again, in the upper right-hand corner, you&rsquo;ll see the <code>+</code> button, click it, then | ||
click <code>New Robot Account</code>.</p> | ||
|
||
<p><img src="https://adriankoshka.github.io/blog/blog/imgs/new-robot-account.png" alt="New Robot Account" /></p> | ||
|
||
<p>You&rsquo;ll need to enter a name and description for the bot:</p> | ||
|
||
<p><img src="https://adriankoshka.github.io/blog/blog/imgs/create-robot-step-one.png" alt="Create Robot Account Step 1" /></p> | ||
|
||
<p>Press <code>Create Robot Account</code>, now you&rsquo;ll have to give the robot write | ||
permissions to the repo you just created:</p> | ||
|
||
<p><img src="https://adriankoshka.github.io/blog/blog/imgs/robot-give-privs.png" alt="Give Robot privileges" /></p> | ||
|
||
<p>Then press <code>Add Permissions</code>. You&rsquo;ll be taken to your robot account settings | ||
page now.</p> | ||
|
||
<p><img src="https://adriankoshka.github.io/blog/blog/imgs/robot-account-settings.png" alt="Robot Settings Page" /></p> | ||
|
||
<p>Click the username of your newly created bot, it should bring up a window | ||
with your bots username and password.</p> | ||
|
||
<p><img src="https://adriankoshka.github.io/blog/blog/imgs/bot-creds.png" alt="Bot username and password" /></p> | ||
|
||
<p>We&rsquo;ll need these creds later.</p> | ||
|
||
<h3 id="step-five-adding-variables-to-your-repo-on-travis">Step Five: Adding variables to your repo on travis</h3> | ||
|
||
<p>On Travis, go to your settings and click the <code>sync account</code> button. In the list | ||
of repositories should be your <code>travis-quay-tutorial</code> repo you forked earlier, | ||
activate it, and click on the <code>settings</code> button.</p> | ||
|
||
<p><img src="https://adriankoshka.github.io/blog/blog/imgs/travis-settings.png" alt="Travis Settings" /></p> | ||
|
||
<p>Scroll down to the section named <code>Environment Variables</code>, and add a variable | ||
name <code>QUAY_BOT_USERNAME</code>, put the username of your robot account that you saw | ||
in the previous section, you should be able to copy-paste it.</p> | ||
|
||
<p><img src="https://adriankoshka.github.io/blog/blog/imgs/travis-env-var-username.png" alt="Add QUAY_BOT_USERNAME" /></p> | ||
|
||
<p>Press the <code>Add</code> button. Add another variable called <code>QUAY_BOT_PASSWORD</code> and | ||
enter your bots password.</p> | ||
|
||
<p>Your <code>Environment Variables</code> section should look like this now:</p> | ||
|
||
<p><img src="https://adriankoshka.github.io/blog/blog/imgs/travis-env-var-after.png" alt="Travis Environmental Variables After" /></p> | ||
|
||
<h3 id="step-six-committing-the-changes-from-step-two">Step Six: Committing the changes from step two</h3> | ||
|
||
<p>Now that you&rsquo;ve set everything else up, you can commit your changes to | ||
<code>.travis.yml</code> and <code>docker_push</code>, then push your changes to your fork. This | ||
should trigger a build with travis, which will build the container, and then | ||
push it to the quay repository.</p> | ||
|
||
<h2 id="resources">Resources</h2> | ||
|
||
<ul> | ||
<li><a href="https://docs.travis-ci.com/user/for-beginners">Travis Core Concepts for Beginners</a></li> | ||
<li><a href="https://www.docker.com/resources/what-container">Docker: What is a Container</a></li> | ||
<li><a href="https://www.docker.com/get-started">Docker: Get Started with Docker</a></li> | ||
<li><a href="https://github.com/containers/libpod/blob/master/docs/tutorials/podman_tutorial.md">Podman: Basic Setup and Use of Podman</a></li> | ||
<li><a href="https://github.com/containers/buildah/tree/master/docs/tutorials">Buildah: Tutorials</a></li> | ||
<li><a href="https://guides.github.com/">Github Guides</a></li> | ||
</ul> | ||
</content> | ||
|
||
</item> | ||
|
||
</channel> | ||
</rss> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,135 @@ | ||
<!DOCTYPE html> | ||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-us"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"/> | ||
|
||
<title>Posts | Adrian's Blog</title> | ||
|
||
|
||
|
||
<link href="https://adriankoshka.github.io/blog/index.xml" rel="alternate" type="application/rss+xml" title="Adrian's Blog" /> | ||
|
||
<link rel="stylesheet" href="/blog/css/style.css"/><link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png"> | ||
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png"> | ||
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png"> | ||
<link rel="manifest" href="/site.webmanifest"> | ||
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5"> | ||
<meta name="msapplication-TileColor" content="#da532c"> | ||
<meta name="theme-color" content="#ffffff"> | ||
</head> | ||
<body> | ||
<section class="section"> | ||
<div class="container"> | ||
<nav class="nav"> | ||
<div class="nav-left"> | ||
<a class="nav-item" href="https://adriankoshka.github.io/blog/"> | ||
<h1 class="title is-4">Adrian's Blog</h1> | ||
</a> | ||
</div> | ||
<div class="nav-right"> | ||
<nav class="nav-item level is-mobile"><a class="level-item" aria-label="github" href='https://github.com/adriankoshka' | ||
target='_blank' rel='noopener'> | ||
<span class="icon"> | ||
<i class><svg viewbox='0 0 24 24' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' aria-hidden='true'> | ||
|
||
<path d="M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22"/> | ||
|
||
</svg></i> | ||
</span> | ||
</a><a class="level-item" aria-label="twitter" href='https://twitter.com/lucrececeleste' | ||
target='_blank' rel='noopener'> | ||
<span class="icon"> | ||
<i class><svg viewbox='0 0 24 24' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' aria-hidden='true'> | ||
|
||
<path d="M23 3a10.9 10.9 0 0 1-3.14 1.53 4.48 4.48 0 0 0-7.86 3v1A10.66 10.66 0 0 1 3 4s-4 9 5 13a11.64 11.64 0 0 1-7 2c9 5 20 0 20-11.5a4.5 4.5 0 0 0-.08-.83A7.72 7.72 0 0 0 23 3z"/> | ||
|
||
</svg></i> | ||
</span> | ||
</a><a class="level-item" aria-label="email" href='mailto:[email protected]' | ||
target='_blank' rel='noopener'> | ||
<span class="icon"> | ||
<i class><svg viewbox='0 0 24 24' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' aria-hidden='true'> | ||
|
||
<path d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"/> | ||
<polyline points="22,6 12,13 2,6"/> | ||
|
||
</svg></i> | ||
</span> | ||
</a><a class="level-item" aria-label="rss" href='/blog/index.xml' | ||
target='_blank' rel='noopener'> | ||
<span class="icon"> | ||
<i class><svg viewbox='0 0 24 24' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' aria-hidden='true'> | ||
|
||
<path d="M4 11a9 9 0 0 1 9 9"></path><path d="M4 4a16 16 0 0 1 16 16"></path><circle cx="5" cy="19" r="1"></circle> | ||
|
||
</svg></i> | ||
</span> | ||
</a></nav> | ||
</div> | ||
</nav> | ||
|
||
<nav class="nav"> | ||
|
||
|
||
|
||
</nav> | ||
|
||
</div> | ||
</section> | ||
<section class="section"> | ||
<div class="container"> | ||
|
||
|
||
<article> | ||
<div class="subtitle tags is-6 is-pulled-right"> | ||
|
||
</div> | ||
<h2 class="subtitle is-6">January 24, 2019</h2> | ||
<h1 class="title"><a href="https://adriankoshka.github.io/blog/post/travis-and-quay/">Using Travis to push container images to Quay.io</a></h1> | ||
<div class="content"> | ||
Preface This blog post assumes: | ||
The user is familiar with: Travis-ci Docker (or podman/buildah) Git Github The user has an account with: Travis-ci Github Quay For those unfamiliar with the above, here are some resources | ||
Introduction I prefer using Quay.io as my container registry instead of Dockerhub, and as such, I had to learn how setup Travis to push to quay.io. This is something I hadn’t done before, as I’ve only recently started making my own container images. | ||
|
||
<a class="button is-link" href="https://adriankoshka.github.io/blog/post/travis-and-quay/" style="height:28px"> | ||
Read more | ||
</a> | ||
|
||
</div> | ||
</article> | ||
|
||
</div> | ||
</section> | ||
<section class="section"> | ||
<div class="container"> | ||
<nav class="level is-mobile"> | ||
<div class="level-left"> | ||
<div class="level-item"> | ||
|
||
</div> | ||
</div> | ||
<div class="level-right is-marginless"> | ||
<div class="level-item"> | ||
|
||
</div> | ||
</div> | ||
</nav> | ||
</div> | ||
</section> | ||
|
||
<section class="section"> | ||
<div class="container has-text-centered"> | ||
<p>Adrian Lucrèce Céleste 2019</p> | ||
|
||
<p>Powered by <a href="https://gohugo.io/">Hugo</a> & <a href="https://github.com/ribice/kiss">Kiss</a>.</p> | ||
|
||
</div> | ||
</section> | ||
|
||
|
||
|
||
</body> | ||
</html> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?> | ||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> | ||
<channel> | ||
<title>Posts on Adrian's Blog</title> | ||
<link>https://adriankoshka.github.io/blog/post/</link> | ||
<description>Recent content in Posts on Adrian's Blog</description> | ||
<generator>Hugo -- gohugo.io</generator> | ||
<language>en-us</language> | ||
<copyright>Adrian Lucrèce Céleste 2019</copyright> | ||
<lastBuildDate>Thu, 24 Jan 2019 20:02:00 +0000</lastBuildDate> | ||
|
||
<atom:link href="https://adriankoshka.github.io/blog/post/index.xml" rel="self" type="application/rss+xml" /> | ||
|
||
|
||
<item> | ||
<title>Using Travis to push container images to Quay.io</title> | ||
<link>https://adriankoshka.github.io/blog/post/travis-and-quay/</link> | ||
<pubDate>Thu, 24 Jan 2019 20:02:00 +0000</pubDate> | ||
|
||
<guid>https://adriankoshka.github.io/blog/post/travis-and-quay/</guid> | ||
<description>Preface This blog post assumes: | ||
The user is familiar with: Travis-ci Docker (or podman/buildah) Git Github The user has an account with: Travis-ci Github Quay For those unfamiliar with the above, here are some resources | ||
Introduction I prefer using Quay.io as my container registry instead of Dockerhub, and as such, I had to learn how setup Travis to push to quay.io. This is something I hadn&rsquo;t done before, as I&rsquo;ve only recently started making my own container images.</description> | ||
</item> | ||
|
||
</channel> | ||
</rss> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<!DOCTYPE html><html><head><title>https://adriankoshka.github.io/blog/post/</title><link rel="canonical" href="https://adriankoshka.github.io/blog/post/"/><meta name="robots" content="noindex"><meta charset="utf-8" /><meta http-equiv="refresh" content="0; url=https://adriankoshka.github.io/blog/post/" /></head></html> |
Oops, something went wrong.