<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>DevOps on Aamnah - Frontend Web Developer</title>
    <link>https://aamnah.com/notes/devops/</link>
    <description>Recent content in DevOps on Aamnah - Frontend Web Developer</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Tue, 04 Jun 2024 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://aamnah.com/notes/devops/rss.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Trigger a Netlify build when a Github repo is updated</title>
      <link>https://aamnah.com/notes/devops/trigger-netlify-build-github-webhooks/</link>
      <pubDate>Tue, 17 Oct 2023 17:41:51 +0300</pubDate>
      <guid>https://aamnah.com/notes/devops/trigger-netlify-build-github-webhooks/</guid>
      <description>&lt;h2 id=&#34;why&#34;&gt;Why?&lt;/h2&gt;&#xA;&lt;p&gt;I have a separate repo linked to my Hugo site as a Hugo module. That repo contains all the content for my notes section and is separate from the repo for my main website. The main website gets automatically deployed by Netlify.&lt;/p&gt;&#xA;&lt;p&gt;What does not happen right now is that whenever i update the content for the notes section, the main site does not get updated as a deployment is not triggered by Netlify.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Install Embedded Dart Sass on Netlify</title>
      <link>https://aamnah.com/notes/devops/install-embedded-dart-sass/</link>
      <pubDate>Mon, 06 Feb 2023 15:13:13 +0500</pubDate>
      <guid>https://aamnah.com/notes/devops/install-embedded-dart-sass/</guid>
      <description>&lt;p&gt;NOTE: In 2023, the Sass team deprecated Embedded Dart Sass in favor of Dart Sass. Embedded Dart Sass is no longer a requirement since Hugo version &lt;code&gt;0.114.0&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;If you have been using Embedded Dart Sass with Hugo v0.113.0 and earlier, uninstall Embedded Dart Sass, then install Dart Sass. If you have installed both, Hugo will use Dart Sass.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;The &lt;a href=&#34;https://gist.github.com/aamnah/87b1aad1bfbd08d2267c26e099c25024&#34;&gt;old build/install script for Netlify setups&lt;/a&gt; is saved as a Github gist.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Setting up a sudo User with SSH key access an Azure Virtual Machine (Ubuntu)</title>
      <link>https://aamnah.com/notes/devops/ssh-key-azure-virtual-machine-linux/</link>
      <pubDate>Wed, 26 May 2021 20:21:41 +0500</pubDate>
      <guid>https://aamnah.com/notes/devops/ssh-key-azure-virtual-machine-linux/</guid>
      <description>&lt;ul&gt;&#xA;&lt;li&gt;You can create a new user from the &lt;em&gt;Support + troubleshooting &amp;gt; Reset password&lt;/em&gt; screen. By default, it&amp;rsquo;ll update the password for the given account. But if the given account does not exist, it&amp;rsquo;ll create one, add it to &lt;em&gt;sudoers&lt;/em&gt; list (make sure it can run &lt;code&gt;sudo&lt;/code&gt; commands) and then set the password for it too.&lt;/li&gt;&#xA;&lt;li&gt;The &lt;code&gt;~/.ssh&lt;/code&gt; folder doesn&amp;rsquo;t exist when you create a new user. So you have to create it, and the &lt;code&gt;authorized_keys&lt;/code&gt; file to add accepted keys that can connect to the server and set the right permissions for both&lt;/li&gt;&#xA;&lt;li&gt;Setting permissions is important because SSH will not connect if the permissions are too open&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;authorized_keys&lt;/code&gt; is where you add the contents of the &lt;code&gt;.pub&lt;/code&gt; file of your key pair.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h3 id=&#34;set-the-server-up-to-accept-ssh-key-for-the-user&#34;&gt;Set the server up to accept SSH key for the user&lt;/h3&gt;&#xA;&lt;p&gt;Login to the Azure Virtual Machine with your password and create the required files and folders&lt;/p&gt;</description>
    </item>
    <item>
      <title>Doing automated Git Flow branch deploys on their own Expo release channels with Bitbucket Pipelines</title>
      <link>https://aamnah.com/notes/devops/expo-feature-publish-bitbucket-pipelines-branch-sed/</link>
      <pubDate>Thu, 23 Jul 2020 11:12:36 +0500</pubDate>
      <guid>https://aamnah.com/notes/devops/expo-feature-publish-bitbucket-pipelines-branch-sed/</guid>
      <description>&lt;h3 id=&#34;background&#34;&gt;background&lt;/h3&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;I have an Expo based React Native app that i publish with &lt;code&gt;expo publish&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;I follow &lt;a href=&#34;https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow&#34;&gt;git flow&lt;/a&gt; branch naming and structure&lt;/li&gt;&#xA;&lt;li&gt;I gave multiple people working on plenty of features that we need to test separately&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h3 id=&#34;what-i-want&#34;&gt;what i want&lt;/h3&gt;&#xA;&lt;p&gt;Publish every branch to it&amp;rsquo;s own release channel automatically&lt;/p&gt;&#xA;&lt;h3 id=&#34;the-issue&#34;&gt;the issue&lt;/h3&gt;&#xA;&lt;p&gt;Because i&amp;rsquo;m using Git Flow, the branch naming is &lt;code&gt;feature/my-awesome-branch&lt;/code&gt;. I can get the branch name with a built-in &lt;a href=&#34;https://support.atlassian.com/bitbucket-cloud/docs/variables-in-pipelines/&#34;&gt;pipeline variable&lt;/a&gt;, but the &lt;code&gt;/&lt;/code&gt; after &lt;code&gt;feature&lt;/code&gt; doesn&amp;rsquo;t work with Expo release channel naming. You can&amp;rsquo;t have a &lt;code&gt;/&lt;/code&gt; in a release channel name..&lt;/p&gt;</description>
    </item>
    <item>
      <title>Notes on Bitbucket Pipelines</title>
      <link>https://aamnah.com/notes/devops/bitbucket-pipelines-notes/</link>
      <pubDate>Thu, 02 Jul 2020 00:19:00 +0500</pubDate>
      <guid>https://aamnah.com/notes/devops/bitbucket-pipelines-notes/</guid>
      <description>&lt;h3 id=&#34;container-build-exceeded-memory-limit&#34;&gt;Container &lt;code&gt;Build&lt;/code&gt; exceeded memory limit.&lt;/h3&gt;&#xA;&lt;p&gt;This can happen for large steps, in my case building an app bundle with &lt;code&gt;turtle-cli&lt;/code&gt;. You can double the memory allocation for a step with &lt;code&gt;size: 2x&lt;/code&gt;&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Regular steps have &lt;code&gt;4096 MB&lt;/code&gt; of memory in total, large build steps (which you can define using &lt;code&gt;size: 2x&lt;/code&gt;) have &lt;code&gt;8192&lt;/code&gt; MB in total.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://support.atlassian.com/bitbucket-cloud/docs/use-services-and-databases-in-bitbucket-pipelines/&#34;&gt;ref&lt;/a&gt;,&#xA;&lt;a href=&#34;https://support.atlassian.com/bitbucket-cloud/docs/configure-bitbucket-pipelinesyml/#Configurebitbucket-pipelines.yml-ci_size&#34;&gt;ref&lt;/a&gt;&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;- &lt;span class=&#34;nt&#34;&gt;step&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;cp&#34;&gt;&amp;amp;turtle-build-android&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;    &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;name&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;l&#34;&gt;Build app bundle (.aab)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;3&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;    &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;image&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;l&#34;&gt;ubuntu:focal&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;4&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;    &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;size&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;l&#34;&gt;2x&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;c&#34;&gt;# Double resources available for this step.&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;5&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;    &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;caches&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;6&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;      &lt;/span&gt;- &lt;span class=&#34;l&#34;&gt;npm&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;7&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;    &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;script&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;8&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;      &lt;/span&gt;- &lt;span class=&#34;l&#34;&gt;echo &amp;#39;this is my step with 2x memory&amp;#39;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;get-the-commit-message-for-the-commit-that-triggered-the-pipeline&#34;&gt;Get the commit message for the commit that triggered the pipeline&lt;/h3&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nt&#34;&gt;pipelines&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;default&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;3&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;    &lt;/span&gt;- &lt;span class=&#34;nt&#34;&gt;step&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;4&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;        &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;script&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;5&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;          &lt;/span&gt;- &lt;span class=&#34;l&#34;&gt;COMMIT_MESSAGE=`git log --format=%B -n 1 $BITBUCKET_COMMIT`&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;6&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;          &lt;/span&gt;- &lt;span class=&#34;l&#34;&gt;echo $COMMIT_MESSAGE&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;a href=&#34;https://community.atlassian.com/t5/Bitbucket-Pipelines-questions/Commit-message/qaq-p/1202595&#34;&gt;ref&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Azure DevOps Getting Started</title>
      <link>https://aamnah.com/notes/devops/azure-devops/</link>
      <pubDate>Tue, 17 Mar 2020 00:00:01 +0500</pubDate>
      <guid>https://aamnah.com/notes/devops/azure-devops/</guid>
      <description>&lt;p&gt;Notes&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;You can only use Azure DevOps if the source repo is at Github or Azure DevOps (both Microsoft owned)&lt;/li&gt;&#xA;&lt;li&gt;How much do repos on Azure DevOps cost? Bitbucket costs us $28 for 8 users. That&amp;rsquo;s $3/user/month. Cheaper than Github. Azure Repos is free for first 5 users and then $6 per additional user. 8 users would cost us $18/month.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Costs&lt;/p&gt;&#xA;&lt;table&gt;&#xA;&#x9;&lt;thead&gt;&#xA;&#x9;&#x9;&#x9;&lt;tr&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;th&gt;&lt;a href=&#34;https://bitbucket.org/product/pricing&#34;&gt;Bitbucket&lt;/a&gt;&lt;/th&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;th&gt;&lt;a href=&#34;https://azure.microsoft.com/en-us/pricing/details/devops/azure-devops-services/&#34;&gt;Azure Repos&lt;/a&gt;&lt;/th&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;th&gt;&lt;a href=&#34;https://github.com/pricing&#34;&gt;Github&lt;/a&gt;&lt;/th&gt;&#xA;&#x9;&#x9;&#x9;&lt;/tr&gt;&#xA;&#x9;&lt;/thead&gt;&#xA;&#x9;&lt;tbody&gt;&#xA;&#x9;&#x9;&#x9;&lt;tr&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;First 5 users free, then $3/user/month&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;First 5 users free, then $6/user/month for subsequent users&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;First 3 users free, then $7/user/month&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&lt;/tr&gt;&#xA;&#x9;&lt;/tbody&gt;&#xA;&lt;/table&gt;</description>
    </item>
    <item>
      <title>14 days of DevOps</title>
      <link>https://aamnah.com/notes/devops/14-days-devops/</link>
      <pubDate>Tue, 17 Mar 2020 00:00:00 +0500</pubDate>
      <guid>https://aamnah.com/notes/devops/14-days-devops/</guid>
      <description>&lt;h3 id=&#34;background&#34;&gt;Background&lt;/h3&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;I have already setup CI/CD for a React Native project, it uses Bitbucket Pipelines and deploys to different release channels on Expo&lt;/li&gt;&#xA;&lt;li&gt;I have already setup CD for a .NET Corde project that deploys to AWS Elastic Beanstalk (EBS)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;I&amp;rsquo;m not entirely new to DevOps, and i&amp;rsquo;m entirely self-taught. Google and SlackOverflow are my best friends&lt;/p&gt;&#xA;&lt;p&gt;DevOps goals&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Fast time-to-market (TTM)&lt;/li&gt;&#xA;&lt;li&gt;Few production failures&lt;/li&gt;&#xA;&lt;li&gt;Immediate recovery from failures&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Automation leads to consistency and stability - code is built, tested and deployed the same way every time&lt;/p&gt;</description>
    </item>
    <item>
      <title>Deploy to separate Expo release channels based on Bitbucket feature branches</title>
      <link>https://aamnah.com/notes/devops/bitbucket-expo-feature-channel-deployments/</link>
      <pubDate>Wed, 26 Feb 2020 00:00:00 +0500</pubDate>
      <guid>https://aamnah.com/notes/devops/bitbucket-expo-feature-channel-deployments/</guid>
      <description>&lt;p&gt;What i need is to test multiple feature branches at the same time by deploying it to Expo. And i can&amp;rsquo;t be bothered with doing that manually.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;$BITBUCKET_BRANCH&lt;/code&gt; is &lt;a href=&#34;https://confluence.atlassian.com/bitbucket/variables-in-pipelines-794502608.html&#34;&gt;available&lt;/a&gt;, but it can not be used in custom pipelines (triggered from a commit) or used against tags. If you use it under the &lt;code&gt;branches:&lt;/code&gt; block, it&amp;rsquo;ll fail, because those are run on commits.&lt;/li&gt;&#xA;&lt;li&gt;You can only use it in a step that is manually triggered, inside a custom pipeline. Otherwise &lt;code&gt;$BITBUCKET_BRANCH&lt;/code&gt; is not set. It outputs nothing in &lt;code&gt;default:&lt;/code&gt; pipeline or &lt;code&gt;branches:&lt;/code&gt;  pipelines&lt;/li&gt;&#xA;&lt;li&gt;First step in a pipeline can not be &lt;a href=&#34;https://confluence.atlassian.com/bitbucket/run-pipelines-manually-861242583.html&#34;&gt;manually triggered&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;A trigger can only be executed if the previous step has successfully completed&lt;/li&gt;&#xA;&lt;li&gt;If you use &lt;strong&gt;git-flow&lt;/strong&gt; and have &lt;code&gt;/&lt;/code&gt; in branch names (e.g. &lt;code&gt;feature/profile&lt;/code&gt;), it will fail to work. Because &lt;em&gt;Release channel name can only contain lowercase letters, numbers and special characters . _ and -&lt;/em&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Here&amp;rsquo;s working code&lt;/p&gt;</description>
    </item>
    <item>
      <title>Bitbucket Pipelines: Overview and Notes</title>
      <link>https://aamnah.com/notes/devops/intro-bitbucket-pipelines/</link>
      <pubDate>Wed, 23 Oct 2019 16:30:01 +0500</pubDate>
      <guid>https://aamnah.com/notes/devops/intro-bitbucket-pipelines/</guid>
      <description>&lt;p&gt;So far i have used pipelines in 2 different projects. One is a .NET Core API that gets deployed to AWS Elastic Beanstalk and the other is a React Native app that gets deployed to Expo.&lt;/p&gt;&#xA;&lt;p&gt;Here&amp;rsquo;s the &lt;strong&gt;tl;dr&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Basically, you can use custom yaml files to describe what happens after you push code to your repository. Bitbucket will lift some instance and allocate computing power for you, for running the code you describe in the yaml, and you’re paying for the time it takes to run. You can also use some caching techniques to make sure you don’t download large libraries over and over again.&lt;/p&gt;&#xA;&lt;/blockquote&gt;</description>
    </item>
    <item>
      <title>Deploy a .NET Core API to AWS Elastic Beanstalk using Bitbucket Pipelines</title>
      <link>https://aamnah.com/notes/devops/dotnet-core-bitbucket-pipelines-aws-ebs/</link>
      <pubDate>Wed, 23 Oct 2019 16:30:00 +0500</pubDate>
      <guid>https://aamnah.com/notes/devops/dotnet-core-bitbucket-pipelines-aws-ebs/</guid>
      <description>&lt;ul&gt;&#xA;&lt;li&gt;Artifacts&lt;/li&gt;&#xA;&lt;li&gt;Repository Variables&lt;/li&gt;&#xA;&lt;li&gt;Elastic Beanstalk Pipe&lt;/li&gt;&#xA;&lt;li&gt;IAM Role&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Here is my &lt;code&gt;bitbucket-pipelines.yml&lt;/code&gt; file:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt; 1&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c&#34;&gt;# Pipelines to be updated later after it has been tested&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt; 2&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c&#34;&gt;# more code will follow&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt; 3&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nt&#34;&gt;image&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;l&#34;&gt;microsoft/dotnet:sdk&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt; 4&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt; 5&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nt&#34;&gt;pipelines&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt; 6&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;default&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt; 7&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;    &#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt; 8&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;    &lt;/span&gt;- &lt;span class=&#34;nt&#34;&gt;step&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt; 9&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;        &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;name&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;l&#34;&gt;Restore packages&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;10&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;        &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;caches&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;11&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;          &lt;/span&gt;- &lt;span class=&#34;l&#34;&gt;dotnetcore&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;12&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;        &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;script&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;13&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;          &lt;/span&gt;- &lt;span class=&#34;l&#34;&gt;dotnet restore&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;14&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;15&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;    &lt;/span&gt;- &lt;span class=&#34;nt&#34;&gt;step&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;16&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;        &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;name&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;l&#34;&gt;Build the project&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;17&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;        &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;caches&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;18&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;          &lt;/span&gt;- &lt;span class=&#34;l&#34;&gt;dotnetcore&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;19&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;        &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;script&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;20&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;          &lt;/span&gt;- &lt;span class=&#34;l&#34;&gt;dotnet build ${PROJECT_NAME}&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;21&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;22&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;    &lt;/span&gt;- &lt;span class=&#34;nt&#34;&gt;step&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;23&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;        &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;name&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;l&#34;&gt;Run Unit Tests&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;24&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;        &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;trigger&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;l&#34;&gt;manual&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;25&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;        &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;caches&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;26&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;          &lt;/span&gt;- &lt;span class=&#34;l&#34;&gt;dotnetcore&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;27&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;        &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;script&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;28&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;          &lt;/span&gt;- &lt;span class=&#34;l&#34;&gt;dotnet test ${PROJECT_UNITTESTS_NAME}&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;ul&gt;&#xA;&lt;li&gt;I&amp;rsquo;m automatically deploying the &lt;code&gt;production&lt;/code&gt; environment as soon as a change is pushed to &lt;code&gt;master&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;I&amp;rsquo;m adding a step to be able to manually trigger a deploy to &lt;code&gt;staging&lt;/code&gt; when &lt;code&gt;develop&lt;/code&gt; branch is updated. This is because &lt;code&gt;develop&lt;/code&gt; gets frequent changes and i don&amp;rsquo;t want to run out of my build minutes (free plan has 50mins/month) by triggering a deploy every time.&lt;/li&gt;&#xA;&lt;li&gt;For all other branches (&lt;code&gt;feature/*&lt;/code&gt; etc.) i&amp;rsquo;m adding the ability to manually trigger a build and not deploy anything. This is because i&amp;rsquo;m not expecting to build feature branches much as they are usually tested locally&lt;/li&gt;&#xA;&lt;li&gt;The variables are all defined under &lt;em&gt;Settings &amp;gt; Repository variables&lt;/em&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h3 id=&#34;iam-role&#34;&gt;IAM Role&lt;/h3&gt;&#xA;&lt;p&gt;Create the following policy in IAM&lt;/p&gt;</description>
    </item>
    <item>
      <title>Continuous Deployment for React Native app to Expo using Bitbucket Pipelines</title>
      <link>https://aamnah.com/notes/devops/deploy-expo-react-native-bitbucket-pipelines/</link>
      <pubDate>Wed, 23 Oct 2019 16:29:59 +0500</pubDate>
      <guid>https://aamnah.com/notes/devops/deploy-expo-react-native-bitbucket-pipelines/</guid>
      <description>&lt;ul&gt;&#xA;&lt;li&gt;Expo lets you deploy and test your app&lt;/li&gt;&#xA;&lt;li&gt;Bitbucket Pipelines lets you run commands in a Docker container&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h3 id=&#34;bitbucket-pipelinesyml&#34;&gt;&lt;code&gt;bitbucket-pipelines.yml&lt;/code&gt;&lt;/h3&gt;&#xA;&lt;p&gt;&lt;code&gt;bitbucket-pipelines.yml&lt;/code&gt; is the file that you need to commit to the root of your repo in order to enable Pipelines. I&amp;rsquo;d recommend going to the Pipelines page for your repo and generate one from there. It&amp;rsquo;ll commit it to your repo and you can edit the configuration later in your code editor.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
