<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Engin CAN on Medium]]></title>
        <description><![CDATA[Stories by Engin CAN on Medium]]></description>
        <link>https://medium.com/@engincancan?source=rss-3f3b7a62e937------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*b6ab-_k_Q2BH2OlpJBGkNA.jpeg</url>
            <title>Stories by Engin CAN on Medium</title>
            <link>https://medium.com/@engincancan?source=rss-3f3b7a62e937------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 18:40:27 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@engincancan/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Implementing Android CI/CD pipeline at Armut]]></title>
            <link>https://medium.com/armut-dev-blog/implementing-android-ci-cd-pipeline-at-armut-68ebe14e33b7?source=rss-3f3b7a62e937------2</link>
            <guid isPermaLink="false">https://medium.com/p/68ebe14e33b7</guid>
            <category><![CDATA[continuous-delivery]]></category>
            <category><![CDATA[continuous-integration]]></category>
            <category><![CDATA[engineering]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[automated-build]]></category>
            <dc:creator><![CDATA[Engin CAN]]></dc:creator>
            <pubDate>Fri, 16 Nov 2018 08:19:50 GMT</pubDate>
            <atom:updated>2018-11-16T08:21:55.765Z</atom:updated>
            <content:encoded><![CDATA[<p>Before start talking about Continuous Integration let’s check the definition.</p><blockquote>Continuous Integration (CI) is a development practice that requires developers to integrate code into a shared repository several times a day. Each check-in is then verified by an automated build, allowing teams to detect problems early.</blockquote><blockquote>By integrating regularly, you can detect errors quickly, and locate them more easily.</blockquote><p>When we talk about Android, publishing <a href="https://en.wikipedia.org/wiki/Android_application_package">APKs</a> to the <strong>Play Store</strong> besides to the build and test, you need the sign the apks, navigate to the <strong>Play Store</strong> upload the APK and upload the deobfuscation file for tracing the crash logs more accurately.</p><p>The key point was creating a pipeline that can be changed or updated by time but the idea of having a pipeline will remain.</p><p>At that point, we need to choose between a self-hosted or a cloud solution.</p><blockquote>If you are self-hosting your CI/CD systems, you will be responsible for making infrastructure decisions, keeping the underlying servers healthy by servicing hardware and patching software, and ensuring the services are available, secure, and performing adequately. This is a large scope of additional responsibility that may fall outside of your team’s expertise and beyond what you’re able to budget time for.</blockquote><p>A cloud solution looked easier to integrate and there is no cost for maintenance. Therefore, <a href="https://circleci.com/">CircleCI</a> appears to be better solution for three reasons:</p><ul><li><a href="https://hub.docker.com/r/circleci/"><em>Docker Images</em></a><em> for Android Build maintained by CircleCI itself.</em></li><li><a href="https://circleci.com/docs/2.0/workflows/"><em>Workflows</em></a><em>: Fan-out to run multiple jobs in parallel and Holding a Workflow for a Manual Approval</em></li><li><a href="https://circleci.com/pricing/"><em>Pricing</em></a>: <em>For Linux</em>, <strong>The First Container Is Free</strong></li></ul><p>Since there are resources for connecting your <a href="https://circleci.com/docs/2.0/gh-bb-integration/">VCS to the CircleCI</a> and <a href="https://circleci.com/docs/2.0/language-android/">integrating your Android project</a> I will not mention these topics in this article.</p><p>After we decided to use CircleCI, We gave the necessary permission for one of our git repositories. As we run many different tests on <a href="https://play.google.com/store/apps/details?id=com.armut.armutha">Armut Customer app</a>, we have decided to start implementation with <a href="https://play.google.com/store/apps/details?id=com.armut.armuthv">Armut Pro App</a>. Configured the necessary <strong>yml</strong> file with the <a href="https://circleci.com/docs/2.0/language-android/#sample-configuration">default template</a>. After a couple of unsuccessful builds, we got a successful build for debug builds. Yay!.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/788/1*WYr0duSLkK6O1H7VT844QQ.png" /><figcaption>Successful build for Debug version APK</figcaption></figure><p>Now we need a release build which requires aliases for signing key and private key for the sign to apk with it. We put the secret keys in environment variables. For the private key to protect the file from a bit more secure we encrypt the file with Aes-256 algorithm and put the decryption key to the environment variable and we were able to create first release build waiting to upload <strong>Play Store</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/793/1*nyW4b-OvutA_9ah1P-n_Gg.png" /></figure><p>At this point, “Google Play Developer API” can do anything a user wants once they granted permission from an Owner Account. So we created a service account with following the “<a href="https://en.wikipedia.org/wiki/Principle_of_least_privilege">principle of least<strong> </strong>privilege</a>”.</p><blockquote>Then <a href="https://github.com/Triple-T/gradle-play-publisher"><strong>Gradle Play Publisher</strong></a> joined the game. “Gradle Play Publisher is a Gradle plugin that allows you to upload your App Bundle or APK and other app details to the Google Play Store.” Which has a very detailed documentation for getting “Google Play Developer API” key and implementation details.</blockquote><pre>//build.gradle<br>dependencies {<br>        classpath(&quot;com.github.triplet.gradle:play-publisher:1.2.2&quot;)<br>}</pre><pre><br>//app.gradle<br>apply plugin: &#39;com.android.application&#39;<br>apply plugin: &#39;com.github.triplet.play&#39;</pre><pre>play {<br>    jsonFile = file(&quot;../signing/key.json&quot;)<br>    track = &#39;alpha&#39;<br>}</pre><p>With a couple of code change, we were able to ready to deploy our apk to play store via the plugin.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UEo8EGDCKji6eWNo03OUaQ.png" /><figcaption>Basic workflow configuration looks like this (config.yml)</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RBnPujQAG8owBE4fWKkpMA.png" /><figcaption>Hold task until manually approved</figcaption></figure><p>Sometimes, we can come across with different scenarios and I need to add manual approve to launch features together. Once, I have added the <strong>manual approve</strong>, I was wondering how other projects were implemented to auto-deploy feature to their projects. I saw some projects deploys to Play Store using version tags and some other projects puts a comment message with some static texts when they merging to master like <strong>Deploy Play Store</strong>. It looked more appropriate to use manual approve for now. But in the future It might change according to our needs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/796/1*YXBxTOyzjN2e9ymW3VTm1A.gif" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=68ebe14e33b7" width="1" height="1" alt=""><hr><p><a href="https://medium.com/armut-dev-blog/implementing-android-ci-cd-pipeline-at-armut-68ebe14e33b7">Implementing Android CI/CD pipeline at Armut</a> was originally published in <a href="https://medium.com/armut-dev-blog">Armut Labs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>