<?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 Patricio Cano on Medium]]></title>
        <description><![CDATA[Stories by Patricio Cano on Medium]]></description>
        <link>https://medium.com/@suprnova32?source=rss-2202c01edf71------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*XHbbu5NbRhKZYjzf.jpg</url>
            <title>Stories by Patricio Cano on Medium</title>
            <link>https://medium.com/@suprnova32?source=rss-2202c01edf71------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 07:13:05 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@suprnova32/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[AlloyCI v0.5 released!]]></title>
            <link>https://medium.com/hackernoon/alloyci-v0-5-released-4d42520ad626?source=rss-2202c01edf71------2</link>
            <guid isPermaLink="false">https://medium.com/p/4d42520ad626</guid>
            <category><![CDATA[continuous-integration]]></category>
            <category><![CDATA[elixir]]></category>
            <category><![CDATA[phoenix]]></category>
            <category><![CDATA[phoenix-framework]]></category>
            <dc:creator><![CDATA[Patricio Cano]]></dc:creator>
            <pubDate>Fri, 30 Mar 2018 22:51:24 GMT</pubDate>
            <atom:updated>2019-05-22T08:36:31.649Z</atom:updated>
            <content:encoded><![CDATA[<h4>Major changes ahead</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bt7Q3HsTcw86TB_q7mlz2A.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/photos/zepnJQycr4U?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Kristopher Roller</a> on <a href="https://unsplash.com/search/photos/sky?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>This week marks the first year anniversary since the <a href="https://github.com/AlloyCI/alloy_ci/tree/b828881ea982f1a8598aa8f7282e96fa72c55498">first commit</a> of <a href="https://hackernoon.com/tagged/alloyci">AlloyCI</a>, and to celebrate it, we are releasing the v0.5 <a href="https://hackernoon.com/tagged/version">version</a>. With it we get closer to the much coveted v1.0 release, when AlloyCI will be fully ready (and fully supported) for production environments.</p><p>This version of AlloyCI comes with a wide variety of changes. The most noticeable being the new and improved design, and support for <strong>GitHub Enterprise.</strong></p><h4>Design Changes</h4><p>For the past year we have been using CoreUI as the basis of the design. At the beginning, it seemed like a good “admin” template that offered a lot of functionality. Unfortunately it started to feel dated, and bloated pretty quickly. The way it was used with AlloyCI was not ideal and it was not nice to look at.</p><p>We decided it was time for a change. The new design feels clean, modern, and is easy to look at.</p><p>Some elements remained, like the use of cards to represent the projects, and the use of panels to separate related information:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4u-xEARFvrf1VO-1TxZZeA.png" /><figcaption>New projects view</figcaption></figure><p>The use of colors to represent statuses also stayed, but with a new pantone:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xBvkdVgChmfrMXbXPI5Ncg.png" /><figcaption>New pipelines view (single project)</figcaption></figure><p>The builds view was completely reworked to better illustrate the different stages of a pipeline, and to give a quick overview of the status of each build within that pipeline:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0kgvZcdJPxPNCd_VkYVPMw.png" /><figcaption>New builds view (single pipeline)</figcaption></figure><p>The single build view also suffered major changes. Now each build has its own page, with dedicated, always visible information about the build on an aside to the left, and the entire build output (which will automatically update if the build is running) to the the right.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BSgWvitIiLzFkmlBgnoTiw.png" /><figcaption>New build view</figcaption></figure><p>The project settings view did not change that much, but it still looks cleaner and now groups related information more tightly:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8Q5jE1HpzPISdPgxMXiM_w.png" /><figcaption>Project settings view</figcaption></figure><h3>New features</h3><h4>GitHub Enterprise</h4><p>This new version of AlloyCI also comes with a host of new features. The biggest one for this release is support for <strong>GitHub Enterprise. </strong>GitHub released version 2.13 a few days ago with support for GitHub Apps. This meant that AlloyCI would finally be compatible with GHE. After a few changes to the way the system communicates with GitHub, mainly making endpoints configurable, full compatibility was achieved.</p><h4>Builds</h4><p>Builds can now be restarted individually, without having to restart the entire pipeline. The old build data will be kept, and a new job will be created for the new build.</p><h4>Build Artifacts</h4><p>The other major new features revolve around build artifacts. With this release we added:</p><ul><li>Artifacts can be managed and downloaded from the build view</li><li>Expired artifacts will be pruned once a day (or at any configurable interval)</li><li>Artifacts can be kept forever, if the user chooses to</li></ul><h3>Bug fixes</h3><p>A couple of bugs have also been fixed with this release:</p><ul><li>When cancelling a pipeline, all builds were marked as cancelled, now only builds that are either created, running, or pending are updated.</li><li>After the upgrade to Guardian 1.0, it became impossible to add another authentication method to an existing user. This has been fixed.</li></ul><p>This is pretty much it for this release. The roadmap ahead includes adding S3 bucket support for build artifacts, so that they can be uploaded to services like AmazonS3, or Digital Ocean Spaces. With this support implemented, it will become possible for AlloyCI installations that are hosted on Heroku to also make use of build artifacts, something that is not possible right now.</p><p>Until next time! ❤️</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fupscri.be%2Fdde502%3Fas_embed%3Dtrue&amp;dntp=1&amp;url=https%3A%2F%2Fupscri.be%2Fhackernoon%2F&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=upscri" width="800" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/3c851dac986ab6dbb2d1aaa91205a8eb/href">https://medium.com/media/3c851dac986ab6dbb2d1aaa91205a8eb/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4d42520ad626" width="1" height="1" alt=""><hr><p><a href="https://medium.com/hackernoon/alloyci-v0-5-released-4d42520ad626">AlloyCI v0.5 released!</a> was originally published in <a href="https://medium.com/hackernoon">HackerNoon.com</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AlloyCI Dev Diary — Part 4]]></title>
            <link>https://medium.com/hackernoon/alloyci-dev-diary-part-4-4656ceed60a5?source=rss-2202c01edf71------2</link>
            <guid isPermaLink="false">https://medium.com/p/4656ceed60a5</guid>
            <category><![CDATA[authentication]]></category>
            <category><![CDATA[continuous-integration]]></category>
            <category><![CDATA[elixir]]></category>
            <dc:creator><![CDATA[Patricio Cano]]></dc:creator>
            <pubDate>Fri, 09 Mar 2018 18:44:31 GMT</pubDate>
            <atom:updated>2019-05-22T08:36:32.176Z</atom:updated>
            <content:encoded><![CDATA[<h4>User authentication with Guardian &amp; Überauth</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TiltvM4ydji8sXcvbsEL_Q.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/photos/pY_AZJfdbHQ?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Matt Artz</a> on <a href="https://unsplash.com/search/photos/security?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>This blog post is part of a series of posts detailing the <a href="https://hackernoon.com/tagged/development">development</a> process of <a href="https://hackernoon.com/tagged/alloyci">AlloyCI</a>. The previous entries have been:</p><ul><li><a href="https://hackernoon.com/alloyci-dev-diary-part-1-8ae564fce9f3">Part 1: Starting a new Project</a></li><li><a href="https://hackernoon.com/alloyci-dev-diary-part-2-6a61b02faca8">Part 2: Structuring a new Phoenix Project</a></li><li><a href="https://hackernoon.com/alloyci-dev-diary-part-3-4c454d82cd69">Part 3: Project management with GitHub Issues &amp; Boards</a></li></ul><p>One of the first things you need for a non-trivial web application is user management, and authentication.</p><p>AlloyCI needs to connect to OAuth services, like GitHub, but also let users sign up with email and password. In the Rails ecosystem we have <a href="https://github.com/plataformatec/devise">Devise</a>. Devise takes care of the heavy lifting on user management, it encrypts passwords, makes it easy to recover passwords, you can validate user’s emails, before they can use their account, etc., and it also makes it super easy to integrate with <a href="https://github.com/omniauth">OmniAuth</a>, which allows you to let users sign up and login via services that implement OAuth.</p><p>My first instinct was to search for a similar library like Devise, but for the Phoenix/Elixir ecosystem. I was surprised when I couldn’t find anything as feature rich as Devise. There is a great discussion over at <a href="https://elixirforum.com/t/user-authentication-in-phoenix/118/7">ElixirForum</a> around what people use to authenticate users. This was my first source of information.</p><p>The first takeaway from that discussion is that there <strong><em>is</em></strong> a library very similar to Devise, and that is the <a href="https://github.com/smpallen99/coherence">Coherence Project</a> by Stephen Pallen, but it’s still in early development, and has no support for OAuth. This was a blocker for me, as OAuth is needed for AlloyCI to communicate with GitHub properly.</p><p>The second takeaway was that there seems to be some consensus around what a lot of developers use for authentication, but there are not many resources for beginners to get started properly. The most used approach seems to be a mix between <a href="https://github.com/ueberauth/guardian">Guardian</a> and <a href="https://github.com/ueberauth/ueberauth">Überauth</a>. Both projects are maintained by the same group of people, so integrating them is not that complicated.</p><h4>Guardian</h4><p>Guardian uses JSON Web Tokens to authenticate users and authorize their actions. It provides the entire mechanism to create, encrypt, and validate JWTs. It gives you a way to keep a “session” active for a user, but it does not provide a method to actually manage them.</p><h4>Überauth</h4><p>Überauth allows you to create users from different authentication providers. It is compatible with a lot of OAuth services, and also provides a generic provider called “Identity” that allows your application to create users based on an email/password combination. It gives you the first entry point to authenticate a user, but it has no way of keeping a session active, or authorize actions.</p><blockquote>Integrating Guardian and Überauth is key in order to get a proper authentication and session management system.</blockquote><h3>The good stuff</h3><p>Now to the good stuff. How do you integrate Guardian &amp; Überauth to an existing Phoenix application?</p><p>The code inside AlloyCI is based on the <a href="https://github.com/hassox/phoenix_guardian">example application</a>, but it was updated to be compatible with Phoenix 1.3.0 and Elixir 1.6.1.</p><h4>1. Migrations</h4><p>You should already have a user schema with the fields email and name . The password and other authorization related information will not be stored in the User schema, but under its own Authorization schema. Let’s create it:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9161a3d929e980078491dce7f4973039/href">https://medium.com/media/9161a3d929e980078491dce7f4973039/href</a></iframe><p>This data structure will store information about the user’s authentication methods. (The example app calls them “authorizations”, because Guardian provides the option to encode permissions into the JWT it creates, so technically, you can also use it to authorize user’s actions, and not just authenticate them)</p><p>With the Authentication schema created, we need to modify the User schema to tell it it now has_many :authentications</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f405c2c9ffec0f585de5b3ce71f4282c/href">https://medium.com/media/f405c2c9ffec0f585de5b3ce71f4282c/href</a></iframe><p>Under normal circumstances, JWTs cannot be revoked, so if one of your tokens is compromised, you will need to switch your generation/validation function, thus invalidating all existing tokens. Guardian provides a workaround to this. By adding the GuardianDb dependency, Guardian will save your JWTs into the database, where you can easily revoke single tokens, should the need arise. A lot of people argue that this goes against the whole JWT schema, as it turns a session-less authentication schema, into a session-full one, but for the needs AlloyCI has, this approach works perfectly.</p><p>In order to use GuardianDb you need to create a new database table to hold the token information:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b49a3f8d031a1b08b4ce6fbf8b43a456/href">https://medium.com/media/b49a3f8d031a1b08b4ce6fbf8b43a456/href</a></iframe><h4>2. Controller</h4><p>Now that we have the schemas ready, we can go ahead with the controllers. The example app already provides us with everything we need, so it’s just a matter of modifying it to fir our needs. This is what I did for AlloyCI initially. The first feature that I added was user login, since it’s the most necessary one for any online service.</p><p>Let’s start with the authentication controller, since this is the entry point for our authentication logic.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/be390de4d6970616f7d50ab0e45c7917/href">https://medium.com/media/be390de4d6970616f7d50ab0e45c7917/href</a></iframe><p>As you can see, this controller has actions to present a login page, handle the logout action, handle the callbacks from Überauth, and also generic callbacks for unauthenticated users, and unauthorized actions.</p><p>The Überauth callbacks handle the information that is sent from the OAuth provider. We use pattern matching in the function signatures to handle both successful and failed OAuth callbacks.</p><p>The way Überauth works is the following:</p><ul><li>Registers a Plug that intercepts the raw HTTP request from the OAuth provider</li><li>Performs actions on the raw information and prepare special assigns for the request</li><li>Forwards the processed information to the controller</li></ul><p>Depending on whether the OAuth callback succeeded or failed, the Überauth plug populates the corresponding assign. It is with this assign that we pattern match the request. If the callback failed, we redirect the user to the login screen and show an error message. If the action succeeded, we delegate to the Accounts module to do the actual heavy lifting.</p><p>This module takes care of reading the information sent by the OAuth provider and prepared by the Überauth Plug and returns a user object. This user could be a new user, or an existing user, and the job of determining which one is returned, falls on the Accounts module. This is handled by the get_or_create_user/2 function. You can have a look at the file, to see how everything ties together:</p><p><a href="https://github.com/AlloyCI/alloy_ci/blob/master/lib/alloy_ci/accounts/accounts.ex">AlloyCI/alloy_ci</a></p><p>At this point, it is completely up to you how to handle what the application does with the information returned from the OAuth provider. In the case of GitHub, for AlloyCI, we create a new account if one doesn’t exist and populate it with the returned data, i.e. name, email, and username.</p><p>AlloyCI also allows users to be created via a regular account creation form, in this case, we ask the user for all this information, plus a password and password confirmation. For this to work with Überauth’s authentication procedure, it provides a generic Identity OAuth provider. This provider simulates a proper OAuth request, and sends all the information from the form. The password is then hashed and salted using Comeonin.Bcrypt hash algorithm.</p><p>If an account exists, then it is validated with the data already in the database. After the user is authenticated, the full application is available to them. The authentication is added to the session as a JWT Token with:</p><pre>Guardian.Plug.sign_in(user, :access, perms: %{default:  Guardian.Permissions.max})</pre><h4>3. Routing</h4><p>In order for the authentication filters to work, they need to be setup both on the controller and on the routes. In Rails, you would add a before_filter to your controller and call it a day, but in Phoenix there are two ways to do this, a routing pipeline, or as a controller specific plug.</p><p><strong>Route Pipeline</strong></p><p>A route pipeline allows you to send the request through a set of predefined plugs. The authentication pipeline for AlloyCI is defined in the <a href="https://github.com/AlloyCI/alloy_ci/blob/master/lib/alloy_ci/web/router.ex#L12-L18">routes.ex</a> file like so:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*s8LTrKpFGaK3QTyCku24JQ.png" /></figure><p>As you can see from the comments, these plugs only check for the correct JWT, but if none is found, they don’t do anything else. This is on purpose, because we have resources that can be accessed without a token. For all other resources that need an authenticated user, an extra plug is needed. This is where the controller specific “filters” come in.</p><p><strong>Controller Specific Plugs</strong></p><p>You can define extra plugs on each controller to further filter the request. We use this on AlloyCI for controllers that need an authenticated user, and on the admin specific controllers. For the <a href="https://github.com/AlloyCI/alloy_ci/blob/818d50a00c57a913f830bde74facc26b7c232191/lib/alloy_ci/web/controllers/pipeline_controller.ex#L4-L5">pipeline_controller.ex</a> for example, we use one plug to make sure the user is logged in, and another to change the default layout, but only for the “show” action:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V7M9_ErwTy8Jo-lpj6Chew.png" /></figure><p>The <a href="https://github.com/AlloyCI/alloy_ci/blob/master/lib/alloy_ci/web/controllers/public_controller.ex">public controller</a> does not call any of the authentication plugs, since it does not need to have a user object, in order to show public information, like the landing page, or the registration page.</p><p><strong>What is a Plug anyway?</strong></p><p>A plug is a specification for composable modules between web applications. They allow you to share information between the modules, and manipulate it along the way. A Plug represents a connection with Plug.Conn and it is available throughout the request cycle. You can use a Plug to manipulate the request, extract information from it, add information to it, etc.</p><p>In the case the authentication Plugs, we get information from the connection session, validate it, and then add private claims to it. We then use this private claims in another Plug to load the current_user resource (this is all handled by the Guardian library). This is actually what the :browser_auth pipeline we showed you above does.</p><p>A more basic use of a Plug can be found <a href="https://github.com/AlloyCI/alloy_ci/blob/master/lib/alloy_ci/web/plugs/github_header.ex">here</a>, where we get information from the connection header, and save it to the assigns inside the connection, in order to be able to pattern match against it:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NdVIud4N5_CbzhzFCQZmdA.png" /></figure><p>This plug is declared inside a <a href="https://github.com/AlloyCI/alloy_ci/blob/master/lib/alloy_ci/web/router.ex#L42-L44">pipeline</a> for the GitHub API handler, and is used in the github_event_controller.ex like this, where we pattern match against a “push” event where a reference was deleted:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*q_IhZgJrImsj90YuYKKQKg.png" /></figure><h4>4. Views &amp; Templates</h4><h4>5. Tests</h4><p>How you test your application is totally up to you, but if you want to test controllers that are behind the authentication wall, then you will need some helper methods to prepare the connection and populate it with the structs it needs for the tests:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Vjm8txzJ2JZ8mQ9ha6V2tA.png" /></figure><p>These methods should be added to the <a href="https://github.com/AlloyCI/alloy_ci/blob/master/test/support/conn_case.ex">conn_case.ex</a> file and used within your controller tests, e.g <a href="https://github.com/AlloyCI/alloy_ci/blob/master/test/web/controllers/pipeline_controller_test.exs">pipeline_controller_test.exs</a>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SCmfVQfl-uz_g08-vjk2UQ.png" /></figure><p>This covers the basics of how Guardian and Überauth are integrated with AlloyCI, and should give you a starting point, and some insight, into how to integrate them with your project.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fupscri.be%2Fdde502%3Fas_embed%3Dtrue&amp;dntp=1&amp;url=https%3A%2F%2Fupscri.be%2Fhackernoon%2F&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=upscri" width="800" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/3c851dac986ab6dbb2d1aaa91205a8eb/href">https://medium.com/media/3c851dac986ab6dbb2d1aaa91205a8eb/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4656ceed60a5" width="1" height="1" alt=""><hr><p><a href="https://medium.com/hackernoon/alloyci-dev-diary-part-4-4656ceed60a5">AlloyCI Dev Diary — Part 4</a> was originally published in <a href="https://medium.com/hackernoon">HackerNoon.com</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AlloyCI Dev Diary — Part 3]]></title>
            <link>https://medium.com/hackernoon/alloyci-dev-diary-part-3-4c454d82cd69?source=rss-2202c01edf71------2</link>
            <guid isPermaLink="false">https://medium.com/p/4c454d82cd69</guid>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[continuous-integration]]></category>
            <category><![CDATA[project-management]]></category>
            <category><![CDATA[dev-diary]]></category>
            <category><![CDATA[github]]></category>
            <dc:creator><![CDATA[Patricio Cano]]></dc:creator>
            <pubDate>Tue, 06 Feb 2018 17:54:33 GMT</pubDate>
            <atom:updated>2019-05-22T08:36:32.664Z</atom:updated>
            <content:encoded><![CDATA[<h4>Project management with GitHub Issues &amp; Boards</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*t3A-s2eExektSb4S48r0FQ.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/photos/IClZBVw5W5A?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Todd Quackenbush</a> on <a href="https://unsplash.com/search/photos/management?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>This blog post is part of a series of posts detailing the <a href="https://hackernoon.com/tagged/development">development</a> process of AlloyCI. The previous entries have been:</p><ul><li><a href="https://hackernoon.com/alloyci-dev-diary-part-1-8ae564fce9f3">Part 1: Starting a new Project</a></li><li><a href="https://hackernoon.com/alloyci-dev-diary-part-2-6a61b02faca8">Part 2: Structuring a new Phoenix Project</a></li></ul><p>Now that we have started a new project, we most certainly have a lot on our minds about what needs to be done. We might already know where to start, what comes next, and how to get there, or we might not.</p><p>If we already know what we want, it makes perfect sense to write it down, give it form, and expand on the ideas and use cases we want to tackle.</p><p>If we don’t, then writing down the goals we want to accomplish will most likely light the way. Once we have written the main goal, the next step would be to break it down into smaller goals, and the those goals into smaller tasks that we can accomplish easily.</p><p>In both cases, we need a way to keep track of what we need to work on. For a software project, <a href="https://hackernoon.com/tagged/github">GitHub</a> issues are a great tool for this.</p><h4>Organization</h4><p>You can create an issue for every task that needs to be tackled, keep them, organized using labels, e.g. have a label for User related, or front-end related tasks, and to keep a record of your progress.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cqR7MXpXmO8dx5qmWr3p4A.png" /><figcaption>AlloyCI’s Issue Labels</figcaption></figure><p>I have been using them for AlloyCI since early on. The project has different labels to organize different issues, and filter them. Even though, for now, it’s only me working on AlloyCI, having all the tasks that need tackling, and also a history of what has already been done, will really help anyone wanting to get started with the project.</p><p>It might seem tedious if it’s only you working on a project to devote so much time to issues, but it will really help. You will most likely be the one that benefits the most once you come back after a few months of not working on the project and see the list of thing to be done. If you hadn’t written them down, you would have most likely forgotten about this tiny feature you wanted to add, that seems unimportant but greatly increases user’s happiness.</p><h4>Planning</h4><p>If you want to go a step further and keep track of what issues are being worked on, what their statuses are, and what the next steps are, you can use GitHub’s Issue Boards. The Boards allow you to create columns that represent stages of the development process, like “In Progress”, “Waiting Review”, “To Be Deployed”, etc. They give you an instant visual overview of how the project is progressing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9WE_jlkGoe7_o_L360e5zQ.png" /><figcaption>AlloyCI’s Issue Board</figcaption></figure><h4>Setting goals</h4><p>To keep myself motivated I also added milestones to the issues. The first milestone was v0.1, in other words, the minimum amount of functionality needed in order for AlloyCI to actually be a CI coordinator. I set a date for it, as a tentative goal for when I wanted to be done with the first part. I wasn’t able to keep it (I pushed it back at least 2 times and by more than 2 months), but it gave me something to aim for.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0Qa02HlJVbY2jM3t4Ge9Hg.png" /><figcaption>AlloyCI’s current milestones</figcaption></figure><p>For v1.0 I haven’t set a date, it is an open milestone, because there are some pretty complex issues assigned to it, but I still look at it as a goal. That is where I want the to project to be. It can be in a few months, in can be next year, but I <em>know</em> I’m going to get there.</p><p>There are many tools to help you with project management, but for a small team (or a team of one) the tools GitHub gives you for free are more than enough to get you where you need to be.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fupscri.be%2Fdde502%3Fas_embed%3Dtrue&amp;dntp=1&amp;url=https%3A%2F%2Fupscri.be%2Fhackernoon%2F&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=upscri" width="800" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/3c851dac986ab6dbb2d1aaa91205a8eb/href">https://medium.com/media/3c851dac986ab6dbb2d1aaa91205a8eb/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4c454d82cd69" width="1" height="1" alt=""><hr><p><a href="https://medium.com/hackernoon/alloyci-dev-diary-part-3-4c454d82cd69">AlloyCI Dev Diary — Part 3</a> was originally published in <a href="https://medium.com/hackernoon">HackerNoon.com</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[On résumés and applying to jobs]]></title>
            <link>https://medium.com/hackernoon/on-r%C3%A9sum%C3%A9s-and-applying-to-jobs-4c8cfcc7bf26?source=rss-2202c01edf71------2</link>
            <guid isPermaLink="false">https://medium.com/p/4c8cfcc7bf26</guid>
            <category><![CDATA[resume]]></category>
            <category><![CDATA[job-hunting]]></category>
            <category><![CDATA[resume-writing-tips]]></category>
            <category><![CDATA[hiring-manager]]></category>
            <dc:creator><![CDATA[Patricio Cano]]></dc:creator>
            <pubDate>Wed, 03 Jan 2018 00:54:49 GMT</pubDate>
            <atom:updated>2019-05-22T08:36:33.133Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8c333d_YNEHG4q3UDb1wTA.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/photos/5fNmWej4tAA?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Helloquence</a> on <a href="https://unsplash.com/?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>I’ve been thinking about writing this post for a while, specially after my short stint as a <a href="https://hackernoon.com/tagged/hiring">hiring</a> manager for the Service Engineer position at <a href="https://hackernoon.com/tagged/gitlab">GitLab</a>. What finally notched me was this <a href="https://twitter.com/sehurlburt/status/946650596433465344">tweet</a> by <a href="https://medium.com/u/8c35ee5f40c3">Stephanie Hurlburt</a> where she asked her followers if they wanted their résumés reviewed. I realized it made sense to write some advice around this topic, and not just for résumés, but for applying to a job in general. So, let’s begin…</p><h4>Keep it short</h4><p>While looking through resumes for the Service Engineer position at GitLab, I came across a high number of résumés that where more than 4 pages long.</p><p>It is not necessary to list every single thing you have done in your résumé. List your most proud achievement first (if it’s relevant to the position), and follow up with the most recent positions you have held. Try to keep it single page, 2 pages at most. The people reviewing your résumé have a whole pile of them to go through. It helps if it’s short. I have seen profiles being discarded just because the résumé was too long, and they didn’t even give a glance to it.</p><h4>Tailor your résumé to each position</h4><p>It is highly encouraged to tailor your résumé to the company and the position to which you are applying. This way you can showcase the particular skills you already have that match perfectly with the open position. List them first, or close to the top, and add information about projects on which you have worked that are relevant to the requirements.</p><h4>Personal information should be at the top</h4><p>Your personal information should be highly visible, preferably at the top of the document, and it should stand out. Use colors to highlight and contrast this information.</p><h4>Education should be further down</h4><p>Unless highly relevant to the position, education can go further down. It usually suffices to say the highest degree you have attained, no need to list specific courses and grades, unless, again, it’s highly relevant to the position. In this section you can also list the languages you speak, certificates you have attained, etc.</p><h4>Add something interesting about yourself</h4><p>At the very end, add something interesting about yourself. Something that might let the hiring manager relate a bit to you.</p><h4>Use LaTeX, or InDesign for the layout</h4><p>Make your résumé shine! There are amazing résumé templates available that you can easily tailor to your needs, so you really outshine the competition. Word has gotten better in later versions, but it still cannot hold a candle to what you can do with LaTeX, or InDesign.</p><h4>Always submit your resume as a PDF</h4><p>PDF, PDF, PDF! It is called Portable Document File for something. It renders pretty much the same way on any machine. A Word, or other word processing document has its own weird way of rendering a document. It will most likely look different in my computer than it does on yours. I might not have the proper fonts, and the layout will get really screwed. This is a no-go. Always submit your résumé as a PDF.</p><h4>Your GitHub profile is not a résumé</h4><p>Having a lot of toy projects or tutorial projects on your GitHub profile and submitting that instead of a proper résumé will be detrimental to your application. These types of projects do not showcase your ability to work with other developers, or to grasp complex code, or that you actually have vast knowledge of the framework in which your toy projects are written.</p><p>On the other hand, if you contribute to open source projects, in whatever form (documentation, issue triaging, helping people out on the issues or other forums, etc.) now this <em>does</em> showcase your ability to work with other developers, or to communicate complex subjects, or to prioritize. This kind of contributions can be more appealing to potential employers.</p><p>Now I know there are great developers that are not able to contribute to open source. If that is the case for you, have some code samples of work that highlights your abilities, so that you can send to the technical interviewers upon request.</p><h4>Use LinkedIn</h4><p>A lot of people seem to hate on LinkedIn, but it is a tool that is used by <em>a lot</em> of recruiters. Keep your profile updated, with your latest skills, your latest projects, your education, etc., and you might get job leads just for having a profile. A lot of recruiting software also allows you to pre-fill information on the application form from your LinkedIn profile, so it will save you some time.</p><p>Keep it updated!</p><p>After you have the perfect résumé, it is time to apply to the job opening, which it’s actually the most important part. No point on having the best résumé ever, if no one will see it.</p><h4>Write a cover letter</h4><p>Nowadays most openings require you to write a cover letter, but even if they don’t, you should <em>always</em> submit one. This is your moment to shine! It is a freeform letter in which you get to tell them who you are in <em>your own words. </em>Put some thought into it, and take your time. A great cover letter can be more valuable that a résumé.</p><p>Write about what makes you you, what inspires you, what excites you, and tailor it to each specific position. Showcase what you’ve done in a way that is relevant to the open position and makes you stand out.</p><h4>If possible, have a personal blog</h4><p>Having a personal blog can only benefit you. It can show your ability explain complex topics in understandable ways, your communication skills, etc. It is also a great indicator that you will most likely be able to write good documentation.</p><p>This is feedback that I have gather over the past 4 years of applying to different jobs, from my short stint as a hiring manager, and from watching other hiring managers at companies I’ve worked at. This is just my humble opinion, and should not be construed as professional advice, though. And with that I bid you good luck on the job hunt!</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fupscri.be%2Fdde502%3Fas_embed%3Dtrue&amp;dntp=1&amp;url=https%3A%2F%2Fupscri.be%2Fhackernoon%2F&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=upscri" width="800" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/3c851dac986ab6dbb2d1aaa91205a8eb/href">https://medium.com/media/3c851dac986ab6dbb2d1aaa91205a8eb/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4c8cfcc7bf26" width="1" height="1" alt=""><hr><p><a href="https://medium.com/hackernoon/on-r%C3%A9sum%C3%A9s-and-applying-to-jobs-4c8cfcc7bf26">On résumés and applying to jobs</a> was originally published in <a href="https://medium.com/hackernoon">HackerNoon.com</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AlloyCI Dev Diary — Part 2]]></title>
            <link>https://medium.com/hackernoon/alloyci-dev-diary-part-2-6a61b02faca8?source=rss-2202c01edf71------2</link>
            <guid isPermaLink="false">https://medium.com/p/6a61b02faca8</guid>
            <category><![CDATA[alloyci-dev-diary]]></category>
            <category><![CDATA[phoenix-project]]></category>
            <category><![CDATA[phoenix-framework]]></category>
            <category><![CDATA[elixir]]></category>
            <category><![CDATA[alloyci]]></category>
            <dc:creator><![CDATA[Patricio Cano]]></dc:creator>
            <pubDate>Sat, 16 Dec 2017 16:06:29 GMT</pubDate>
            <atom:updated>2019-05-22T08:36:33.565Z</atom:updated>
            <content:encoded><![CDATA[<h3>Structuring a new Phoenix Project</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*I4a6MOBxYhgQsBRcwbShRw.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/photos/RkJF2BMrLJc?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">William Bout</a> on <a href="https://unsplash.com/?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>This blog post is part of a series of posts detailing the <a href="https://hackernoon.com/tagged/development">development</a> process of <a href="https://hackernoon.com/tagged/alloyci">AlloyCI</a>. The previous entries have been:</p><ul><li><a href="https://hackernoon.com/alloyci-dev-diary-part-1-8ae564fce9f3">Part 1: Starting a new Project</a></li></ul><p>If you are coming from a Rails background, you might find the folder structure of a Phoenix project a bit weird, specially after the changes in 1.3. But don’t be put off by this, the structure actually makes a lot of sense, specially the new 1.3 structure.</p><p>Unlike Rails, there is no app/ folder where most of your code will live. Phoenix 1.3 projects follow the structure of pretty much any regular Elixir project, this means that most of your code will live inside the lib/my_app folder.</p><p>As you might now, Phoenix 1.3 changed the way projects are structured. Before this change most of your code would be under web/, with little to no further organizations. You would have a models directory, where you would put all your business logic, without much consideration as to how they interact together. This folder would get pretty large, pretty fast. Also the name model seems to imply an object, but in Elixir, there are no objects, so storing your data access layer under a folder namedmodels makes little contextual sense.</p><h4>Data &amp; Contexts</h4><p>Phoenix 1.3, by default, guides you towards a better way of organizing your code. Controllers, Views, Templates go under lib/my_app_web, database migrations and related files go under priv/repo, and the rest of your Elixir code will live under lib/my_app. This is the basic setup, and you can tweak it, and change it as much as you like. You have complete liberty as to how to organize your code.</p><p>Since I started writing AlloyCI <em>before</em> Phoenix 1.3 was fully released, some of the folder structure is different than the one the latest 1.3 generators create. I prefer the way AlloyCI is structured right now, because I really don’t like the way they renamed the web/ folder to alloy_ci_web/ and everything inside it from AlloyCi.Web.XXX to AlloyCiWeb.XXX. I really prefer the separation in the module name, and the fact that the app name is not repeated in the web folder name. Thanks to the flexibility Phoenix provides, I don’t need to follow the conventions, though.</p><p>Anyways, the most important part about the structure changes, is that Phoenix now guides you towards using <strong>contexts</strong> for structuring your data access layer.</p><p>Using AlloyCI as an example, we have the Accountscontext (which is under lib/alloy_ci/accountsfolder), where the User, Authentication, and Installation schemas live. These 3 schemas are closely related, and belong to the same business logic, namely the handling of Accounts.</p><p>If you look closely at the <a href="https://github.com/AlloyCI/alloy_ci/tree/master/lib/alloy_ci/accounts">files</a> under the accounts folder, you will see that there are no functions in the schema files, other than the changeset function. This means that I would need to either go straight through Ecto to manipulate the database data (not recommended) or that I need an API boundary that will let me perform actions on the accounts related schemas.</p><p>This is where the AlloyCi.Accounts module comes into play. This module is the boundary with which AlloyCI will interact if it needs to perform an action on any of the schemas related to an Account. All public functions of this module provide an easy way to manipulate the data, while providing security through a layer of indirection.</p><p>This is the purpose of <strong>contexts. </strong>They provide a boundary between your data layer and your business logic, and allow you to have an explicit contract that tells you how you can manipulate your data. It also allows you to stay independent from Ecto.</p><p>Let’s say, in the future, you’d like to switch from Ecto to the “latest, coolestDB driver”. If you didn’t use an abstraction layer, like the contexts, you would have to refactor every function across the codebase that used Ecto to communicate to the data layer. <em>But</em> since we are using contexts, we would only need to refactor the code inside the context itself.</p><h4>Data Presentation</h4><p>The code that will actually present your data to the user can live under the lib/my_app/web or lib/my_app_web folders, depending on how you want to structure it (the automatic generator will default to lib/my_app_web but I prefer the former).</p><p>In here you will find the folders where your controllers, views, templates and channels will live. Let’s start with the presentation layer.</p><h4><strong>Views &amp; Templates</strong></h4><p>If you come from a Rails background, you might wonder why there are two components to presenting the data, when in Rails all you need is the views folder. In Phoenix, the “views” are not composed of templated HTML files, but rather they are regular Elixir modules. These modules are there to help you share code with the template, and fulfill a similar purpose as the Rails “View Helpers”, but are, by default, specific to a single controller (other views are not loaded, unlike Rails that loads all view helpers, regardless of the controller being called). This separation makes it easier to use the same signature on similar helper functions needed to present data (without really overloading them), depending on which controller is being called, thus simplifying your code.</p><p>The templates are, then, where your HTML code lives. The template files are saved as *.html.eex files (meaning embedded Elixir), and are very similar to erb files. The syntax is exactly the same, but instead of Ruby code inside, you write Elixir code 😄</p><p>A very important distinction between Phoenix and Rails is how you share information between the controller and the template. In Rails, it is enough to declare an instance variable with @something and it will be available to the template/view.</p><p>Given the functional nature of Elixir, in Phoenix you need to explicitly pass the information you wish to be available to the views in the render function. These are called assigns. As an example, here is the show action of the PipelineController:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d86297a346ab1b510249b640adc7a025/href">https://medium.com/media/d86297a346ab1b510249b640adc7a025/href</a></iframe><p>Everything that comes after &quot;show.html&quot; are the assigns, so the variables available to the templates related to the show action are builds, pipeline, and current_user. We can see an example of how to use them in this snippet from the pipeline info header:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c5329e0fb54e1a716439882f88eae5b6/href">https://medium.com/media/c5329e0fb54e1a716439882f88eae5b6/href</a></iframe><p>Once a variable has been assigned, it is available to the template via @var_name, just like with Rails. Functions defined the view file of the same name as the controller (in this example pipeline_view.ex) are immediately available to the template. In the above example, sha_link/1 creates an HTML link to the specific commit on GitHub.</p><h4><strong>Controllers</strong></h4><p>In structure, Phoenix Controllers are very similar to Rails Controllers, with the main difference being described above. When generated by the helper tools, they will the same index, show, edit, update, and delete actions as their Rails counterparts. And just as with Rails Controllers, you can define any action you desire by defining a function, and connecting a route to it.</p><h4><strong>Channels</strong></h4><p>Phoenix Channels are used to communicate with the web client via Web Sockets. They are similar to ActionCable in Rails, but in my opinion, much more powerful, and <a href="https://dockyard.com/blog/2016/08/09/phoenix-channels-vs-rails-action-cable">performant</a>. In AlloyCI, they are used to push the output of the build logs in real time, and to receive a pre formatted piece of HTML code to show the user’s repositories (more on how AlloyCI uses Channels will be discussed in another post).</p><p>And there you have it. That is the basic structure of a Phoenix project. There are other components that we haven’t covered here, like <em>Plugs</em>, or <em>Background Jobs</em>. We will discuss these advanced topics in a future blog post.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fupscri.be%2Fdde502%3Fas_embed%3Dtrue&amp;dntp=1&amp;url=https%3A%2F%2Fupscri.be%2Fhackernoon%2F&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=upscri" width="800" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/3c851dac986ab6dbb2d1aaa91205a8eb/href">https://medium.com/media/3c851dac986ab6dbb2d1aaa91205a8eb/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6a61b02faca8" width="1" height="1" alt=""><hr><p><a href="https://medium.com/hackernoon/alloyci-dev-diary-part-2-6a61b02faca8">AlloyCI Dev Diary — Part 2</a> was originally published in <a href="https://medium.com/hackernoon">HackerNoon.com</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AlloyCI Dev Diary — Part 1]]></title>
            <link>https://medium.com/hackernoon/alloyci-dev-diary-part-1-8ae564fce9f3?source=rss-2202c01edf71------2</link>
            <guid isPermaLink="false">https://medium.com/p/8ae564fce9f3</guid>
            <category><![CDATA[alloyci]]></category>
            <category><![CDATA[alloyci-dev-diary]]></category>
            <category><![CDATA[dev-diary]]></category>
            <category><![CDATA[elixir]]></category>
            <category><![CDATA[phoenix-framework]]></category>
            <dc:creator><![CDATA[Patricio Cano]]></dc:creator>
            <pubDate>Thu, 19 Oct 2017 19:16:01 GMT</pubDate>
            <atom:updated>2019-05-22T08:36:34.045Z</atom:updated>
            <content:encoded><![CDATA[<h4>Starting a new project</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7NgiewIZzLd180ihdNqBpA.jpeg" /></figure><p>Going by AlloyCI’s <a href="https://hackernoon.com/introducing-alloyci-a41aef2dd2f1">introduction post</a>, you would think that the idea to write a CI coordinator came pretty naturally for me, but it actually took me quite some time to find the perfect <a href="https://hackernoon.com/tagged/idea">idea</a> for a new project.</p><p>Since the main purpose of starting this new project was to cement my newly acquired Elixir knowledge, I could have chosen something simpler, or even just gone along with the tutorial projects found in all language learning books. Something like a blog management system, a <a href="https://hackernoon.com/tagged/github">GitHub</a> issue API client, a very simple CMS, etc. But I knew that if I went that route, I would stop adding features to the project as soon as I was done with the book. I did not want that to happen.</p><p>I really think that a longer lived, more useful project, will have a more positive effect, than a one-off tutorial project, specially if you try to make something other people might find useful. <strong>But here’s the catch:</strong> Coming up with something other people might find useful is <em>really hard</em>!</p><p>A good starting point is finding a problem that you might have that isn’t quite solved by current offerings. Chances are that more than one person out there has the same problem as you. Now, I’m not going to lie, it is going to take you <em>a lot</em> of time to come up with something usable, but that is part of the fun!</p><p>I took me around 3 months until the CI coordinator idea creeped into my head. Before that I thought about re-implementing the omniauth-saml Ruby library in Elixir, but that idea quickly died when I realized that SAML support is almost non-existing in Erlang, let alone Elixir, at least nothing that can compare with ruby-saml and it’s power. Once that idea died, I continued with the re-implementing something idea for a while. I eventually gave up when I noticed that every idea I had to re-implement something, already had a corresponding Elixir project. In hindsight this might not have been the best idea. Even if there is already a library out there, you can always learn a lot by re-implementing it. Your own particular views and opinions can lead you to a better implementation of an existing solution. At the very least you will learn a lot.</p><p>The idea to create the CI coordinator came to me, as many ideas often do, while I was in the shower. Clearing your mind and not thinking about a problem is often the best way to find a solution, I have experienced this multiple times in my life. Once the idea “presented itself”, I knew it had great potential. By re-implementing the GitLab CI API in Elixir I would be decoupling its system and liberating the GitLab Runner, making it compatible with other SCM systems. It would give new possibilities to an already great, but locked down project (the CI Runner). The last part was what really got me excited to get started. I could leverage an existing project to build something new, and simplify some of my approach, which would give me a head start, and make it possible to release an Alpha version quicker.</p><p>The next day I got started with the basic project layout and did not go to bed until 4 am of the next day 😬</p><p>And that is the squick story about how I got started with AlloyCI. <strong>Part 2</strong> of the Dev Diary will be about project structure for a new Phoenix project, and the transition between 1.2 and 1.3 that AlloyCI went through before its public release.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fupscri.be%2Fdde502%3Fas_embed%3Dtrue&amp;dntp=1&amp;url=https%3A%2F%2Fupscri.be%2Fhackernoon%2F&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=upscri" width="800" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/3c851dac986ab6dbb2d1aaa91205a8eb/href">https://medium.com/media/3c851dac986ab6dbb2d1aaa91205a8eb/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8ae564fce9f3" width="1" height="1" alt=""><hr><p><a href="https://medium.com/hackernoon/alloyci-dev-diary-part-1-8ae564fce9f3">AlloyCI Dev Diary — Part 1</a> was originally published in <a href="https://medium.com/hackernoon">HackerNoon.com</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introducing AlloyCI]]></title>
            <link>https://medium.com/hackernoon/introducing-alloyci-a41aef2dd2f1?source=rss-2202c01edf71------2</link>
            <guid isPermaLink="false">https://medium.com/p/a41aef2dd2f1</guid>
            <category><![CDATA[github]]></category>
            <category><![CDATA[elixir]]></category>
            <category><![CDATA[continuous-integration]]></category>
            <category><![CDATA[phoenix-framework]]></category>
            <category><![CDATA[continuous-deployment]]></category>
            <dc:creator><![CDATA[Patricio Cano]]></dc:creator>
            <pubDate>Wed, 13 Sep 2017 21:05:27 GMT</pubDate>
            <atom:updated>2019-05-22T08:36:34.608Z</atom:updated>
            <content:encoded><![CDATA[<h4>A new Continuous Integration Coordinator written in Elixir &amp; Phoenix</h4><p>I have been wanting to learn Elixir and <a href="https://hackernoon.com/tagged/phoenix">Phoenix</a> for a while now, and a couple of months ago I finally took the plunge. I started reading “Programming <a href="https://hackernoon.com/tagged/elixir">Elixir</a> 1.3” by Dave Thomas, and “Programming Phoenix” by Chris McCord, et. al. (both from “The Pragmatic Bookshelf” and highly recommended if you want to get started with Elixir and Phoenix).</p><p>I followed most of the code guides in the books, but it still felt kind of foreign sometimes. I wanted to build something a bit more complex, and challenging. I also wanted to release it as open source software, so it had to be useful to a wider audience than just me.</p><p>I’ve always liked CI systems and the value they provide, but I have yet to find one that offers everything I need. I want it to be highly configurable, easily scalable, easy to install, with a robust executor that can run on multiple operating systems, and to be <strong>open source</strong>. The CI service that comes closest to this is GitLab CI, but it is tightly coupled with GitLab itself, so I cannot use it with GitHub. I also don’t want to install a whole Source Code Management system <strong><em>just</em></strong> for it’s CI service.</p><p>That is where the idea to create a CI system came from. I learned a lot about how CI systems should work from my time at GitLab, so it felt like the right step forward. In fact, I decided to use the GitLab CI Runner as the executor for this project.</p><p>The GitLab CI Runner is written in <strong>Go</strong> and is the piece of code that actually takes care of running the builds, and whatever other action you need in order to execute your pipeline. The greatest thing about it, is that it is basically a <strong>“dumb box”</strong>, meaning that all you need to do is tell it what to do in the way it expects, and it will do it! It is also incredibly powerful and configurable, it can use Docker to execute your builds, and takes advantage of Docker Machine to let you autoscale the machines it uses for your builds, it can use Kubernetes, run on top of Digital Ocean’s VMs, run Xcode and Windows builds, and a lot more.</p><p>Using an already existing project as the executor for my CI system allowed me to concentrate on the coordinator, which is the piece of software that reads your project’s configuration, creates the pipelines, and builds, and sends all this information to the executor in the way it expects it to be. It also collects all the information relayed by the executor, like build trace and other artifacts, and presents the to the user in an easily digestible manner.</p><p>Since this is an introduction post, I will not go into details of the implementation of the different parts of AlloyCI. For that I will create <strong>several separate posts</strong> and will go into as much detail as possible. For now, let me tell you about its features.</p><p>(Part 1 of the <a href="https://hackernoon.com/alloyci-dev-diary-part-1-8ae564fce9f3">AlloyCI Dev Diary is <strong>live!</strong></a>)</p><h3>Features</h3><p>Please keep in mind that this is the first public release of AlloyCI, and it is only at version 0.1.0. A lot of the features will improve over time and a lot more will come as we move towards 1.0. You can check the roadmap to 1.0 here: <a href="https://github.com/supernova32/alloy_ci/projects/1">https://github.com/AlloyCI/alloy_ci/projects/1</a> and if you’d like to contribute anything, please go ahead.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NXQQ9U2u9W2qjy4cin-z4Q.png" /><figcaption>User’s Dashboard</figcaption></figure><h4>Basic CI functionality</h4><p>For version 0.1 the goal was to have at least the very basics of CI functionality. These include the following:</p><ul><li>Parse a configuration file to create and prepare the builds and pipelines</li><li>Support different build stages</li><li>Allow builds and runners to be tagged, thus allowing for fine grained control of which runner picks up which build</li><li>Process and send the build information to the GitLab Runner in the expected format</li><li>Accept information received from the GitLab Runner about the specific build</li><li>Show the output trace of each build and follow it when looking at an active build</li><li>Properly manage the status of each build, and send to the Runner only builds that should be processed</li><li>Report to GitHub the status of each push via the <strong>SHA</strong> reference of its last commit</li><li>Send notifications to the user about the status of a pipeline via email and/or Slack</li><li>Perform auto-deploys via the deploy stage</li></ul><p>As commercially available CI systems go, AlloyCI is dwarfed by the plethora of features other CI services offer, but that’s OK. I wanted to start simple and distill the CI experience to only its most necessary features. Bells and whistles will come later 😉</p><h4>Extras</h4><p>Something I did add just for the “nice to have” value are build statistics per project and runner. You can see some nice charts portraying the amount of build in the past week, how many have succeeded or failed, and the total of builds processed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FJjV85CI9B1A2y5r8HJ1IA.png" /><figcaption>Project’s Settings</figcaption></figure><p>The runners chart will also brake down the amount of builds processed by project, so you can see which runners are picking up which builds.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vjvHOg1Q3911Yk8YSqDkGQ.png" /><figcaption>Runner’s Admin Settings</figcaption></figure><h3>How can you try it out?</h3><p>You can install AlloyCI on your own servers using Docker, and Docker Compose. Please follow our <a href="https://github.com/AlloyCI/alloy_ci/tree/master/doc#installation">documentation</a> to get started.</p><p>The easiest way to try AlloyCI out is by going to <a href="https://alloy-ci.com/">https://alloy-ci.com</a>, logging in with your GitHub account, and adding a project.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*duDf8fQkVOubCiippouF0w.png" /><figcaption>New Project’s View</figcaption></figure><p>Before being able to add a project, you will be prompted to install the AlloyCI integration on your account. After doing this, the project you’ll want to add needs to have an .alloy-ci.json configuration file before it can be added. You can read more about how to create this file <a href="https://github.com/AlloyCI/alloy_ci/tree/master/doc/json">here</a>. Here is a quick example for Elixir:</p><pre>{<br>  &quot;image&quot;: &quot;elixir:latest&quot;,<br>  &quot;services&quot;: [<br>    &quot;postgres&quot;<br>  ],<br>  &quot;before_script&quot;: [<br>    &quot;mix deps.get&quot;<br>  ],<br>  &quot;after_script&quot;: [<br>    &quot;rm secrets&quot;<br>  ],<br>  &quot;stages&quot;: [<br>    &quot;build&quot;,<br>    &quot;test&quot;,<br>    &quot;deploy&quot;<br>  ],<br>  &quot;mix credo&quot;: {<br>    &quot;stage&quot;: &quot;build&quot;,<br>    &quot;script&quot;: [&quot;mix credo&quot;],<br>    &quot;tags&quot;: [&quot;elixir&quot;]   <br>  },<br>  &quot;mix test&quot;: {<br>    &quot;stage&quot;: &quot;test&quot;,<br>    &quot;script&quot;: [&quot;mix test&quot;],<br>    &quot;tags&quot;: [&quot;postgres&quot;, &quot;elixir&quot;]   <br>  }<br>}</pre><p>Once the file has been committed to your repository, you are ready to add it to AlloyCI. After the project has been added, and new code has been pushed, you will see the newly created pipeline in the project’s dashboard.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*arXvTJOKVBjaIhQXWH_W3A.png" /><figcaption>Project’s Dashboard</figcaption></figure><p>If you click on the pipeline, it will take you to the its builds, where you can follow their output and overall status.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NVbaMpp2uscxUcs9eQTUJQ.png" /><figcaption>Build Job’s Output</figcaption></figure><p>The test server has limited resources and only has 2 registered runners to process builds, so it will take a while to process your pipeline. Luckily you can register your own runner as a “Project Specific Runner”, which means it will only pick up builds from your own, particular project. Go to your project’s settings for instructions on how to add a specific runner.</p><h3>Why did I build AlloyCI?</h3><p>As I mentioned before, I built AlloyCI to learn Elixir and Phoenix. I chose a CI coordinator, because I’m familiar with them, and wanted to add my own take on them. I’m also releasing it as <strong>GPLv3</strong> licensed open source code, because I think other people might find it useful. Having a non-trivial codebase to look at is a really great resource to learn a new language. I know my code is far from perfect, but it is a start, and I would love for people to look at it, criticize it, and provide useful feedback, so that I, <strong>and others</strong>, can learn and benefit from this project.</p><p>I will continue to develop AlloyCI for quite some time. I plan to maintain it for the foreseeable future, and I might even consider writing a new runner/executor in Elixir itself, so that the project does not rely on GitLab’s good intentions of keeping the GitLab Runner open source and maintained.</p><p>—</p><p>If you like the project, please star it on GitHub, and if you think of something the project could use, or have some suggestion or feedback, by all means, please open an issue. I would ❤️ to hear what you think.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fupscri.be%2Fdde502%3Fas_embed%3Dtrue&amp;dntp=1&amp;url=https%3A%2F%2Fupscri.be%2Fhackernoon%2F&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=upscri" width="800" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/3c851dac986ab6dbb2d1aaa91205a8eb/href">https://medium.com/media/3c851dac986ab6dbb2d1aaa91205a8eb/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a41aef2dd2f1" width="1" height="1" alt=""><hr><p><a href="https://medium.com/hackernoon/introducing-alloyci-a41aef2dd2f1">Introducing AlloyCI</a> was originally published in <a href="https://medium.com/hackernoon">HackerNoon.com</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Hello world!]]></title>
            <link>https://medium.com/@suprnova32/hello-world-d7e6edb68a2a?source=rss-2202c01edf71------2</link>
            <guid isPermaLink="false">https://medium.com/p/d7e6edb68a2a</guid>
            <category><![CDATA[education]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[sharing]]></category>
            <dc:creator><![CDATA[Patricio Cano]]></dc:creator>
            <pubDate>Fri, 24 Mar 2017 16:49:33 GMT</pubDate>
            <atom:updated>2017-03-24T16:49:33.864Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/890/1*12atvhgaukky3laTthRClQ.png" /><figcaption>Soumaya Museum in Mexico City — Photo by <a href="https://viviendoenvenus.com/">Cyndi Caviedes</a></figcaption></figure><p>For a long time I have been meaning to start a blog, or something similar, where I could share some of my knowledge and experiences. I don’t know why I have been postponing it for so long. Nevermore!</p><p>Ever since I started programming, some 9 years ago, I have relied on the experiences of others to guide me through the amazing process that is learning to program. I had amazing teachers at the University of Stuttgart, where I learned the theoretical side of Computer Science, but during the 2 years that I spent there, we never really got to dive into the more practical side, so I would lean on blogs, and articles to get the feel of what it is like to develop software in the real world.</p><p>In the end, I didn’t graduate from the University of Stuttgart, I switched to the University of Applied Sciences of Stuttgart.</p><p>They might sound the same, but they are very different. In Germany there is a clear distinction between a Universität (University) and a Fachhochschule (University of Applied Sciences). A Fachhochschule is a lot more oriented to the practical side of teaching, whereas a Universität focuses more on the theoretical and academic side of things.</p><p>I am really thankful I first spent 2 years learning more of the Theoretical side of Computer Science, as the knowledge it gave me really helped me understand a lot of the different concepts we were taught at the Fachhochschule.</p><p>Anyway, I digressed a bit. The purpose of this small post is to be the start of my “blog”. I want to share what I have learned, my experiences as a Developer, and hopefully help someone that is stuck with a problem, or in a similar situation as I once was.</p><p>I want to give back to the development community, not just with <a href="https://github.com/supernova32">open source code</a>, but also with my very personal view of the programming world.</p><p>I hope my ramblings here are of use to someone out there.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d7e6edb68a2a" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>