2. ● State of the art: CI /CD
○ Motivation
○ Configuration Management
○ CI / CD
○ Tools
○ Main features for Android projects
● Bitrise
○ Workflows
○ Steps
○ Gradle (Compile - Run tests)
○ Triggers
○ Webooks
● Live Sample
○ Setup
○ Triggering unit tests check
○ Builds
○ Tips & tricks / Lessons learned
● Further work
Agenda
6. CMMI - Software Engineering Institute
Configuration Management:
Coordinate, approve and implement
changes to build and maintain soft systems
7. CMMI - Basic support process areas
Process area that supports all process
areas by establishing and maintaining
the integrity of work products.
Completeness, correctness, and consistency of items.
➢Revise the status and history of
each configuration item as
necessary.
➢Review the structure and integrity of
items in the configuration
management system.
8. CMMI - Engineering process areas
➢ Generating an integration strategy
➢ Integrating product components
➢ Delivering the product to the customer
32. To be continued...
➢ Advanced Bitrise from zero to hero
➢ Code coverage
➢ Lint / Spotless
➢ SonarQube
➢ Automated UI tests with Espresso / Appium
➢ Optimizing Gradle
➢ Google Play Store
➢ Mastering Configuration Management
33. TL;DR
Do wonderful things
Don’t wait wonderful things to happen
Si el hacha pierde su filo, y no se vuelve a afilar,
hay que golpear con más fuerza.
El éxito radica en la acción sabia y bien ejecutada.
(Eclesiastes 10.10)
Desarrollar apps impecables y geniales es el ideal que suele volverse utópico cuando el mercado, reglas de negocio y pretensiones de clientes/usuarios son tan cambiantes. Esto ha impuesto a las metodologías agile como un requisito. Pero en este contexto muchas veces nos vemos obligados a hacer las cosas a las apuradas arriesgándonos a que algo de lo que ya funcionaba se rompa. Estamos a un bug de distancia de quedar como un duque o decepcionar a los usuarios de la app. Es así que hay que apuntar a una deteccion temprana de bugs y crashes. Todo esto se vuelve cada vez mas complejo cuando hay mas de dos desarrolladores trabajando en un mismo code base. Como dice la celebre frase "Muchas manos en el plato hacen garabato", es decir si no se hace una integración cuidadosa de lo que cada dev ha trabajado se pueden causar daños serios.
En particular cuando se trata de apps no esta bueno para los usuarios esperar mucho para actualizaciones y hay que evitar los potenciales cuellos de botella que pueden surgir por perder el control de la integración y delivery.
Existe una práctica de ingeniería que pretende garantizar todo esto, denominada Continuous Integration and Delivery. Hoy disponemos de herramientas para aplicar esta practica, ayudando a enfocarse en el desarrollo propiamente dicho y no tener que estar pendiente de estos factores para tener todo bajo control. Bitrise ha sido desarrollada por mobile devs y para mobile devs
Planteo: 2 devs desarrollan determinada feature en 4 semanas
Entonces se puede decir que 4 devs pueden desarrollar exactamente la misma feature en 2 semanas (?)
Modelo del ideal (utopico?) de procesos de ingeniería
CM refiere a la disciplina para la gestion de la evolucion de sistemas de soft complejos.
Consiste en evaluar, coordinar, aprobar e implementar cambios en artefactos que son usados para construir y mantener sistemas de software.
Changes to baselines and the release of work products built from the configuration management system are systematically controlled and monitored.
In Agile environments, configuration management (CM) is important because of the need to support frequent change, frequent builds (typically daily), multiple baselines, and multiple teams. (producir deliveries temprano y agregar valor a los clientes)
Automatically alerting relevant stakeholders when items are checked in or out or changed, or of decisions made regarding change requests.
The Product Integration process area contains the specific practices associated with generating an integration strategy, integrating product components, and delivering the product to the customer.
CI is the practice of merging all developer working copies to a shared mainline several times a day. (poder detectar fallos cuanto antes)
CD is a software engineering approach in which teams produce software in short cycles, ensuring that the software can be reliably released at any time. It aims at building, testing, and releasing software with greater speed and frequency.
https://www.thoughtworks.com/continuous-integration
https://sdtimes.com/cicd/developers-using-ci-cd-report-finds/
Integration is primarily about communication, so you want to ensure that everyone can easily see the state of the system and the changes that have been made to it. Integration allows developers to tell other developers about the changes they have made. Frequent communication allows people to know quickly as changes develop.
The whole point of continuous integration is to find problems as soon as you can. Nightly builds mean that bugs lie undetected for a whole day before anyone discovers them. Once they are in the system that long, it takes a long time to find and remove them.
Conflicts that stay undetected for weeks can be very hard to resolve.
conflicts are particularly awkward bugs to find if they sit for a long time undetected in the code.
Frequent commits encourage developers to break down their work into small chunks of a few hours each. This helps track progress and provides a sense of progress.
A key part of doing a continuous build is that if the mainline build fails, it needs to be fixed right away. The whole point of working with CI is that you're always developing on a known stable base. It's not a bad thing for the mainline build to break, although if it's happening all the time it suggests people aren't being careful enough about updating and building locally before a commit. When the mainline build does break, however, it's important that it gets fixed fast.
A phrase I remember Kent Beck using was "nobody has a higher priority task than fixing the build". This doesn't mean that everyone on the team has to stop what they are doing in order to fix the build, usually it only needs a couple of people to get things working again. It does mean a conscious prioritization of a build fix as an urgent, high priority task.
The whole point of Continuous Integration is to provide rapid feedback.
Make it Easy for Anyone to Get the Latest Executable
Demasiada teoria por hoy
Trasciende modas, plataformas
Curriculum
No es solo para Devops
Una misma herramienta puede aplicar todo este modelo (En conjunto con CVS)
https://www.gocd.org
Cruise (una de las primeras)
Jenkins ha sido la herramienta por excelencia durante años sobre todo en el mundo Java
Hoy esta siendo suplantado por mas modernas herramientas open source PaaS
Elegimos Bitrise porque su logo es mas feliz?
Support all services and all the third-party service integrations you know and love
Basta que falle un step para que toda la ejecución del workflow sea fallida
Mientras se esta en rojo puede introducirse otro nuevo issue el cual sera mas dificil de rastrear y resolver
Tareas atomicas + plugins
Demo time
Demo time
Autoincrement app version name
Gradle OOM
Optimizar worflows y gradle (Ej: Test funcionales por cada PR)
Steps up-to-date
Double check for misspelling
Always green (trust lost)
Steps source code
Environment variables
First Local then server