SlideShare a Scribd company logo
CI/CD on Android project via
Jenkins Pipeline
Veaceslav Gaidarji
Android Department Manager @ Ellation
1
About
Android department manager
Open-source and Jenkins enthusiast
Certified Jenkins Engineer
2
Agenda
VRV Android - project info
Jenkins old to new
Jenkins Shared Library
Testing Jenkins Pipeline code
What went wrong
Pros/Cons
3
Agenda
VRV Android - project info
Jenkins old to new
Jenkins Shared Library
Testing Jenkins Pipeline code
What went wrong
Pros/Cons
4
Agenda
VRV Android - project info
Jenkins old to new
Jenkins Shared Library
Testing Jenkins Pipeline code
What went wrong
Pros/Cons
5
Agenda
VRV Android - project info
Jenkins old to new
Jenkins Shared Library
Testing Jenkins Pipeline code
What went wrong
Pros/Cons
6
Agenda
VRV Android - project info
Jenkins old to new
Jenkins Shared Library
Testing Jenkins Pipeline code
What went wrong
Pros/Cons
7
Agenda
VRV Android - project info
Jenkins old to new
Jenkins Shared Library
Testing Jenkins Pipeline code
What went wrong
Pros/Cons
8
VRV Android
project info
9
VRV Android project info
Kotlin + Java
4 build types (debug/alpha/beta/release)
Unit tests + JaCoCo
Checkstyle + ktlint
Android Lint
Fabric.Beta
Gitflow
10
VRV Android project info
Kotlin + Java
4 build types (debug/alpha/beta/release)
Unit tests + JaCoCo
Checkstyle + ktlint
Android Lint
Fabric.Beta
Gitflow
11
VRV Android project info
Kotlin + Java
4 build types (debug/alpha/beta/release)
Unit tests + JaCoCo
Checkstyle + ktlint
Android Lint
Fabric.Beta
Gitflow
12
VRV Android project info
Kotlin + Java
4 build types (debug/alpha/beta/release)
Unit tests + JaCoCo
Checkstyle + ktlint
Android Lint
Fabric.Beta
Gitflow
13
VRV Android project info
Kotlin + Java
4 build types (debug/alpha/beta/release)
Unit tests + JaCoCo
Checkstyle + ktlint
Android Lint
Fabric.Beta
Gitflow
14
VRV Android project info
Kotlin + Java
4 build types (debug/alpha/beta/release)
Unit tests + JaCoCo
Checkstyle + ktlint
Android Lint
Fabric.Beta
Gitflow
15
VRV Android project info
Kotlin + Java
4 build types (debug/alpha/beta/release)
Unit tests + JaCoCo
Checkstyle + ktlint
Android Lint
Fabric.Beta
Gitflow
16
Jenkins old to new
17
Jenkins old (VRV Android)
18
Jenkins old (VRV Android)
19
Jenkins old (VRV Android)
./gradlew check assembleAlpha crashlyticsUploadDistributionAlpha
20
Jenkins new (VRV Android)
Multibranch pipeline
Jenkinsfile
Jenkins Shared Library
21
Jenkins new (VRV Android)
Multibranch pipeline
Jenkinsfile
Jenkins Shared Library
22
Jenkins new (VRV Android)
Multibranch pipeline
Jenkinsfile
Jenkins Shared Library
23
Multibranch pipeline
24
Multibranch pipeline
25
Jenkinsfile
#!groovy
def pipeline = new AndroidPipeline()
stage('build') {
pipeline.build()
}
stage('test') {
pipeline.test()
}
stage('distribute') {
pipeline.distribute()
}
stage('post build') {
pipeline.notify(...)
}
26
Jenkins new (VRV Android)
27
Jenkins new (VRV Android)
28
Jenkins new (VRV Android)
29
Jenkins new (VRV Android)
30
Jenkins new (VRV Android)
31
Jenkins
Shared Library
32
Jenkins Shared Library
Default
(root)
+- src # Groovy source files
| +- org
| +- foo
| +- Bar.groovy # for org.foo.Bar class
+- vars
| +- foo.groovy # for global 'foo' variable
| +- foo.txt # help for 'foo' variable
+- resources # resource files (external libraries only)
| +- org
| +- foo
| +- bar.json # static helper data for org.foo.Bar
33
Jenkins Shared Library
Ellation
(root)
+- src # Groovy source files
| +- AndroidPipeline.groovy # <------Android------>
+- vars # global scripts/variables
+- .jenkins
| +- Jenkinsfile # CI
+- test # unit tests
+- integrationTest # integration tests
+- scripts # helper classes
+- jenkinsfile # pipeline template files
34
Jenkins Shared Library
AndroidPipeline.groovy
- 500 LOC
- ~40 methods
35
Jenkins Shared Library
def build() {
step1()
step2()
step3()
}
def test() {
//
}
def distribute() {
//
}
def notify(…) {
//
}
36
Jenkins Shared Library
def build() {
step1() // Step1Implementation.groovy
step2() // Step2Implementation.groovy
step3() // Step3Implementation.groovy
}
def test() {
//
}
def distribute() {
//
}
def notify(…) {
//
}
37
Jenkins Shared Library
def build() {
cleanBuildFolder()
acceptAndroidLicenses()
initializeBuildConfig()
updateBuildNumber()
runCodeStyleChecks()
unitTests()
buildProject()
saveChangelogToFile()
}
38
Jenkins Shared Library
def test() {
runLint()
scanForOpenTasks()
publishLintResults()
publishJunitResults()
publishJacocoCoverage()
publishCheckstyleResults()
publishHtmlReports()
publishApplicationInfo()
}
39
Jenkins Shared Library
def distribute() {
archiveArtifactsTask()
uploadToFabric()
//uploadToPlayMarket()
}
40
Jenkins Shared Library
def notify(String currentBuildResult) {
if (currentBuildResult == ‘SUCCESS’) {
publishGitTag()
addLinkToBuildToJiraTicket()
updateJiraTicketStatus()
} else {
notifyBuildFailedViaSlack()
}
notifyViaEmail()
cleanWs cleanWhenFailure: false
}
41
Testing Jenkins
Pipeline code
42
Testing Jenkins Pipeline code
AndroidPipeline.groovy
- 500 LOC
- ~40 methods
- 4 methods covered
(unit/integration tests)
43
Testing Jenkins Pipeline code
@Test
void incrementsBuildNumber() {
WorkflowRun build = r.assertBuildStatusSuccess(
createWorkflowJob(“projectUnderTest”,
"""
@Library(‘ellation@master’) _
import com.ellation.android.build.version.DiskNextBuildNumber
import com.ellation.android.build.version.DiskBuildNumberDataSource
node {
def nextBuildNumber = new DiskNextBuildNumber(
new DiskBuildNumberDataSource(env), “test-project”, “alpha”
)
nextBuildNumber.set(15)
int next = nextBuildNumber.next()
echo “Next build number is $next”
}
"""
).scheduleBuild2(0))
r.assertLogContains(“Next build number is 16”, build)
} 44
What went wrong
45
What went wrong
Update build number
Publish Git tag
Plots
Upload to Google Play
3rd-party libraries in pipeline code
Parallel builds on slaves
Slack notifications
46
What went wrong
Update build number
Publish Git Tag
Plots
Upload to Google Play
3rd-party libraries in pipeline code
Parallel builds on slaves
Slack notifications
47
What went wrong
Update build number
Publish Git tag
Plots
Upload to Google Play
3rd-party libraries in pipeline code
Parallel builds on slaves
Slack notifications
48
What went wrong
Update build number
Publish Git tag
Plots
Upload to Google Play
3rd-party libraries in pipeline code
Parallel builds on slaves
Slack notifications
49
What went wrong
Update build number
Publish Git tag
Plots
Upload to Google Play
3rd-party libraries in pipeline code
Parallel builds on slaves
Slack notifications
50
What went wrong
Update build number
Publish Git tag
Plots
Upload to Google Play
3rd-party libraries in pipeline code
Parallel builds on slaves
Slack notifications
51
What went wrong
Update build number
Publish Git tag
Plots
Upload to Google Play
3rd-party libraries in pipeline code
Parallel builds on slaves
Slack notifications
52
Update build number
53
Update build number
Next Build Number plugin
- no pipeline support
- see JENKINS-33046
54
Update build number
Multibranch
Branch1: (1,2,3,)
Branch2: (1,2,3,)
Develop: (1,2,3,)
Requirement
Branch1: (1,2,3,)
Branch2: (4,5,6,)
Develop: (7,8,9,)
55
Update build number
56
Update build number
android-build-numbers
/vrv-android
/alpha
/build-number.txt // with value 526
57
Publish Git tag
58
Publish Git tag
Git Publisher plugin
- no pipeline support
- see JENKINS-28335
- https://github.com/vgaidarji/test-jenkins-
sshagent
59
Plots
60
Plots
Plot plugin
- [JENKINS-35571] Make compatible with Pipeline
- see https://github.com/jenkinsci/plot-plugin/pull/32
61
Upload to Google Play
62
Upload to Google Play
Android application
- build number 1..10000
Android TV application
- build number 10000+
Upload failed: Devices with version 10002 of this app
would be downgraded to version 54 if they met the following criteria
63
3rd-party libraries in pipeline code
64
3rd-party libraries in pipeline code
package com.test
@Grapes([
@Grab(group = ‘com.squareup.okhttp3’, module = ‘okhttp’, version = ‘3.9.1’),
@Grab(group = ‘com.google.code.gson’, module = ‘gson’, version = ‘2.7’)
])
import com.google.gson.Gson
import okhttp3.HttpUrl
import okhttp3.OkHttpClient
import okhttp3.Request
class A {}
65
Parallel builds on slaves
66
Parallel builds on slaves
1 slave, 4 executors (8 GB RAM):
java.lang.IllegalStateException: failed to analyze:
java.lang.OutOfMemoryError: GC overhead limit exceeded
4 slaves, 4 executors (16 GB RAM each) = profit!!!
67
Slack notifications
68
Slack notifications
69
Pros/Cons
70
Pros
Single Jenkins master
Shared pipeline code
Code review of pipeline changes
Pipeline as a code
Tests
71
Pros
Single Jenkins master
Shared pipeline code
Code review of pipeline changes
Pipeline as a code
Tests
72
Pros
Single Jenkins master
Shared pipeline code
Code review of pipeline changes
Pipeline as a code
Tests
73
Pros
Single Jenkins master
Shared pipeline code
Code review of pipeline changes
Pipeline as a code
Tests
74
Pros
Single Jenkins master
Shared pipeline code
Code review of pipeline changes
Pipeline as a code
Tests
75
Cons
Single Jenkins master
Shared pipeline code
Code review of pipeline changes
Learning curve
Debugging
76
Cons
Single Jenkins master
Shared pipeline code
Code review of pipeline changes
Learning curve
Debugging
77
Cons
Single Jenkins master
Shared pipeline code
Code review of pipeline changes
Learning curve
Debugging
78
Cons
Single Jenkins master
Shared pipeline code
Code review of pipeline changes
Learning curve
Debugging
79
Cons
Single Jenkins master
Shared pipeline code
Code review of pipeline changes
Learning curve
Debugging
80
Useful
information
81
Useful information
https://github.com/vgaidarji/ci-matters/jenkins/Jenkinsfile
82
Any
Questions?
Veaceslav Gaidarji
https://github.com/vgaidarji/
83

More Related Content

What's hot (20)

PDF
Jenkins Pipeline Tutorial | Continuous Delivery Pipeline Using Jenkins | DevO...
Edureka!
 
PDF
An Open-Source Chef Cookbook CI/CD Implementation Using Jenkins Pipelines
Steffen Gebert
 
PPTX
Delivery Pipeline as Code: using Jenkins 2.0 Pipeline
Slawa Giterman
 
PDF
sed.pdf
MaenAlWedyan
 
PPTX
Docker and Jenkins Pipeline
Mark Waite
 
PDF
Jenkins Pipelines
Steffen Gebert
 
PDF
Jenkins Declarative Pipelines 101
Malcolm Groves
 
PDF
7 Habits of Highly Effective Jenkins Users
Jules Pierre-Louis
 
PDF
Voxxed Luxembourd 2016 Jenkins 2.0 et Pipeline as code
Damien Duportal
 
PPTX
Jenkins, pipeline and docker
AgileDenver
 
PDF
Monitoring Akka with Kamon 1.0
Steffen Gebert
 
PDF
Jenkins Pipeline @ Scale. Building Automation Frameworks for Systems Integration
Oleg Nenashev
 
PDF
Jenkins vs. AWS CodePipeline (AWS User Group Berlin)
Steffen Gebert
 
PPTX
Ci with jenkins docker and mssql belgium
Chris Adkin
 
PPTX
7 Habits of Highly Effective Jenkins Users
Jules Pierre-Louis
 
PDF
Let's go HTTPS-only! - More Than Buying a Certificate
Steffen Gebert
 
PPTX
Continuous Integration With Jenkins Docker SQL Server
Chris Adkin
 
PDF
Open Source tools overview
Luciano Resende
 
PPTX
Jenkins pipeline as code
Mohammad Imran Ansari
 
PDF
CI/CD Pipeline as a Code using Jenkins 2
Mayank Patel
 
Jenkins Pipeline Tutorial | Continuous Delivery Pipeline Using Jenkins | DevO...
Edureka!
 
An Open-Source Chef Cookbook CI/CD Implementation Using Jenkins Pipelines
Steffen Gebert
 
Delivery Pipeline as Code: using Jenkins 2.0 Pipeline
Slawa Giterman
 
sed.pdf
MaenAlWedyan
 
Docker and Jenkins Pipeline
Mark Waite
 
Jenkins Pipelines
Steffen Gebert
 
Jenkins Declarative Pipelines 101
Malcolm Groves
 
7 Habits of Highly Effective Jenkins Users
Jules Pierre-Louis
 
Voxxed Luxembourd 2016 Jenkins 2.0 et Pipeline as code
Damien Duportal
 
Jenkins, pipeline and docker
AgileDenver
 
Monitoring Akka with Kamon 1.0
Steffen Gebert
 
Jenkins Pipeline @ Scale. Building Automation Frameworks for Systems Integration
Oleg Nenashev
 
Jenkins vs. AWS CodePipeline (AWS User Group Berlin)
Steffen Gebert
 
Ci with jenkins docker and mssql belgium
Chris Adkin
 
7 Habits of Highly Effective Jenkins Users
Jules Pierre-Louis
 
Let's go HTTPS-only! - More Than Buying a Certificate
Steffen Gebert
 
Continuous Integration With Jenkins Docker SQL Server
Chris Adkin
 
Open Source tools overview
Luciano Resende
 
Jenkins pipeline as code
Mohammad Imran Ansari
 
CI/CD Pipeline as a Code using Jenkins 2
Mayank Patel
 

Similar to CI/CD on Android project via Jenkins Pipeline (20)

PPTX
Madrid JAM limitaciones - dificultades
Javier Delgado Garrido
 
KEY
Testing with Jenkins, Selenium and Continuous Deployment
Max Klymyshyn
 
PDF
Integration tests: use the containers, Luke!
Roberto Franchini
 
PPTX
PVS-Studio for Linux (CoreHard presentation)
Andrey Karpov
 
ODP
RichFaces - Testing on Mobile Devices
Pavol Pitoňák
 
PDF
Jenkins vs. AWS CodePipeline
Steffen Gebert
 
PDF
Jenkins Days - Workshop - Let's Build a Pipeline - Los Angeles
Andy Pemberton
 
PPTX
Uber Mobility Meetup: Mobile Testing
Apple Chow
 
PPTX
Build, Publish, Deploy and Test Docker images and containers with Jenkins Wor...
Docker, Inc.
 
PDF
Prepare to defend thyself with Blue/Green
Sonatype
 
PDF
All Day DevOps 2016 Fabian - Defending Thyself with Blue Green
Fab L
 
PDF
Everything as a code
Aleksandr Tarasov
 
PDF
Everything as a Code / Александр Тарасов (Одноклассники)
Ontico
 
PDF
Continuous Delivery in Enterprise Environments using Docker, Ansible and Jenkins
Marcel Birkner
 
PDF
GeeCON 2017 - TestContainers. Integration testing without the hassle
Anton Arhipov
 
PDF
Level Up Your Android Build -Droidcon Berlin 2015
Friedger Müffke
 
PDF
Kubernetes best practices
Bill Liu
 
PPTX
Js tacktalk team dev js testing performance
Артем Захарченко
 
PDF
Jenkins & IaC
HungWei Chiu
 
PDF
When to use Serverless? When to use Kubernetes?
Niklas Heidloff
 
Madrid JAM limitaciones - dificultades
Javier Delgado Garrido
 
Testing with Jenkins, Selenium and Continuous Deployment
Max Klymyshyn
 
Integration tests: use the containers, Luke!
Roberto Franchini
 
PVS-Studio for Linux (CoreHard presentation)
Andrey Karpov
 
RichFaces - Testing on Mobile Devices
Pavol Pitoňák
 
Jenkins vs. AWS CodePipeline
Steffen Gebert
 
Jenkins Days - Workshop - Let's Build a Pipeline - Los Angeles
Andy Pemberton
 
Uber Mobility Meetup: Mobile Testing
Apple Chow
 
Build, Publish, Deploy and Test Docker images and containers with Jenkins Wor...
Docker, Inc.
 
Prepare to defend thyself with Blue/Green
Sonatype
 
All Day DevOps 2016 Fabian - Defending Thyself with Blue Green
Fab L
 
Everything as a code
Aleksandr Tarasov
 
Everything as a Code / Александр Тарасов (Одноклассники)
Ontico
 
Continuous Delivery in Enterprise Environments using Docker, Ansible and Jenkins
Marcel Birkner
 
GeeCON 2017 - TestContainers. Integration testing without the hassle
Anton Arhipov
 
Level Up Your Android Build -Droidcon Berlin 2015
Friedger Müffke
 
Kubernetes best practices
Bill Liu
 
Js tacktalk team dev js testing performance
Артем Захарченко
 
Jenkins & IaC
HungWei Chiu
 
When to use Serverless? When to use Kubernetes?
Niklas Heidloff
 
Ad

Recently uploaded (20)

PPTX
Darren Mills The Migration Modernization Balancing Act: Navigating Risks and...
AWS Chicago
 
PDF
Predicting the unpredictable: re-engineering recommendation algorithms for fr...
Speck&Tech
 
PDF
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
PDF
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
PDF
Ampere Offers Energy-Efficient Future For AI And Cloud
ShapeBlue
 
PPT
Interview paper part 3, It is based on Interview Prep
SoumyadeepGhosh39
 
PPTX
Building and Operating a Private Cloud with CloudStack and LINBIT CloudStack ...
ShapeBlue
 
PDF
Blockchain Transactions Explained For Everyone
CIFDAQ
 
PPTX
MSP360 Backup Scheduling and Retention Best Practices.pptx
MSP360
 
PDF
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
PDF
Empowering Cloud Providers with Apache CloudStack and Stackbill
ShapeBlue
 
PDF
The Builder’s Playbook - 2025 State of AI Report.pdf
jeroen339954
 
PPTX
Top iOS App Development Company in the USA for Innovative Apps
SynapseIndia
 
PDF
Smart Air Quality Monitoring with Serrax AQM190 LITE
SERRAX TECHNOLOGIES LLP
 
PPTX
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
PPTX
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 
PDF
Women in Automation Presents: Reinventing Yourself — Bold Career Pivots That ...
DianaGray10
 
PDF
Wojciech Ciemski for Top Cyber News MAGAZINE. June 2025
Dr. Ludmila Morozova-Buss
 
PDF
Persuasive AI: risks and opportunities in the age of digital debate
Speck&Tech
 
PPTX
Top Managed Service Providers in Los Angeles
Captain IT
 
Darren Mills The Migration Modernization Balancing Act: Navigating Risks and...
AWS Chicago
 
Predicting the unpredictable: re-engineering recommendation algorithms for fr...
Speck&Tech
 
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
Ampere Offers Energy-Efficient Future For AI And Cloud
ShapeBlue
 
Interview paper part 3, It is based on Interview Prep
SoumyadeepGhosh39
 
Building and Operating a Private Cloud with CloudStack and LINBIT CloudStack ...
ShapeBlue
 
Blockchain Transactions Explained For Everyone
CIFDAQ
 
MSP360 Backup Scheduling and Retention Best Practices.pptx
MSP360
 
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
Empowering Cloud Providers with Apache CloudStack and Stackbill
ShapeBlue
 
The Builder’s Playbook - 2025 State of AI Report.pdf
jeroen339954
 
Top iOS App Development Company in the USA for Innovative Apps
SynapseIndia
 
Smart Air Quality Monitoring with Serrax AQM190 LITE
SERRAX TECHNOLOGIES LLP
 
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 
Women in Automation Presents: Reinventing Yourself — Bold Career Pivots That ...
DianaGray10
 
Wojciech Ciemski for Top Cyber News MAGAZINE. June 2025
Dr. Ludmila Morozova-Buss
 
Persuasive AI: risks and opportunities in the age of digital debate
Speck&Tech
 
Top Managed Service Providers in Los Angeles
Captain IT
 
Ad

CI/CD on Android project via Jenkins Pipeline

Editor's Notes

  • #4: некоторые детали об этом проекте важные в рамках интеграции с дженкинсом
  • #5: как мигрировали со старого дженкинса на новый
  • #6: что это такое и где мы используем
  • #7: как тестировать pipeline код
  • #8: что пошло не так или как трудности я встретил самое интересное наверное
  • #9: ну и +- того что у нас получилось
  • #10: немного о проекте - SVOD сервис с аниме, гиковскими видосиками и так далее недавно добавили Stargate
  • #11: Проект был на Java, переписываем на Kotlin (60%)
  • #12: debug = разработчики alpha = билд с develop или с ветки beta = pre-production release = Google Play
  • #13: Тестов на проекте не было когда он к нам попал Активно пишем юнит тесты и JaCoCo для покрытия
  • #14: Checkstyle = Java ktlint = Kotlin code style проверяем
  • #15: Android Lint = иногда подсказывает о довольно важных проблемах
  • #16: Fabric.Beta = internal/external builds
  • #17: Работаем по gitflow (feature develop release hotfix master)
  • #18: У нас был старый дженкинс где только айос андроид. Там почти ничего не было. И мы должны были всё перенести в новый где все остальные проекты компании.
  • #19: То как выглядит старый дженкинс, достался в наследство
  • #20: Если только VRV проект, то 3 задачи
  • #21: Это почти всё что было внутри задач. Нет интеграции с гитхабом, нет никаких полезных графиков и данных, почти ничего нет. Полу-ручные билды.
  • #22: Перешли на multibranch pipeline. Расскажу дальше немного подробнее об этом.
  • #23: Неотъемлемая часть Jenkins Pipeline плагина
  • #24: Расскажу что это и где мы используем.
  • #25: Вот так выглядит VRV Android Jenkins задачи. Это multibranch pipeline и ещё одна вспомогательная задача нужная для миграции.
  • #26: Автоматически создаются задачи в Jenkins из веток и PR. И автоматически удаляются.
  • #27: Как же работает эта штука? Внутри самого проекта есть Jenkinsfile с инструкциями.
  • #28: После того как это всё запускается вы увидите ваши стадии. В нашем случае их 4 и в среднем билд занимает 15 минут.
  • #29: Немного информации о тестах на проекте. Это чуть больше чем за пол года.
  • #30: Покрытие на этом рисунке не актуально, всё руки не доходят актуализировать. Благо мы следим за тем чтобы тесты были в каждом новом Pull Request и основная бизнес логика покрыта.
  • #31: Немного дополнительной информации, которая не так часто автоматизируется. Размер приложения очень важен.
  • #32: Количество методов в проекте. Важный показатель на Андроид проекте.
  • #33: Вся реализация тех стадий (build test distribute) вынесена в Jenkins Shared Library.
  • #34: Так выглядит дефолтная библиотека. Исходный код, глобальные переменные и ресурсы.
  • #35: Так выглядит наш проект. Код для разных типов проектов. AndroidPipeline.groovy. Jenkinsfile - автоматизация самого pipeline проекта. Ну и тесты.
  • #36: Это 1 класс из 500 строк и примерно 40 атомарных методов.
  • #37: Более детально выглядит так.
  • #38: Изначально всё было в 1 файле, но сейчас я занимаюсь улучшением этого дела и выношу то что можно в отдельные независимые классы чтобы переиспользовать.
  • #39: Подробно о каждом шаге.
  • #40: Подробно о каждом шаге.
  • #41: Подробно о каждом шаге. Почему закомментировано расскажу чуть ниже.
  • #42: Тут много интересных вещей происходит.
  • #43: Как мы тестируем pipeline code.
  • #44: Стоит сказать что покрытие пока очень маленькое, всего 4 метода из 40 покрыто.
  • #45: Есть и юнит тесты, но они обычные, ничего интересного. Так выглядит интеграционный тест.
  • #46: Что же пошло не так или где я встретил трудности и на что потратил много времени.
  • #54: В андроиде каждый билд имеет билд номер и они идут по порядку. В старом дженкинсе 1 задача для альфа билдов и всё по порядку.
  • #60: Git checkout = HTTPS Надо трансформировать в SSH и потом с sshagent отправить можно будет Git.
  • #62: Графики что вы видели не были совместимы с pipeline. Я сделал это возможным. Там довольный интересный PR, работал с ребятами из Cloudbees.
  • #64: 2 проекта у нас и build number специфика. Оба плагина не умеют это делать пока - Jenkins/Gradle.
  • #66: Для Slack-a допустим мне нужно было работать с API. Встроенный сборщик в Groovy = Grapes.
  • #68: Много коммитов, много билдов, не хватало памяти.
  • #70: Каждому в приват, вместо общего канала.
  • #72: Легче администрировать админам.
  • #73: Другие могут твои методы использовать. Например Slack интеграцию что я сделал.
  • #74: в гитхабе девопсы ревью делают.
  • #75: Намного нагляднее и понятнее в коде что происходит чем через UI настраивать.
  • #76: Можно покрыть тестами и проверить заранее функционал.
  • #77: обновлять плагины (надо всех подождать и чтобы у всех работало) нет доступа в настройку дженкинса
  • #78: Надо думать что у других тоже что-то может сломаться, изолированно в своём мирке Андроида уже не поживёшь.
  • #79: Иногда много времени занимает так как девопсы заняты постоянно и физически не успевают.
  • #80: Это довольно нетривиально и надо хорошо дженкинс знать и pipeline.
  • #81: Сложно дебажить. У меня локальный дженкинс всегда запущен.
  • #82: Немного информации полезной.
  • #83: Совсем мало, но важно. Я сам использовал то что я давно сделал и 50% pipeline это был тупо copy-paste отсюда.
  • #84: Там есть вся инфа обо мне. И опен-сорс проекты, и ссылка на блог, твиттер, линкедин.