<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: pablovelasquez</title>
    <description>The latest articles on DEV Community by pablovelasquez (@pablovelasquez).</description>
    <link>https://dev.to/pablovelasquez</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F152131%2F9da3cb1c-7249-4dde-ad4e-6e32a9353b2a.jpeg</url>
      <title>DEV Community: pablovelasquez</title>
      <link>https://dev.to/pablovelasquez</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/pablovelasquez"/>
    <language>en</language>
    <item>
      <title>Check Branch age on a Gitlab stage to enable trunk based development and CI</title>
      <dc:creator>pablovelasquez</dc:creator>
      <pubDate>Fri, 19 Jul 2019 04:08:49 +0000</pubDate>
      <link>https://dev.to/atlanticsoft/check-branch-age-on-a-gitlab-stage-to-enable-trunk-based-development-and-ci-4293</link>
      <guid>https://dev.to/atlanticsoft/check-branch-age-on-a-gitlab-stage-to-enable-trunk-based-development-and-ci-4293</guid>
      <description>&lt;p&gt;This blog post was originally posted on our company blog at:&lt;br&gt;
&lt;a href="http://blog.atlanticsoft.us/page/3/check-branch-age-on-a-gitlab-stage-to-enable-trunk-based-development-and-ci/" rel="noopener noreferrer"&gt;http://blog.atlanticsoft.us/page/3/check-branch-age-on-a-gitlab-stage-to-enable-trunk-based-development-and-ci/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We are believers and practitioners of the agile manifesto and we like the 9th principle which states that “Continuous attention to technical excellence and good design enhances agility”, therefore with the current state of software development for us that means Continuous Integration and as such Trunk Based Development is a specific practice that enables CI.&lt;/p&gt;

&lt;p&gt;We use Gitlab as our tool for CI, and therefore this is one of our most visited places all day, we thought that as a help to remind the developers to keep short-lived feature branches that we could show them a warning if the branch is older than 24 hours and help them get used into planning their tasks smaller so that they can finish them in one day and not only have their code added quickly to master and tested with others code, but also achieve multiple small successes by completing planned worked and not keeping incomplete tasks open.&lt;/p&gt;

&lt;p&gt;Note that we are not ready to commit directly to master as it would be the ideal state of trunk based development, but we use short lived branches and feature flags.&lt;/p&gt;

&lt;p&gt;If the branch first commit is younger than 24 hours then it will show a green checkbox&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fatlanticsoft-blog-images.s3.amazonaws.com%2Fgitlab_24_hour_check_pipeline_success.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fatlanticsoft-blog-images.s3.amazonaws.com%2Fgitlab_24_hour_check_pipeline_success.png" alt="Gitlab Succesfull pipeline"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;But if it's not then it will display a warning, but won’t stop the pipeline&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fatlanticsoft-blog-images.s3.amazonaws.com%2Fgitlab_24_hour_check_pipeline_warning.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fatlanticsoft-blog-images.s3.amazonaws.com%2Fgitlab_24_hour_check_pipeline_warning.png" alt="Gitlab pipeline with warnings"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here is the code:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://gitlab.com/atlanticsoft_public_repo/gitlab_pipelines_24_hour_branch_check" rel="noopener noreferrer"&gt;https://gitlab.com/atlanticsoft_public_repo/gitlab_pipelines_24_hour_branch_check&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Pablo Velásquez&lt;br&gt;
Atlanticsoft Founder&lt;/p&gt;

&lt;p&gt;Notes:&lt;/p&gt;

&lt;p&gt;If interested in knowing more of trunk based development you can read more here:&lt;br&gt;
&lt;a href="https://trunkbaseddevelopment.com/" rel="noopener noreferrer"&gt;https://trunkbaseddevelopment.com/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We use Unleash for feature flags &lt;a href="https://github.com/Unleash/unleash" rel="noopener noreferrer"&gt;https://github.com/Unleash/unleash&lt;/a&gt;&lt;/p&gt;

</description>
      <category>agile</category>
      <category>devops</category>
      <category>gitlab</category>
      <category>ci</category>
    </item>
  </channel>
</rss>
