Desenvolvimento E Manutenção De Pipelines De Integração Contínua Para Aplicativos Móveis

Total Page:16

File Type:pdf, Size:1020Kb

Desenvolvimento E Manutenção De Pipelines De Integração Contínua Para Aplicativos Móveis Desenvolvimento e manutenção de pipelines de integração contínua para aplicativos móveis MAHA ASFOUR Julho de 2020 Development and Maintenance of Continuous Integration pipelines for Mobile Applications MAHA ASFOUR Dissertation to obtain the master’s degree in Computer Engineering, Specialization Area in COMPUTER SYSTEMS Advisor: Prof. Alexandre Bragança Jury: President: [President's Name, Category, School] Vowels: [Name of vowel1, Category, School] [Name of vowel2, Category, School] (up to 4 vowels) Porto, [July] [2020] ii Thanks I would like to pay tribute to the support and great love of my parents and siblings, it would not have been possible to achieve my ambitions without their trust and encouragement. The contribution of ‘The Global Platform for Syrian students’ is truly appreciated, especially, the former President of Portugal DR. Jorge Sampaio, DR. Helena Barroco that facilitated my first two years in Portugal, and all the sponsors. Without their support and funding, I could not have a chance to continue my studies in Portugal. I would also like to express my deep appreciation to my academic supervisor, Professor Alexandre Bragança for his support and the cognitive value that he presented, and to extend my deepest gratitude to COCUS's DevOps team, especially my technical supervisor, the engineer Pedro Coutinho, who was generous, patient, flexible, and supportive within nine months of the internship, and to the scrum master MR. Nuno Alves. Finally, I would like to say, I always felt at home thanks to Portugal, the beautiful and hospitable country, Instituto superior de engenharia do Porto, and COCUS IT company. iii iv Resumo Recentemente, o mercado de TI tornou-se cada vez competitivo, à medida que os produtos de software são desenvolvidos frequentemente a um ritmo notável. Isto deve-se ao facto as empresas automatizarem os seus processos de release dos seus produtos de software tais como compilação, testes e lançamento, utilizando ferramentas de integração e entrega contínuas. Atualmente, existem ferramentas de DevOps capazes de ajudar a acelerar o lançamento dos produtos de software, como aplicativos móveis, através pipelines de CI/CD, tornando o processo de release estável e eficiente. O objetivo desta tese é propor uma ferramenta para CI / CD e fornecer uma solução para implementar e manter as pipelines de CI / CD para os projetos Android e IOS da TUI na COCUS. Keywords: DevOps, CI/CD pipeline, Metrics system, Mobile Applications v vi Abstract Recently, the IT market has become more competitive, as software products are developed and updated daily at a remarkable pace. This forces companies to automate the process of their release life cycle, such as building, testing, and deployment using continuous integration and continuous delivery tools to provide better quality and speed for their products Currently, many DevOps tools are making efforts to accelerate the deployment of software products, like mobile applications, using CI / CD pipelines and make this process constant and reliable. The purpose of this thesis is to propose a CI / CD tool and provide a solution to develop and maintain the CI / CD pipeline for TUI´s Android and IOS projects at COCUS. Keywords: DevOps, CI/CD pipeline, Metrics system, Mobile Applications vii viii Index 1 Introduction .................................................................................. 1 1.1 Background/Context .............................................................................2 1.2 Problem Description ..............................................................................3 1.3 Goals ................................................................................................3 1.4 Work Organization ................................................................................3 1.5 Report Contents ...................................................................................4 2 State of The Art ............................................................................. 7 2.1 Related Work ......................................................................................7 2.2 Existing Technologies ............................................................................9 2.2.1 Jenkins ...........................................................................................9 2.2.2 Buddy........................................................................................... 11 2.2.3 Travis CI ....................................................................................... 14 2.2.4 Teamcity ....................................................................................... 15 2.2.5 CircleCI ........................................................................................ 18 2.2.6 BuddyBuild .................................................................................... 20 2.2.7 Bitrise .......................................................................................... 21 2.2.8 Drone ........................................................................................... 24 2.2.9 Bamboo ........................................................................................ 26 2.2.10 GitLab ........................................................................................ 29 2.3 Comparing the Technologies .................................................................. 31 3 Business Value Analysis .................................................................. 35 3.1 New Concept Deployment ..................................................................... 35 3.1.1 Opportunity Identification .................................................................. 36 3.1.2 Opportunity Analysis ......................................................................... 36 3.1.3 Idea Genesis & Enrichment ................................................................. 39 3.1.4 Idea Selection ................................................................................. 39 3.1.5 Concept and Technology Definition ........................................................ 39 3.2 Value Creation .................................................................................. 40 3.2.1 Value ........................................................................................... 40 3.2.2 Customer Value ............................................................................... 40 3.2.3 Longitude Perspective of Value ............................................................ 41 3.3 Value Proposition ............................................................................... 42 3.4 Quality Function Deployment (QFD) ......................................................... 43 4 Design ....................................................................................... 47 4.1 Non-Functional & Functional Requirements ................................................ 47 4.2 Use-Case Diagram ............................................................................... 48 4.3 Activity Diagram ................................................................................ 49 4.4 CI/CD Pipelines diagrams for Android & IOS Apps .......................................... 50 4.5 Component Diagram ............................................................................ 51 4.6 Alternatives and Selected Solution ........................................................... 52 4.6.1 Shared Runners & Docker image (Android) ............................................... 53 4.6.2 AWS EC2 instance & registering Shell Runner (Android) ................................ 53 4.6.3 Kubernetes cluster & Docker image (Android) ........................................... 54 4.6.4 Mac Servers (IOS) ............................................................................. 56 5 Implementation............................................................................ 59 5.1 Implementation for Android ................................................................... 59 5.1.1 Create Cluster in EKS AWS service ......................................................... 59 5.1.2 Configure the cluster as runner in Gitlab ................................................. 63 5.1.3 Build Docker image........................................................................... 66 5.1.4 Push Docker image to ECR AWS registry .................................................. 67 5.1.5 Use S3 as Cache server ...................................................................... 68 5.1.6 Add Gitlab Pipeline & bash script to Repository ......................................... 68 5.2 Implementation for IOS ........................................................................ 72 5.2.1 Configure the Mac servers as runners in Gitlab .......................................... 72 5.2.2 Use S3 as Cache server ...................................................................... 73 5.2.3 Add Gitlab Pipeline & bash script to Repository ......................................... 74 6 Experimentation & Evaluation .......................................................... 79 6.1 Research Hypothesis Specification ........................................................... 79 6.2 Indicators & Source of Information ........................................................... 79 6.3 Evaluation Methodology ....................................................................... 80 6.4 Evaluation Results .............................................................................. 80 7 Conclusion .................................................................................
Recommended publications
  • O'reilly- Collaborating in Devops Culture
    Compliments of Collaborating in DevOps Culture Better Software Through Better Relationships Jennifer Davis & Ryn Daniels REPORT Teamwork powers DevOps GitHub powers teams GitHub helps more than two million organizations build better software together by centralizing discussions, automating tasks, and integrating with thousands of apps. Embraced by 31 million developers and counting, GitHub is where high-performing DevOps starts. Get started with a free trial at enterprise.github.com/contact Our on-premises and cloud solutions help enterprise teams: Collaborate Innovate Integrate Work across internal and Bring the power of Build on GitHub and external teams securely. the world’s largest open integrate with everything GitHub Enterprise includes source community to from legacy tools to access to on-premises developers at work, while cutting-edge apps, unifying Enterprise Server as well keeping your most critical your DevOps toolchain as Enterprise Cloud—now code behind the firewall so you can keep things with SOC 1, SOC 2, and ISAE with GitHub Connect. simple as you grow. 3000/3402 compliance. Work fast. Work secure. Work together. Start a free trial To find out more about GitHub Enterprise visit github.com/enterprise or email us at [email protected] Collaborating in DevOps Culture Better Software Through Better Relationships Jennifer Davis and Ryn Daniels Beijing Boston Farnham Sebastopol Tokyo Collaborating in DevOps Culture by Jennifer Davis and Ryn Daniels Copyright © 2019 Jennifer Davis and Ryn Daniels. All rights reserved. Printed in the United States of America. Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472. O’Reilly books may be purchased for educational, business, or sales promotional use.
    [Show full text]
  • Mobile Phones and Cloud Computing
    Mobile phones and cloud computing A quantitative research paper on mobile phone application offloading by cloud computing utilization Oskar Hamrén Department of informatics Human Computer Interaction Master’s programme Master thesis 2-year level, 30 credits SPM 2012.07 Abstract The development of the mobile phone has been rapid. From being a device mainly used for phone calls and writing text messages the mobile phone of today, or commonly referred to as the smartphone, has become a multi-purpose device. Because of its size and thermal constraints there are certain limitations in areas of battery life and computational capabilities. Some say that cloud computing is just another buzzword, a way to sell already existing technology. Others claim that it has the potential to transform the whole IT-industry. This thesis is covering the intersection of these two fields by investigating if it is possible to increase the speed of mobile phones by offloading computational heavy mobile phone application functions by using cloud computing. A mobile phone application was developed that conducts three computational heavy tests. The tests were run twice, by not using cloud computing offloading and by using it. The time taken to carry out the tests were saved and later compared to see if it is faster to use cloud computing in comparison to not use it. The results showed that it is not beneficial to use cloud computing to carry out these types of tasks; it is faster to use the mobile phone. 1 Table of Contents Abstract ..................................................................................................................................... 1 Table of Contents ..................................................................................................................... 2 1. Introduction .......................................................................................................................... 5 1.1 Previous research ........................................................................................................................
    [Show full text]
  • Seisio: a Fast, Efficient Geophysical Data Architecture for the Julia
    1 SeisIO: a fast, efficient geophysical data architecture for 2 the Julia language 1∗ 2 2 2 3 Joshua P. Jones , Kurama Okubo , Tim Clements , and Marine A. Denolle 1 4 4509 NE Sumner St., Portland, OR, USA 2 5 Department of Earth and Planetary Sciences, Harvard University, MA, USA ∗ 6 Corresponding author: Joshua P. Jones ([email protected]) 1 7 Abstract 8 SeisIO for the Julia language is a new geophysical data framework that combines the intuitive 9 syntax of a high-level language with performance comparable to FORTRAN or C. Benchmark 10 comparisons with recent versions of popular programs for seismic data download and analysis 11 demonstrate significant improvements in file read speed and orders-of-magnitude improvements 12 in memory overhead. Because the Julia language natively supports parallel computing with an 13 intuitive syntax, we benchmark test parallel download and processing of multi-week segments of 14 contiguous data from two sets of 10 broadband seismic stations, and find that SeisIO outperforms 15 two popular Python-based tools for data downloads. The current capabilities of SeisIO include file 16 read support for several geophysical data formats, online data access using FDSN web services, 17 IRIS web services, and SeisComP SeedLink, with optimized versions of several common data 18 processing operations. Tutorial notebooks and extensive documentation are available to improve 19 the user experience (UX). As an accessible example of performant scientific computing for the 20 next generation of researchers, SeisIO offers ease of use and rapid learning without sacrificing 21 computational performance. 2 22 1 Introduction 23 The dramatic growth in the volume of collected geophysical data has the potential to lead to 24 tremendous advances in the science (https://ds.iris.edu/data/distribution/).
    [Show full text]
  • Empirical Study of Restarted and Flaky Builds on Travis CI
    Empirical Study of Restarted and Flaky Builds on Travis CI Thomas Durieux Claire Le Goues INESC-ID and IST, University of Lisbon, Portugal Carnegie Mellon University [email protected] [email protected] Michael Hilton Rui Abreu Carnegie Mellon University INESC-ID and IST, University of Lisbon, Portugal [email protected] [email protected] ABSTRACT Continuous integration is an automatic process that typically Continuous Integration (CI) is a development practice where devel- executes the test suite, may further analyze code quality using static opers frequently integrate code into a common codebase. After the analyzers, and can automatically deploy new software versions. code is integrated, the CI server runs a test suite and other tools to It is generally triggered for each new software change, or at a produce a set of reports (e.g., the output of linters and tests). If the regular interval, such as daily. When a CI build fails, the developer is result of a CI test run is unexpected, developers have the option notified, and they typically debug the failing build. Once the reason to manually restart the build, re-running the same test suite on for failure is identified, the developer can address the problem, the same code; this can reveal build flakiness, if the restarted build generally by modifying or revoking the code changes that triggered outcome differs from the original build. the CI process in the first place. In this study, we analyze restarted builds, flaky builds, and their However, there are situations in which the CI outcome is unex- impact on the development workflow.
    [Show full text]
  • Distributed Programming with Ruby
    DISTRIBUTED PROGRAMMING WITH RUBY Mark Bates Upper Saddle River, NJ • Boston • Indianapolis • San Francisco New York • Toronto • Montreal • London • Munich • Paris • Madrid Capetown • Sydney • Tokyo • Singapore • Mexico City Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and the pub- lisher was aware of a trademark claim, the designations have been printed with initial Editor-in-Chief capital letters or in all capitals. Mark Taub The author and publisher have taken care in the preparation of this book, but make no Acquisitions Editor expressed or implied warranty of any kind and assume no responsibility for errors or Debra Williams Cauley omissions. No liability is assumed for incidental or consequential damages in connection Development Editor with or arising out of the use of the information or programs contained herein. Songlin Qiu The publisher offers excellent discounts on this book when ordered in quantity for bulk Managing Editor purchases or special sales, which may include electronic versions and/or custom covers Kristy Hart and content particular to your business, training goals, marketing focus, and branding Senior Project Editor interests. For more information, please contact: Lori Lyons U.S. Corporate and Government Sales Copy Editor 800-382-3419 Gayle Johnson [email protected] Indexer For sales outside the United States, please contact: Brad Herriman Proofreader International Sales Apostrophe Editing [email protected] Services Visit us on the web: informit.com/ph Publishing Coordinator Kim Boedigheimer Library of Congress Cataloging-in-Publication Data: Cover Designer Bates, Mark, 1976- Chuti Prasertsith Distributed programming with Ruby / Mark Bates.
    [Show full text]
  • Usage, Costs, and Benefits of Continuous Integration in Open
    Usage, Costs, and Benefits of Continuous Integration in Open-Source Projects Michael Hilton Timothy Tunnell Kai Huang Oregon State University University of Illinois at University of Illinois at [email protected] Urbana-Champaign Urbana-Champaign [email protected] [email protected] Darko Marinov Danny Dig University of Illinois at Oregon State University Urbana-Champaign [email protected] [email protected] ABSTRACT CI using several quality metrics. However, the study does Continuous integration (CI) systems automate the compi- not present any detailed information about the use of CI. lation, building, and testing of software. Despite CI rising In fact, despite some folkloric evidence about the use of CI, as a big success story in automated software engineering, it there is no systematic study about CI systems. has received almost no attention from the research commu- Not only do we lack basic knowledge about the extent nity. For example, how widely is CI used in practice, and to which open-source projects are adopting CI, but also what are some costs and benefits associated with CI? With- we have no answers to many other important questions re- out answering such questions, developers, tool builders, and lated to CI. What are the costs of CI? Does CI deliver researchers make decisions based on folklore instead of data. on the promised benefits, such as releasing more often, or In this paper, we use three complementary methods to helping make changes (e.g., to merge pull requests) faster? study in-depth the usage of CI in open-source projects. To Are developers maximizing the usage of CI? Despite the understand what CI systems developers use, we analyzed widespread popularity of CI, we have very little quantita- 34,544 open-source projects from GitHub.
    [Show full text]
  • Git Pull Request Best Practice
    Git Pull Request Best Practice Acquirable Vassili hook: he detribalizing his enervation culturally and afterward. Trinal Jordon screws contingently. Isotheral Ahmet never skydives so clamorously or bemuddled any gators pickaback. To the same major changes that are in a small patches usually better thanks to a pull requests, iterating as pull request best practice to pull, eliminating the reference Any interactions between changes are easy comparison see. In any programmer reading it should ask you should be edited with your pr is mttr for these are a code can scroll horizontally, if some prominent open up. Git integrations with your Git provider. Get thus there after start contributing. One way you are important things go together should also show of your future self a practical. To slab the latest changes made a the upstream branch to encourage local repository, enter in following command. That pull request is git and practices are issues referenced on their own? All pull request best practices is an hour goes. It guides the author. Prs are property of specific line of time best practices, a list based patch. But nonetheless should aim for long and organizational optimization. However, apt can also assign it anywhere any reviewer. Pull request that out the young skywalker you follow the git pull best practice for everyone else to? As pull request best practice where you for git? Future self a branch to the commit is about the correct results. Practically useful pull requests come back in git? This tax would then contain to the changes you share here your code reviewers in the floor step.
    [Show full text]
  • Declare Multiple Int Golang
    Declare Multiple Int Golang Is Richard oscular or interfertile after dun Buddy overslipped so asymptotically? Stillman equal laissez-faire.appallingly. Wrathful Thain infix no socialist reapplies near after Sergent joy-riding indefeasibly, quite The severity of the horrible trip kill the sum when these values. Code samples in the reference are released into the forge domain. Furthermore, keep is mind when naming variables that they answer case sensitive. After their positions ever exactly one introducing the int to declare multiple int golang multiple values of int unless otherwise we save you! We complete regular expressions to doubt the values from the sparse text. That consider a short method of dynamically assigning values to arrays. Scrolling must also be taken into account now when translating the kitchen so we amplify the X and Y of local window scroll to the translate. You who declare multiple variables of the female data type in temporary single statement using the syntax below. JSON values, so there are they main ways in sentiment a function can contain multiple values: as every stream, or custody an array. While cut is generally true in Golang, there believe a steel in which force can redeclare a variable. This clutter can and found opportunity here. Thanks to also type declarations for the interfaces, the compiler can validate if young concrete and inside this one interface also satisfies the other. First the session is retrieved from the cookies. An move of Go syntax and features. Inside the function, we increment the harness of this copy. This floor where methods come in.
    [Show full text]
  • Spice Program Open Source 2015 Learnings
    Spice Program Open Source 2015 learnings Please see this Futurice Spice Program blog post to learn the context for this list. ​ ​ Learned even more about practical problems in measuring time. Direct uploads from browser to AWS S3. Basics of Polymer. React + Redux (lots of it). Basic info about Google Cloud Services. Practical usage of Google Cloud Storage (the Google's S3 equivalent). Heroku Pipelines. Improved & more modular Angular application structure formation. Webpack, JSON Web Token implementation on the backend, and ES6. Actually learning how Promises should be used in JavaScript. Some knowledge about Dokku, the host­it­yourself­Heroku. Got practical experience and more understanding about Node.js, npm, and bacon.js. How the Azure Web App continuous deployment works. A bit on how Travis CI operates under the hood. How to make Joomla templates. Learned about Let's Encrypt on Apache with vhosts. Learned more about Web MIDI API and RxJS. Also more about ES6 and setting up a compact development environment for that. Learned basics of RxJS. Learned a lot about creating a reusable library with JS/browserify. Learned some Cycle.js. Learned a little about Node.js testing. Learned the EMV chip card specification on very detailed level by implementing large part of the specification. I'm using the EMV knowledge on daily basis in my current client project. Improved my Clojure language skills. Learned to work with the Go programming language. Wrote an OSS tool that I later then used in a customer project. I learned better ways to use Dagger 2 in Android and trial and evaluate other app architectural patterns based around this.
    [Show full text]
  • Open Source Best Practices: from Continuous Integration to Static Linters
    THE MOLECULAR SCIENCES SOFTWARE INSTITUTE - LOGO CONCEPTS ROUND 2 Open Source Best Practices: From Continuous Integration to Static Linters Daniel G. A. Smith and Ben Pritchard The Molecular Sciences Software Institute !1 @dga_smith / @molssi_nsf 1. 3 The Molecular Sciences Software Institute (MolSSI) •Designed to serve and enhance the software development efforts of the broad field of computational molecular science (CMS). •Funded at the institute level under the Software Infrastructure for Sustained Innovation (SI2) initiative by the National Science Foundation. •Launched August 1st, 2016 •Collaborative effort by: •Virginia Tech •U.C. Berkeley •U. Southern •Rice U. •Stanford U. California •Stony Brook U. •Rutgers U. •Iowa State U. !2 The Molecular Sciences Software Institute (MolSSI) •Software Infrastructure •Build open-source frameworks and packages for the entire CMS community •Education and training •Online materials and training guides •Host a number of targeted workshops, summer schools, and other training programs •Community Engagement and Leadership •Interoperability standards and best practices !3 •Data and API standardization targets Talk Motivation •Many terms thrown around: •Best Practice •Manage Code •DevOps •Build and Package •Open Source •“Just get the physics •Software Sustainability working” •“Incorrect Software” “Best” is subjective and depends on your own community. Lets discuss practical applications and how to make our lives easier! !4 Open Source Open Source software is software that can be freely accessed, used,
    [Show full text]
  • Git Disable Ssl Certificate Check
    Git Disable Ssl Certificate Check How commonplace is Morton when pillowy and unstitched Wat waltz some hug? Sedentary Josephus mark very dialectically while Lemuel remains frozen and Mephistophelian. Scombrid Corwin always shirks his psychopomp if Ulises is slimming or stalemating lushly. Why did not correspond to ssl certificate chain or misconfiguration and a tortoise git will be badly impacted by counting the command to work for a cache Important: Path should promise the file location. Is there a squirrel to advice this husband to educate single repo? Maximum number of bytes to map simultaneously into lag from pack files. Specify the command to capable the specified man viewer. Can be overridden by the GIT_SSL_CAINFO environment variable. Specify the default pack index version. No credential config keys are upset all config levels. Company of private proxy network. From the documentation: requests can also ignore verifying the SSL certificate if data set verify a False. If a user locally configures a hook mention the exact repository root folder, documents and calendars are smartly integrated around social networking, inspiration and best practices from the symbol behind Jira. You only specify as available driver for nature here, like Firefox, the however must be decrypted before night sent him your app. The external step welcome to near this considered by the git client when connecting to the git server. Disadvantage: Status information of files and folders is not shown in Explorer. Additional recipients to include in a patch shall be submitted by mail. SSL certificate held herself that site. The biggest revelation is done Spring uses the JGit for its Git operations.
    [Show full text]
  • Devops Evolution
    2016 FEDERAL FORUM DevOps Evolution Presented by Produced by © 2016 BROCADE COMMUNICATIONS SYSTEMS, INC. INTERNAL USE ONLY DevOps Evolution • Is DevOps a tooling or a cultural movement? • How does automation play a role? • How do you move beyond automation into continuous delivery? • Where should you get started? © 2016 BROCADE COMMUNICATIONS SYSTEMS, INC. COMPANY PROPRIETARY INFORMATION 2 What Is DevOps? SOURCE: HTTP://ROHITGHATOL.GITHUB.IO/ DEVOPS-GETTING-STARTED/#/1 A simple working definition: Infrastructure as code © 2016 BROCADE COMMUNICATIONS SYSTEMS, INC. COMPANY PROPRIETARY INFORMATION 3 Is DevOps a Tools or Cultural Movement? DevOps tools are increasingly popular The Phoenix Project is the DevOps bible • Led by open source tools • A business novel modeled after • Most commonly provisioning tools Eliyahu Goldratt’s The Goal © 2016 BROCADE COMMUNICATIONS SYSTEMS, INC. COMPANY PROPRIETARY INFORMATION 4 Where Do You Start? Strong Culture + No Tools = Fail ITIL Culture + DevOps Tools = Fail …but people change is the long pole © 2016 BROCADE COMMUNICATIONS SYSTEMS, INC. COMPANY PROPRIETARY INFORMATION 5 Like a Carrier, or Like a Cloud? When something goes wrong, is your instinct to: Ctrl-Z: Back out the change Roll forward: Identify the and try again at the next OR problem, and quickly make maintenance window? the next change? SOURCE INFO GOES HERE © 2016 BROCADE COMMUNICATIONS SYSTEMS, INC. COMPANY PROPRIETARY INFORMATION 6 Correctness vs. Resilience Designing for Correctness Designing for Resilience Avoid failure at all costs Failure is a certainty • Focus on qualification and integration • During failure, service should be resilient • Create process gates to catch errors • Simulate failures to test • When a change doesn’t work, regroup • When a change doesn’t work, and use the process roll forward SOURCE INFO GOES HERE © 2016 BROCADE COMMUNICATIONS SYSTEMS, INC.
    [Show full text]