Understanding DevOps Pipelines to Build Effective Workflows
Published: 2021-05-12 10:10:44

---
title: Understanding DevOps Pipelines to Build Effective Workflows
published: true
description:In the fast-moving world today, no one has the patience to wait for months and years to get a new mobile app or softwares. 
tags: 
canonical_url: https://www.pcloudy.com/blogs/understanding-devops-pipelines-to-build-effective-workflows/
//cover_image: https://direct_url_to_image.jpg
---
<img src="https://www.pcloudy.com/wp-content/uploads/2021/05/DevOps-Pipelines.png">
In the fast-moving world today, no one has the patience to wait for months and years to get a new mobile app or softwares. Gone are the days when developers took a long time to develop a software program or app. With the rise in the technologies and tools, software development and application building has taken a new direction. Companies are now focused on catering to the millions of consumers who have turned to their smartphones to perform some of their day to day tasks. The boon of social media and networking applications have made it possible for people to connect with anyone and everyone from anywhere. eCommerce is another field that has changed the way we shop, look for groceries, etc. Overall the mobile app industry has made it easy to do lives in a much faster and efficient way. The app industry thrives on speed and agility, And one of the ways in which apps are being built fast and released is because of <a href="https://www.pcloudy.com/mobile-devops-agile-challenges-and-keys-to-success/">practice of DevOps</a> and other strategies in app development firms.

<h2><b>What is DevOps?</b></h2>
Many app development firms and companies are already familiar with the term – “DevOps”. In simple language, it is the coming together of the Development and Operations teams in an organization to speed up the release of apps and updates. Be it for mobile, tablets or web-based computer systems, organizations are <a href="https://www.pcloudy.com/7-steps-to-use-mobile-devops-tools-efficiently/">implementing DevOps</a> practices to automate and speed up the release cycle of apps and updates. Before we define what DevOps is, we need to understand what it is not so that we arrive at its true definition. DevOps is not a tool, it is not a technology or software, it is not even a programming language that people can take a course on or acquire knowledge about from technical books.

<a href="https://www.pcloudy.com/pcloudys-devops-journey-lessons-learnt-while-scaling-up/">DevOps is a philosophy</a>, it is a mindset and a cultural shift that organizations are adopting in order to speed up timelines of app releases in the market. App development firms have realized that in order to stand out in the market one needs to deliver fast in a highly competitive app world. DevOps was implemented to bridge the gap between the development and operations teams to address the bottlenecks that stand in the way. One of the major reasons for the delay in releases was that teams worked in silos, however, adopting the practice of DevOps has brought teams to work together, and oftentimes even enabled team-members to swap tasks with each other to meet the requirements of customers. It literally means uniting the Development & Operations teams, processes, and technology to gain the ability to respond better to customer needs, increase confidence in the applications they build, and achieve business goals faster.

<h2>What is a DevOps Pipeline?</h2>
DevOps pipeline is a set of practices, tools & technology that Development and Operations teams implement to build, test and deploy mobile apps faster and easier. The primary focus of the pipeline is to keep the software development process lean, organized, and focused.

In the software development lifecycle, the developers write the code for their mobile applications and ensure that it does not bring any regressions or crash in the application. This process involves different stages of testing practices to find the defects. Post that the mobile applications are deployed/released. This whole journey of Build, Test & Deploy is what we attribute to DevOps Pipeline. <a href="https://www.pcloudy.com/continuous-integration-with-jenkins/">Continuous Integration (CI)</a>, Continuous Delivery (CD), Continuous Development & <a href="https://www.pcloudy.com/continuous-testing-for-mobile-apps-on-real-devices-new-world-paradigm/">Continuous Testing</a> are the different components that constitute a DevOps Pipeline.

<h2>Understanding CI/CD Pipeline in DevOps</h2>
There are two ways to create the pipeline, users can create different Jenkins jobs for their needs and interlink those jobs to run one after the other, after getting a successful execution. This is the traditional way of creating a pipeline. On the other hand, one can create a job and insert or append the pipeline as per the requirement of the project. The disadvantage of this approach is that all these jobs will be available on CI tools. If one has to move from this tool to another or make a copy for another pipeline, it will be difficult. To address this issue and bring modularity, the second approach of creating a pipeline using the groovy script is getting popular. The biggest advantage of this approach is that a user can create a simple script of these jobs and can keep these groovy scripts in the repository. DevOps engineers can then create or copy multiple pipelines by simply creating one single job on CI tool and fetch the groovy script from the repository.

Using simple illustrations, we have shown below both the approaches.

In this example we have considered a small pipeline flow.

Build Android mobile app -> Upload the apk file to pCloudy-> Run smoke tests on mobile devices-> Run regression tests on mobile devices

The implementation stack:

<li>Github as a version control</li>
<li><a href="https://www.pcloudy.com/blogs/using-jenkins-as-your-go-to-ci-cd-tool/">Jenkins as a CI tool</a></li>
<li>pCloudy as a Test tool to run the automation on <a href="https://www.pcloudy.com/test-apps-real-devices-using-cool-plugins/">REAL Mobile devices</a></li>
<li>SML DevOps Pipeline</li>
<img src="https://www.pcloudy.com/wp-content/uploads/2021/05/sml.png">
<h2>Job 1:</h2>
The Android mobile app code is fetched from github

It gets built on the build machine using Gradle

After a successful building of the app, the artifacts like .apk files will be stored in build folders
<img src="https://www.pcloudy.com/wp-content/uploads/2021/05/buildjob1.png">
<img src="https://www.pcloudy.com/wp-content/uploads/2021/05/buildjob2.png">
<img src="https://www.pcloudy.com/wp-content/uploads/2021/05/buildjob3-1024x469.png">



<h2>Job 2:</h2>
After successful app building, the android application (.apk) file needs to be uploaded to pCloudy’s cloud location

Check if the same name application is available on the cloud location.

If the app is present then delete that app & upload the new app.

If the app is not present already then upload the new app.

<img src="https://www.pcloudy.com/wp-content/uploads/2021/05/upload-test.png">
<img src="https://www.pcloudy.com/wp-content/uploads/2021/05/upload-test2.png">

<h2>Job 3:</h2>
After successfully uploading the app to the cloud drive, fetch the smoke test code from github to execute the smoke test on multiple mobile devices

<img src="https://www.pcloudy.com/wp-content/uploads/2021/05/smoke-testing-1024x555.png">
<img src="https://www.pcloudy.com/wp-content/uploads/2021/05/post-build-action-1-1024x313.png">
 
<h2>Job 4:</h2>
After successful execution, run the regression test suite on multiple mobile devices

<img src="https://www.pcloudy.com/wp-content/uploads/2021/05/regression-testing-1024x503.png">

Here is a view of the pipeline from Jenkins

<img src="https://www.pcloudy.com/wp-content/uploads/2021/05/pipeline-jobs.png">
 
Similarly we can use the groovy script to reduce the manual efforts of creating multiple jobs on different platforms, or toolsets. Once the script is written, the same can be used with any CI tool by simply creating a single job or fetching the same details from a repository in the CI tool.

<img src="https://www.pcloudy.com/wp-content/uploads/2021/05/pipeline-1024x473.png">
<img src="https://www.pcloudy.com/wp-content/uploads/2021/05/pipeline2.png">

<h2>Conclusion</h2>
Understanding the practical aspects of creating DevOps Pipelines help organizations to implement better workflows for improved test execution. Testing communities have seen a stark improvement in the release cycles from the implementing DevOps pipelines and automation. Implementing DevOps in organizations that are involved in App development is surely going to benefit in a big way. While the progress we are witnessing seems to put us on the fast lane of progress, the best is yet to come. We have attached another helpful whitepaper that covers the practical aspects of Mobile DevOps in-depth, you can use the link below to download your free copy and to gain more knowledgeable insights about the same. Happy Testing!