<?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: Behnam Shomali</title>
    <description>The latest articles on DEV Community by Behnam Shomali (@behnam).</description>
    <link>https://dev.to/behnam</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F254475%2F8f62dd2f-3fd7-4c15-8fe4-a2cc67d13e02.jpeg</url>
      <title>DEV Community: Behnam Shomali</title>
      <link>https://dev.to/behnam</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/behnam"/>
    <language>en</language>
    <item>
      <title>How we cut ntilde's CI time by 60%</title>
      <dc:creator>Behnam Shomali</dc:creator>
      <pubDate>Sun, 01 Nov 2026 14:55:52 +0000</pubDate>
      <link>https://dev.to/behnam/how-we-cut-ntildes-ci-time-by-60-1pm5</link>
      <guid>https://dev.to/behnam/how-we-cut-ntildes-ci-time-by-60-1pm5</guid>
      <description>&lt;p&gt;A typical CI run for ntilde, a cross-platform terminal emulator, went from about 18.7 minutes to about 7 minutes over eight pull requests merged in one day. Every test still runs: each step was checked against the test counts of the run before it, on Windows and Linux. None of the changes was clever. Each one came from reading step timings, finding the next thing on the critical path, and asking why it was there.&lt;/p&gt;

&lt;h2&gt;
  
  
  CI time after each change
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F9541gh380ksspg4pnhiu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F9541gh380ksspg4pnhiu.png" alt="A waterfall chart: CI time starts at 18.7 minutes and falls with each change, by 2.5 minutes for #682, 4.8 for #694, nothing for #702, 1.4 for #704, 0.4 for #707, 0.6 for #710, 0.4 for #715 and 1.4 for #717, ending at 7.2 minutes, below a dashed line at half the starting time." width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;ntilde CI wall time per merged change, 1 November 2026. The start and #682–#704 are typical runs; #707–#717 are single measured runs (9m34s, 8m57s, 8m34s, 7m11s). Runs vary by 10–20 s.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Two changes did most of the work: caching the Rust libraries and sharding the tests. The others saved between 0.4 and 1.4 minutes each, and several of them removed whole kinds of setup from the test jobs, which keeps the next shard cheap to add.&lt;/p&gt;

&lt;p&gt;The last two steps need one note. #715 started the test shards two minutes earlier, but the run then waited on the Linux packaging job instead, so its whole-run saving only shows once #717 shortened that job.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where the time went
&lt;/h2&gt;

&lt;p&gt;CI's wall time is its critical path: the longest chain of jobs that wait on each other. For ntilde that chain was two jobs long, and both were slow on Windows.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Build (Windows), about 6.6 minutes.&lt;/strong&gt; Set up the .NET SDK and NuGet packages, compile the solution, upload the test outputs. Hidden inside &lt;code&gt;dotnet build&lt;/code&gt; was a full Rust compile of two native crates, because MSBuild targets call &lt;code&gt;cargo&lt;/code&gt; whenever the native libraries are missing.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Unit Tests (Windows), about 6 minutes of tests.&lt;/strong&gt; The headless App.Tests lane is about 7,200 tests that run strictly one after another, in one process, on one runner.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Everything else (packaging, coverage, Linux, macOS) either ran beside that chain or waited for the build too. So the work was simple to state: make the build job shorter, and make the test job shorter, without running fewer tests.&lt;/p&gt;

&lt;p&gt;The tool for finding the next fix was the same every time: step timestamps from the job logs. GitHub's job-level times were skewed by up to an hour in places, so we computed durations from each step's start and end instead.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1: stop rebuilding Rust on every run (&lt;a href="https://github.com/benyblack/ntilde/pull/682" rel="noopener noreferrer"&gt;#682&lt;/a&gt;)
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;18.7 → about 16.2 minutes.&lt;/strong&gt; ntilde's PTY and SSH layers are two Rust crates, compiled to native libraries that the .NET app loads. On every run, &lt;code&gt;dotnet build&lt;/code&gt; noticed the libraries were missing and compiled both crates from scratch, dependencies and all. The step was called "Build", so the Rust time hid inside it; it only showed up when someone read the Windows log line by line.&lt;/p&gt;

&lt;p&gt;The fix caches the finished libraries, not just Cargo's intermediate files:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A cache keyed on the OS plus a hash of both crates' sources, &lt;code&gt;Cargo.toml&lt;/code&gt; and &lt;code&gt;Cargo.lock&lt;/code&gt;. Change a line of Rust and the key changes; otherwise the libraries are restored as they were.&lt;/li&gt;
&lt;li&gt;A small script, &lt;code&gt;native-libs-present.sh&lt;/code&gt;, checks that every library the OS needs is present and non-empty. Only then does the build skip MSBuild's Rust targets. A half-restored cache falls back to building, never to a broken app.&lt;/li&gt;
&lt;li&gt;An explicit save step. Our first version saved the cache in the post-job phase, and post steps run in reverse order: the Rust cache action's own cleanup had already deleted one crate's output by the time ours saved. The cached payload was missing the SSH library. Saving as a normal step, right after the build, fixed it.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The lesson that stuck: when a step is slow, read what it actually runs. A tidy step name can cover two very different jobs.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2: split the slowest test lane into shards (&lt;a href="https://github.com/benyblack/ntilde/pull/694" rel="noopener noreferrer"&gt;#694&lt;/a&gt;)
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;About 16.2 → 11.4 minutes.&lt;/strong&gt; The App.Tests lane has to run serially inside one process: Avalonia's headless platform is process-wide state, and parallel test collections had caused hangs before. But nothing stops several processes from running on several runners. So the lane now runs as three shards per OS, each its own job.&lt;/p&gt;

&lt;p&gt;The risk with sharding is a test that quietly belongs to no shard and stops running. Three rules keep that from happening:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Shards are cut by namespace, and the last shard is the complement.&lt;/strong&gt; A script lists namespace prefixes for each shard; the final shard's filter is generated as "none of the above". A new namespace lands in that shard automatically.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The partition is tested.&lt;/strong&gt; A self-test evaluates every shard's real filter against every class declared in the test project, about 745 of them, plus edge cases like &lt;code&gt;CoreX&lt;/code&gt; (which must not match the &lt;code&gt;Core.&lt;/code&gt; prefix). It runs at the start of every shard job.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Every shard has a floor.&lt;/strong&gt; The existing gate already rejects a run that executes fewer tests than expected; this repo once had a run execute 1,112 of 3,434 tests and report green. Each shard now carries its own floor, measured count minus about 2%.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Two smaller changes rode along. A roll-up job, &lt;code&gt;Unit Tests (&amp;lt;os&amp;gt;)&lt;/code&gt;, gives branch protection one stable check name however the shards change. And the coverage job, which builds for itself, no longer waits for the build job at all.&lt;/p&gt;

&lt;p&gt;Sharding has a cost: every shard pays runner setup again, about 80 seconds on Windows. We stopped at three, because each extra shard buys less test time while paying that setup again in full.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3: fix the flaky tests the extra runs exposed (&lt;a href="https://github.com/benyblack/ntilde/pull/702" rel="noopener noreferrer"&gt;#702&lt;/a&gt;)
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;No time saved, but no time lost to re-runs either.&lt;/strong&gt; A faster CI gets run more, and more runs surfaced two tests that failed on timing, not on a bug. A red build that passes on re-run costs a whole CI cycle, so both were fixed at the cause, not retried or skipped.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;A 2-second deadline against a starved thread pool.&lt;/strong&gt; An SSH test waited up to 2 seconds for work the code under test starts with &lt;code&gt;Task.Run&lt;/code&gt;. While dozens of tests started at once, the thread pool had no free thread to start it, and the work began late. The deadline is now 30 seconds. It is only a cap: a passing test still returns the moment the condition holds.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A throughput benchmark judged on one sample.&lt;/strong&gt; It failed once at 1.73 MB/s against a 1.75 MB/s threshold, with no parser change, and passed on the next run. It now times three passes and keeps the fastest. A real regression slows every pass; a noisy neighbour on the runner slows only the pass it lands in. The threshold did not move.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Step 4: upload less (&lt;a href="https://github.com/benyblack/ntilde/pull/704" rel="noopener noreferrer"&gt;#704&lt;/a&gt;)
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;About 11.4 → 10.0 minutes; the Windows build job from about 6.6 to 5.0 minutes.&lt;/strong&gt; The build job uploads the compiled tests for the test jobs to download. On Windows that artifact was 774 MB, and the upload alone took about 71 seconds of the critical path.&lt;/p&gt;

&lt;p&gt;Most of it was other platforms. The build is RID-less, meaning it targets no single OS and CPU, so every test output folder carried native libraries for every platform the packages support: SkiaSharp, HarfBuzz and ANGLE for three Windows architectures, thirteen Linux variants and macOS. The Windows packages also ship native debug symbols beside their DLLs: 84 MB for SkiaSharp and 23 MB for HarfBuzz, per architecture.&lt;/p&gt;

&lt;p&gt;Every job that downloads the artifact runs on the same OS and CPU that built it, and .NET only loads native assets from that platform's own fallback chain (win-x64, then win; linux-x64, then linux, then unix). So a script now deletes every other platform's folder, and the native debug symbols, before the upload. It keeps the managed debug symbols, which are what put line numbers in a failing test's stack trace. Its tests check what must survive as carefully as what must go, because deleting too much fails a test job far from the cause.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;Before&lt;/th&gt;
&lt;th&gt;After&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Windows artifact&lt;/td&gt;
&lt;td&gt;774 MB&lt;/td&gt;
&lt;td&gt;130 MB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Upload time&lt;/td&gt;
&lt;td&gt;about 71 s&lt;/td&gt;
&lt;td&gt;about 12 s&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The same change moved about 40 seconds of Python script self-tests off the build job into a job of their own. They need neither the SDK nor the build, so they had no reason to sit on the critical path.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 5: run the tests, don't re-evaluate the projects (&lt;a href="https://github.com/benyblack/ntilde/pull/707" rel="noopener noreferrer"&gt;#707&lt;/a&gt;)
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;10m02s → 9m34s; the slowest Windows shard from 286 to 252 seconds.&lt;/strong&gt; Each shard job only runs tests the build job already compiled. Yet every shard restored a 1 GB NuGet package cache and ran &lt;code&gt;dotnet restore&lt;/code&gt;, about 35 seconds on Windows. The reason was one argument. &lt;code&gt;dotnet test &amp;lt;project folder&amp;gt;&lt;/code&gt; evaluates the project through MSBuild, and that fails without the restore output, even with &lt;code&gt;--no-build --no-restore&lt;/code&gt;. &lt;code&gt;dotnet test &amp;lt;path to the .dll&amp;gt;&lt;/code&gt; hands the compiled assembly straight to the test runner.&lt;/p&gt;

&lt;p&gt;Switching to the DLL form took "Setup .NET" from 37–39 seconds to 3–4 on the shards that no longer restore. Linux shards that run no shell-integration tests also skip an 11–18 second install of zsh and fish.&lt;/p&gt;

&lt;p&gt;Which shard needs what is not hard-coded in the workflow. The shard script reports &lt;code&gt;restore&lt;/code&gt; and &lt;code&gt;shells&lt;/code&gt; for each shard, worked out from the same filter that picks its tests, so moving tests between shards moves their setup too. Its self-test reads the source: any test class that runs &lt;code&gt;dotnet build&lt;/code&gt;, or spawns real shells, must land on a shard that sets that up.&lt;/p&gt;

&lt;h3&gt;
  
  
  The bug that fell out
&lt;/h3&gt;

&lt;p&gt;The first run of this change failed one test, on Linux only: &lt;code&gt;Path.GetFullPath("")&lt;/code&gt; in a test of the app's data folder. Nothing in that code had changed. What changed was that &lt;code&gt;dotnet restore&lt;/code&gt; no longer ran, and restore had been creating &lt;code&gt;~/.local/share&lt;/code&gt; as a side effect, for NuGet's HTTP cache.&lt;/p&gt;

&lt;p&gt;On Linux and macOS, &lt;code&gt;Environment.GetFolderPath(LocalApplicationData)&lt;/code&gt; returns an empty string when that folder does not exist. Every app-data root in the product was built on it, so on an account that never had &lt;code&gt;~/.local/share&lt;/code&gt;, the root silently became a relative &lt;code&gt;ntilde/&lt;/code&gt; folder in whatever directory the process started in. The app and its multiplexer daemon start in different directories, so they would look for each other in different places.&lt;/p&gt;

&lt;p&gt;The fix passes &lt;code&gt;SpecialFolderOption.DoNotVerify&lt;/code&gt; at all eight lookups, in five assemblies, so .NET returns the real path and the app creates it. It changes nothing when the folder already exists. A Linux test now points &lt;code&gt;XDG_DATA_HOME&lt;/code&gt; at a missing folder, and an architecture test fails if the old lookup comes back. CI had been hiding a real bug, and removing work from CI is what exposed it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 6: put build-checking tests where the build is (&lt;a href="https://github.com/benyblack/ntilde/pull/710" rel="noopener noreferrer"&gt;#710&lt;/a&gt;)
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;9m34s → 8m57s; the Windows shard jobs from 252 / 245 / 236 seconds to 189 / 182 / 195.&lt;/strong&gt; After Step 5, one shard still restored packages, for three tests. They check what a real &lt;code&gt;dotnet build&lt;/code&gt; produces: the App and the CLI answer &lt;code&gt;--vt-report&lt;/code&gt;, and the App's output carries the CLI as a named sidecar. In a shard, with no build state, each run compiled the App and its references from scratch. That was about 76 seconds of test time, plus the restore only that shard needed.&lt;/p&gt;

&lt;p&gt;The build job had just run that exact build. So those three tests now carry their own category and run there, straight after the build. An environment variable tells them to check the binaries the build produced instead of building again. Without it, on a developer machine or in any other lane, they build first, exactly as before. In the build job they take 7 seconds on Windows and 4 on Linux. The step also requires at least three results, because the test runner treats a filter that matches nothing as a pass.&lt;/p&gt;

&lt;p&gt;With that weight gone, the shards were rebalanced from measured per-namespace timings:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Shard&lt;/th&gt;
&lt;th&gt;Holds&lt;/th&gt;
&lt;th&gt;Tests&lt;/th&gt;
&lt;th&gt;Windows test step&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;assist-shell&lt;/td&gt;
&lt;td&gt;CommandAssist, Shell, Controls&lt;/td&gt;
&lt;td&gt;2,942&lt;/td&gt;
&lt;td&gt;149 s&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;core&lt;/td&gt;
&lt;td&gt;Core&lt;/td&gt;
&lt;td&gt;1,610&lt;/td&gt;
&lt;td&gt;132 s&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;rest&lt;/td&gt;
&lt;td&gt;everything else, plus the other test projects&lt;/td&gt;
&lt;td&gt;2,817 + 79&lt;/td&gt;
&lt;td&gt;142 s&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The timing report each shard prints now includes test counts per namespace, so a shard's floor comes from measurement, not an estimate. The counts were identical on Windows and Linux, and with the three build-job tests they total 7,372: exactly what the lane ran on the commit before this change.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 7: use the runner's SDK, and move analyzers out of the build (&lt;a href="https://github.com/benyblack/ntilde/pull/715" rel="noopener noreferrer"&gt;#715&lt;/a&gt;)
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;The Windows build job went from 306 to 180 seconds, and the test shards now start at 3m05s instead of about 5m10s.&lt;/strong&gt; One measurement run produced two findings:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The SDK was already there.&lt;/strong&gt; Every job restored a cached copy of the .NET SDK: 394 MB, about 19 s to unpack on Windows. The hosted images already ship SDK 10.0.403, and &lt;code&gt;global.json&lt;/code&gt; (10.0.400, &lt;code&gt;rollForward: latestPatch&lt;/code&gt;) accepts it. Jobs now check &lt;code&gt;dotnet --version&lt;/code&gt; first and install only when it doesn't resolve, so macOS, arm64 and future images still work. A cold install was no faster, at about 20 s.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Analyzers were 45% of the Windows compile.&lt;/strong&gt; A timing summary of the build showed 236 s of compile across 28 projects. Turning analyzers off in the Windows build took that step from 180 s to 98 s. They now run in their own &lt;code&gt;Analyzers&lt;/code&gt; job, in parallel with the build, and nothing waits on it. The roll-up check still requires it, so an analyzer warning still blocks the PR. A guard script also fails if the build skips analyzers while no other job runs them.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;One OS is enough for the analyzer job, because no project compiles differently per OS. At first the whole run barely moved, to 8m34s on main: with the tests now finishing earlier, the Linux packaging job had become the last thing to finish.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 8: cache the packaging job's Rust (&lt;a href="https://github.com/benyblack/ntilde/pull/717" rel="noopener noreferrer"&gt;#717&lt;/a&gt;)
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;The Linux Packaging dry run went from about 400 to 246 seconds, and the whole run from about 8.6 to 7.2 minutes.&lt;/strong&gt; That job builds inside an &lt;code&gt;ubuntu:22.04&lt;/code&gt; container on purpose: its glibc is the oldest Linux the .deb supports, so it can't reuse the build job's libraries. Its log showed &lt;code&gt;rusty_ssh&lt;/code&gt; compiling 164 crates from scratch on every run, about 60 s, because its Rust cache step listed only the other crate's folder.&lt;/p&gt;

&lt;p&gt;It now caches the two finished libraries under a key of its own, and on a hit skips installing Rust and cargo entirely. The rest of that run's drop came from a faster AOT publish (118 s against about 190 s), which varies from run to run.&lt;/p&gt;

&lt;h2&gt;
  
  
  What we'd tell another team
&lt;/h2&gt;

&lt;p&gt;Most of the eleven and a half minutes we saved came from work CI did that nobody had asked it to do. Six habits found it:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Time the critical path from step timestamps.&lt;/strong&gt; Job totals hide which step grew, and a job off the critical path can take as long as it likes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Read what a step actually runs.&lt;/strong&gt; Our "Build" step contained a full Rust compile.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Make coverage provable before you split tests.&lt;/strong&gt; A self-tested partition, a per-shard floor and identical counts across OSes are what let us move thousands of tests between jobs without losing one.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Don't pay for setup a job never uses.&lt;/strong&gt; Running the compiled test DLLs removed a 1 GB package restore from every shard but one; moving three tests then removed it from that one too.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Run each check where its inputs already are.&lt;/strong&gt; The upload carried other platforms' files; the build tests ran far from the build.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Treat a new failure after a CI change as a finding.&lt;/strong&gt; One red run in this series was a real product bug that CI's own setup had been hiding.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The next step would be the same loop: read the timings of the newest run, find the longest chain of jobs, and ask why each step in it is there.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published on the &lt;a href="https://benyblack.github.io/ntilde/blog/cut-ci-time-by-60-percent/" rel="noopener noreferrer"&gt;ntilde blog&lt;/a&gt;. ntilde is an open-source, cross-platform terminal emulator: &lt;a href="https://github.com/benyblack/ntilde" rel="noopener noreferrer"&gt;github.com/benyblack/ntilde&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>dotnet</category>
      <category>githubactions</category>
      <category>devops</category>
      <category>cicd</category>
    </item>
    <item>
      <title>AzureDevOps, Elixir, Docker, CI/CD, and the others — Part 2: Release and deploy.</title>
      <dc:creator>Behnam Shomali</dc:creator>
      <pubDate>Fri, 22 Nov 2019 13:01:15 +0000</pubDate>
      <link>https://dev.to/behnam/azuredevops-elixir-docker-ci-cd-and-the-others-part-2-release-and-deploy-3c09</link>
      <guid>https://dev.to/behnam/azuredevops-elixir-docker-ci-cd-and-the-others-part-2-release-and-deploy-3c09</guid>
      <description>&lt;p&gt;In the previous post (&lt;a href="https://dev.to/behnam/azuredevops-elixir-docker-ci-cd-and-the-others-part-1-docker-compose-and-testing-o1m"&gt;part1&lt;/a&gt;) I tried to use docker-compose doing build and test in AzureDevOps. The app is a &lt;a href="https://github.com/benyblack/elixir-phoenix-ci" rel="noopener noreferrer"&gt;hello world&lt;/a&gt; web site written in elixir and phoenix.&lt;/p&gt;

&lt;h2&gt;
  
  
  Goal
&lt;/h2&gt;

&lt;p&gt;The goal is to create a &lt;strong&gt;continuous deployment pipeline&lt;/strong&gt; to deploy our web app to an app service in azure by using &lt;strong&gt;releases&lt;/strong&gt; in elixir and a &lt;strong&gt;docker image&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;My todo list is to create and config these services:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Azure Container Registry&lt;/li&gt;
&lt;li&gt;Azure Postgres SQL Server&lt;/li&gt;
&lt;li&gt;Build &amp;amp; Push pipeline in AzureDevOps&lt;/li&gt;
&lt;li&gt;App service in Azure&lt;/li&gt;
&lt;li&gt;Deploy pipeline in AzureDevOps&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Azure
&lt;/h2&gt;

&lt;p&gt;First thing first, we need a &lt;strong&gt;container registry&lt;/strong&gt;. It will be used to store our Docker images. Let’s make one in the Azure portal.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fz2m1w5k2vgdyxy8pbas9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fz2m1w5k2vgdyxy8pbas9.png" alt="Alt Text" width="800" height="422"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Don’t forget to set the &lt;strong&gt;Admin user&lt;/strong&gt; to &lt;strong&gt;Enable&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fg8v7ern0z58mnqxvz676.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fg8v7ern0z58mnqxvz676.png" alt="Alt Text" width="800" height="892"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Where to put the database? hmmm! since we don’t use docker-compose here then we need to create a &lt;strong&gt;Postgres Server&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fj2jmpx4y17if588aim54.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fj2jmpx4y17if588aim54.png" alt="Alt Text" width="800" height="838"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The next step is to create a database. To be able to connect to your database, your IP has to be added to the &lt;strong&gt;Allowed list&lt;/strong&gt;. Do it in the &lt;strong&gt;Connection Security&lt;/strong&gt; section of your &lt;strong&gt;Postgres Server&lt;/strong&gt; page on &lt;strong&gt;Azure&lt;/strong&gt;. Also, enable &lt;strong&gt;Allow access to Azure services&lt;/strong&gt;, we need it later to be able to connect from our web app. An easy way to connect is by using &lt;strong&gt;pgAdmin&lt;/strong&gt;. Also, you can use psql in bash and connect with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;psql &lt;span class="nt"&gt;--host&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="k"&gt;**&lt;/span&gt;practicing&lt;span class="k"&gt;**&lt;/span&gt;.postgres.database.azure.com &lt;span class="nt"&gt;--port&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;5432 &lt;span class="nt"&gt;--username&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="k"&gt;**&lt;/span&gt;practiceadmin@practicing&lt;span class="k"&gt;**&lt;/span&gt; &lt;span class="nt"&gt;--dbname&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;postgres
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;And run the create database command:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;CREATE&lt;/span&gt; &lt;span class="k"&gt;DATABASE&lt;/span&gt; &lt;span class="n"&gt;practicingdb&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Since the &lt;strong&gt;app service&lt;/strong&gt; needs to be created based on an image, and wedon’t have it now, I’ll do it later.&lt;/p&gt;
&lt;h2&gt;
  
  
  ‌Build &amp;amp; Push
&lt;/h2&gt;

&lt;p&gt;Let’s back to our beloved AzureDevOps. I am going to deploy on &lt;strong&gt;Azure&lt;/strong&gt;, then I need to add &lt;strong&gt;Azure Container Registry&lt;/strong&gt; service connection in &lt;strong&gt;Project Setting&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fuyok5vrid6xefs6kzcvb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fuyok5vrid6xefs6kzcvb.png" alt="Alt Text" width="799" height="465"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Also, I need a Dockerfile to build our production image. This is a &lt;strong&gt;multistage&lt;/strong&gt; build docker file that uses the new &lt;strong&gt;Release&lt;/strong&gt; feature of ELixir 1.9. It results in a very smaller image, something like 35 MB vs 1.2 GB if we use &lt;strong&gt;Release&lt;/strong&gt;.&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;



&lt;p&gt;Create a new pipeline and in the &lt;strong&gt;Configure&lt;/strong&gt; step, select Docker. In the &lt;strong&gt;Review&lt;/strong&gt; step, go to the Docker task and hit &lt;strong&gt;Settings&lt;/strong&gt;. Make sure that your config is like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fv0ckvjmfvitwh5ywy0d4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fv0ckvjmfvitwh5ywy0d4.png" alt="Alt Text" width="800" height="700"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Hit &lt;strong&gt;Save and run&lt;/strong&gt;. When it got finished, check &lt;strong&gt;Repositories&lt;/strong&gt; in the Container Registry. You should see a new one there:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fzedpoyghmz4nkjfc957l.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fzedpoyghmz4nkjfc957l.png" alt="Alt Text" width="800" height="410"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Ok. It’s time to back to Azure Portal and create a new App Service.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fnsjpd2jylhsxnkg375s5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fnsjpd2jylhsxnkg375s5.png" alt="Alt Text" width="800" height="913"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fd5bvslnw1iixaywga7lt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fd5bvslnw1iixaywga7lt.png" alt="Alt Text" width="800" height="396"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then go to &lt;strong&gt;Review + create&lt;/strong&gt; and hit &lt;strong&gt;Create&lt;/strong&gt; button.&lt;/p&gt;

&lt;h2&gt;
  
  
  Environment Variables
&lt;/h2&gt;

&lt;p&gt;Before going further, there is something in the app that should be adjusted before going to deploy it. Let’s take a look at &lt;strong&gt;prod.exs&lt;/strong&gt; at the &lt;strong&gt;config&lt;/strong&gt; folder. It has a reference to &lt;strong&gt;prod.secret.exs&lt;/strong&gt; which contains the &lt;strong&gt;connection string&lt;/strong&gt; and &lt;strong&gt;secret_key_base&lt;/strong&gt;. Also, this file is excluded by &lt;strong&gt;.gitignore&lt;/strong&gt;. It is not a good idea to put this file in the source control. Instead, we can feed this data by &lt;strong&gt;Environment Variables&lt;/strong&gt;. First, replace the last import_config line of &lt;strong&gt;prod.exs&lt;/strong&gt; by this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight elixir"&gt;&lt;code&gt;&lt;span class="n"&gt;config&lt;/span&gt; &lt;span class="ss"&gt;:hello_world_ci&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="no"&gt;HelloWorldCiWeb&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="no"&gt;Endpoint&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;  
    &lt;span class="ss"&gt;secret_key_base:&lt;/span&gt; &lt;span class="no"&gt;System&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;get_env&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="err"&gt;“&lt;/span&gt;&lt;span class="no"&gt;SECRET_BASE_KEY&lt;/span&gt;&lt;span class="err"&gt;”&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="c1"&gt;# Configure your database&lt;/span&gt;
&lt;span class="n"&gt;config&lt;/span&gt; &lt;span class="ss"&gt;:hello_world_ci&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="no"&gt;HelloWorldCi&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="no"&gt;Repo&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; 
    &lt;span class="ss"&gt;username:&lt;/span&gt; &lt;span class="no"&gt;System&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;get_env&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"DB_USERNAME"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; 
    &lt;span class="ss"&gt;password:&lt;/span&gt; &lt;span class="no"&gt;System&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;get_env&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"DB_PASSWORD"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; 
    &lt;span class="ss"&gt;database:&lt;/span&gt; &lt;span class="no"&gt;System&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;get_env&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"DB_NAME"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; 
    &lt;span class="ss"&gt;hostname:&lt;/span&gt; &lt;span class="no"&gt;System&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;get_env&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"DB_HOST"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; 
    &lt;span class="ss"&gt;pool_size:&lt;/span&gt; &lt;span class="mi"&gt;15&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Go to your App Service page and find Configuration in Settings. Add the above keys and needed values. Database related values can be found in the Postgres page in the portal. Don’t forget to hit the save button.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fjv6io7ez5mhghhyfshvf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fjv6io7ez5mhghhyfshvf.png" alt="Alt Text" width="799" height="411"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;(Please read this section carefully. There are some tricks for using &lt;strong&gt;elixir releases&lt;/strong&gt;). Everything looks good but if you deploy your web app now you would realize that the app is unable to read the environment variables! No kidding! The reason is when the release build is used, it evaluates env variables for the prod config file at &lt;strong&gt;build time&lt;/strong&gt; and never calls them again at &lt;strong&gt;run time&lt;/strong&gt;. There is a good solution for it. You can add a file in the config folder named releases.exs and it will be used in the release build and will be able to read environment variables at runtime. Remove config items, like DB connection string and secret key from &lt;strong&gt;prod.exs&lt;/strong&gt; and move them to &lt;strong&gt;releases.exs&lt;/strong&gt;. Then you will be able to use &lt;strong&gt;System.fetch_env!&lt;/strong&gt; as normal.&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;



&lt;p&gt;If you didn’t commit and push your last changes, do it and let the pipeline build it. When finished, click on &lt;strong&gt;Release&lt;/strong&gt;. Here we go for the release pipeline.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Faamd1b6c6sttpj8pd1f7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Faamd1b6c6sttpj8pd1f7.png" alt="Alt Text" width="800" height="327"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;From the right pan, select &lt;strong&gt;Azure App Service deployment&lt;/strong&gt; and &lt;strong&gt;Apply&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Faaaqs2wx8jchb06401z5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Faaaqs2wx8jchb06401z5.png" alt="Alt Text" width="800" height="297"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next, go on Tasks tab, Select &lt;strong&gt;Stage 1&lt;/strong&gt; and in the right panel click on &lt;strong&gt;Unlink all&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fhyzx40futwvo4gwz69c6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fhyzx40futwvo4gwz69c6.png" alt="Alt Text" width="798" height="194"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Click on Deploy Azure App Service in the left and fill the right panel as shown in this (some values may be different in your account):&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F0274f7rdrspvgff1hwck.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F0274f7rdrspvgff1hwck.png" alt="Alt Text" width="800" height="676"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After clicking on the &lt;strong&gt;Save&lt;/strong&gt; button, hit the &lt;strong&gt;Create Release&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fzqn2m4h2fh0d5zlrt6uo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fzqn2m4h2fh0d5zlrt6uo.png" alt="Alt Text" width="800" height="777"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Fill it like above and hit &lt;strong&gt;Create&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;In this step, I am going to change a file and then see the result on the website. Go to &lt;strong&gt;lib&amp;gt;hello_world_ci_web&amp;gt;templates&amp;gt;page&amp;gt;index.html.eex&lt;/strong&gt; and add this line somewhere to be seen later:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;MIX_ENV: &lt;span class="nt"&gt;&amp;lt;b&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="err"&gt;%=&lt;/span&gt; &lt;span class="na"&gt;System.get_env&lt;/span&gt;&lt;span class="err"&gt;(“&lt;/span&gt;&lt;span class="na"&gt;MIX_ENV&lt;/span&gt;&lt;span class="err"&gt;”)&lt;/span&gt; &lt;span class="err"&gt;%&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Commit and push it and wait until the Build pipeline finishes its work. Immediately, the Release pipeline should start.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fwhiplognl8w91fn04jyn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fwhiplognl8w91fn04jyn.png" alt="Alt Text" width="800" height="564"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Wait until it finishes its job.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fd6extbuy0g68ufpn6x2t.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fd6extbuy0g68ufpn6x2t.png" alt="Alt Text" width="799" height="461"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Wait a bit and refresh the website:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fxwkhbam6xtakp18rpd2v.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fxwkhbam6xtakp18rpd2v.png" alt="Alt Text" width="800" height="426"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Awesome! That’s it. It may seem complicated but trust me, it’s easier than it seems. What about the next part? In the next post, I will try to deploy the app on Kubernetes.&lt;/p&gt;

</description>
      <category>continuousdeployment</category>
      <category>azure</category>
      <category>docker</category>
      <category>elixir</category>
    </item>
    <item>
      <title>AzureDevOps, Elixir, Docker, CI/CD, and the others - Part 1: docker-compose and testing.</title>
      <dc:creator>Behnam Shomali</dc:creator>
      <pubDate>Fri, 08 Nov 2019 13:49:47 +0000</pubDate>
      <link>https://dev.to/behnam/azuredevops-elixir-docker-ci-cd-and-the-others-part-1-docker-compose-and-testing-o1m</link>
      <guid>https://dev.to/behnam/azuredevops-elixir-docker-ci-cd-and-the-others-part-1-docker-compose-and-testing-o1m</guid>
      <description>&lt;h2&gt;
  
  
  The Problem
&lt;/h2&gt;

&lt;p&gt;Elixir is a new player in the market, and the tooling is not as comprehensive as the others like C# and Java. When I started learning Elixir, I had some questions like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Where to host it?&lt;/li&gt;
&lt;li&gt;How to build and test it in a CI style?&lt;/li&gt;
&lt;li&gt;How to deploy it on Azure?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The immediate answer was to have a VM on Azure, but that's not an affordable solution. Fortunately, nowadays the main problem is solved by using docker for development and deployment. In this post, I will share a simple solution to using AzureDevOps for the CI part of the development and in a follow-up article, I will cover the CD part. If you want to check out the code, here is the repo: &lt;a href="https://github.com/benyblack/elixir-phoenix-ci" rel="noopener noreferrer"&gt;https://github.com/benyblack/elixir-phoenix-ci&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;One of the most popular approaches to website creation in Elixir is by using Phoenix. To set it up using &lt;a href="https://gist.github.com/benyblack/f3c0e44fa8f796e95644da0bfbb4c6ff" rel="noopener noreferrer"&gt;this&lt;/a&gt; gist. The credentials for the &lt;strong&gt;Postgres server&lt;/strong&gt; exist in &lt;strong&gt;dev.exs&lt;/strong&gt; in the config folder. If your credentials are different, you can change them in the script Have a look at the final result in the following:&lt;/p&gt;


&lt;div class="ltag_asciinema"&gt;
  
&lt;/div&gt;


&lt;p&gt;Navigate to &lt;a href="http://localhost:4000" rel="noopener noreferrer"&gt;http://localhost:4000&lt;/a&gt;, and you will see something like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ffvphrb0aqyqhfk9kdefx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ffvphrb0aqyqhfk9kdefx.png" alt="Alt Text" width="800" height="538"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now that we have a working code, then we can think about the build and test part. To begin, let's try to do it locally with Docker.&amp;nbsp;&lt;/p&gt;

&lt;p&gt;First, we need a docker file:&lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;p&gt;Build and run it by these commands:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker build &lt;span class="nt"&gt;-t&lt;/span&gt; benyblack/helloworldci &lt;span class="nb"&gt;.&lt;/span&gt;
docker run &lt;span class="nt"&gt;--rm&lt;/span&gt; &lt;span class="nt"&gt;-p&lt;/span&gt; 4000:4000 benyblack/helloworldci
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Navigate to &lt;a href="http://localhost:4000" rel="noopener noreferrer"&gt;http://localhost:4000&lt;/a&gt;, and you should get see a working web site, albeit one with lots of connection errors in the console. It's time to use docker-compose magic. The config file for docker-compose is rather simple:&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;



&lt;p&gt;Furthermore, we need to change the database &lt;strong&gt;hostname&lt;/strong&gt; in &lt;strong&gt;test.exs&lt;/strong&gt;. Change the &lt;strong&gt;hostname&lt;/strong&gt; to &lt;strong&gt;database&lt;/strong&gt;. Then run this command to build and run our tests:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker-compose up &lt;span class="nt"&gt;--abort-on-container-exit&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;There we have it! You should see the result at the end of the console messages:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fgfutitpygk2wfrdh26ll.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fgfutitpygk2wfrdh26ll.png" alt="Alt Text" width="800" height="172"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Continuous Integration
&lt;/h2&gt;

&lt;p&gt;That's it! It's now ready to be used in AzureDevOps. We need to connect our GitHub and DockerHub account to the project in the AzureDevOps project settings section. Go to the &lt;strong&gt;Project Settings&lt;/strong&gt; at the bottom left side of the page and then select &lt;strong&gt;Service connections&lt;/strong&gt; and hit "&lt;strong&gt;+ New service connection&lt;/strong&gt;". From the list select &lt;strong&gt;Github&lt;/strong&gt;. It is necessary to give access to our code on Github.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F50kibphztb3jka9ff57b.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F50kibphztb3jka9ff57b.png" alt="Alt Text" width="800" height="962"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F6z3iyegmcjdtv9scgtmq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F6z3iyegmcjdtv9scgtmq.png" alt="Alt Text" width="799" height="498"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Do the same for DockerHub to connect your public repositories to the project, except select &lt;strong&gt;Docker Registery&lt;/strong&gt; this time. We'll use it later for using docker-compose.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2sr40dfq5ydslsiicckq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2sr40dfq5ydslsiicckq.png" alt="Alt Text" width="642" height="888"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fx5ptrrb550sbg1uee5uy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fx5ptrrb550sbg1uee5uy.png" alt="Alt Text" width="800" height="660"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The next step is to create a Pipeline. Go to &lt;strong&gt;Pipelines&lt;/strong&gt; from the main menu. Select &lt;strong&gt;Github&lt;/strong&gt; from the list.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fc96afiatx4lwptd5kyjw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fc96afiatx4lwptd5kyjw.png" alt="Alt Text" width="800" height="498"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Hit &lt;strong&gt;Next&lt;/strong&gt; and select &lt;strong&gt;Existing Azure pipelines YAML file&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fsphlnhriynopigh2fxsd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fsphlnhriynopigh2fxsd.png" alt="Alt Text" width="800" height="770"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A popup should appear from the right. Select the config file we have created.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fng9q2msv6wle4iey572f.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fng9q2msv6wle4iey572f.png" alt="Alt Text" width="800" height="537"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then, you can adjust the config by hitting the setting link or editing it manually. If your DockerHub connection name is not the same as mine, you'll have to change it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F7c61iq8h8vltbyv9bx8y.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F7c61iq8h8vltbyv9bx8y.png" alt="Alt Text" width="799" height="271"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ft7n7zczsyj6ur17bljcg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ft7n7zczsyj6ur17bljcg.png" alt="Alt Text" width="800" height="525"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Finally, hit the &lt;strong&gt;Run&lt;/strong&gt; button at the top left of the page.&lt;/p&gt;

&lt;p&gt;You should see something like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fzshfzjmgintpk9le6lxw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fzshfzjmgintpk9le6lxw.png" alt="Alt Text" width="800" height="1109"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;At long last, we have to have some green lights. However, there is one more step; publishing the test result. The problem is that AzureDevOps can't parse the test result from the &lt;strong&gt;mix test&lt;/strong&gt;. The solution is to apply a &lt;strong&gt;Formatter&lt;/strong&gt; for the test result. In this case, I chose to use &lt;a href="https://github.com/victorolinasc/junit-formatter" rel="noopener noreferrer"&gt;JUnitFormatter&lt;/a&gt;. It exports the result to an XML file. Using the library is pretty straightforward. I appended this section in my &lt;strong&gt;test.exs&lt;/strong&gt; in the config folder:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Configure publishing test result&lt;/span&gt;
&lt;span class="s"&gt;config :junit_formatter,&lt;/span&gt;
&lt;span class="na"&gt;report_file&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;“report_file_test.xml”,&lt;/span&gt;
&lt;span class="na"&gt;report_dir&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;“./”,&lt;/span&gt;
&lt;span class="na"&gt;print_report_file&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="s"&gt;,&lt;/span&gt;
&lt;span class="s"&gt;prepend_project_name?&lt;/span&gt;&lt;span class="err"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Moreover, we need to add a test publishing step to our pipeline. Go to the build menu and select Edit to edit the pipelines. From the right panel, select &lt;strong&gt;Publish Test Result&lt;/strong&gt; and set the &lt;strong&gt;testResultsFiles&lt;/strong&gt; to '&lt;strong&gt;**/hello_world_ci-report_file_test.xml&lt;/strong&gt;'. Click &lt;strong&gt;Add&lt;/strong&gt;. It should look like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fej3vrck9uo9yfgy2yqa6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fej3vrck9uo9yfgy2yqa6.png" alt="Alt Text" width="800" height="790"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Save it and run it again. You should see something like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fuoqbie6g7298gslf0geh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fuoqbie6g7298gslf0geh.png" alt="Alt Text" width="800" height="248"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Go to the &lt;strong&gt;Tests&lt;/strong&gt; tab. Your Tests tab should be the same as mine:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fh7ctms30wxsvqdkj45qb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fh7ctms30wxsvqdkj45qb.png" alt="Alt Text" width="798" height="194"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Voilà! That's it! Pretty simple. In an &lt;a href="https://dev.to/behnam/azuredevops-elixir-docker-ci-cd-and-the-others-part-2-release-and-deploy-3c09"&gt;upcoming post&lt;/a&gt;, I am going to do the &lt;strong&gt;CD&lt;/strong&gt; part.&lt;/p&gt;

</description>
      <category>elixir</category>
      <category>phoenix</category>
      <category>cicd</category>
      <category>azuredevops</category>
    </item>
  </channel>
</rss>
