SlideShare uma empresa Scribd logo
1 de 21
Continuous deployment, або
Як деплоїти 5 раз за день
Андрій Шумада
Про мене
Debitoor.com
Hvz.kiev.ua
eagleeye_s
eagleeye
Ахтунг!
2 дева
2 деви
+ git rebase
Стране нужна … ?
SCRUM
 Пул задач на 2 тижні
 Реліз кожних 2 тижні, або більше
 Всі працюють в одній вітці (master)
 Стабильность -> release
 Master -> playground.xxx.com
 Release -> staging.xxx.com -> xxx.com
8 девів – master + release
А як насправді?
Реліз запланований на день Х
Зарелізились в день Х + 10
еееее…
Чого затягується реліз?
 Трабли після merge release -> master
 Під кінець спрінта хтось сів рефакторити (фотка мене)
 Фіча велика, не піддається розбиттю на декілька спринтів
 Переоцінили свої сили
 Спочатку недооціинли свої сили.. А потім переоцінили їх…
 Хтось щось поламав.. Всі чекають..
 Мокапи помінялись під кінець спрінта
Всі чекають..
..або пилять наступний спрінт в master
…реліз затягується..
Давайте
 Релізитись частіше
(5 раз в день)
 Не мішати один одному
 Не чекати один одного
Branches
Основні принципи
 Одна фіча – один бранч, в одному пул реквесті
 При конфліктах – master завжди правий
 В мастер попадають бранчі в вигляді одного коміта (--squash) -
легко ревертити
 Вітка завжди повинна містити останній мастер
 QA – тестити треба завжди останній master + feature
 В рамках однієї бранчі працювати в –rebase режимі
Master завжди
правий
Після кожного релізу
master -> featureBranch
Як розібратись що ревертити?
git merge featureBranch - -squash
git commit –m ‘New feature, fixes #43’
Як перевірити, чи девелопер змерджив
master?
#!/bin/sh
echo 'detecting latest master..'
localHistory=`git log -n 50 --pretty=format:"%H"`
latestMaster=`git ls-remote origin master | awk '{print $1;}'`
echo "latest master: $latestMaster"
if echo "$localHistory" | grep -q "$latestMaster"; then
echo "branch has latest master"
else
echo "branch doesn't have latest master"
exit 1
fi
Переваги
 Роблю фічу скільки хочу, час ніколи не піджимає
 Легше знайти винного..
 В разі проблем на продакшені відкатується лише одна фіча
 Не блокуються і не відкатуються інші фічі..
 Фічі появляються швидше в продакшені
 Область тестування завжди обмежена
І це працює!

Mais conteúdo relacionado

Destaque

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Destaque (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

How 2 deploy 5 times per day | Continuos deployment

  • 1. Continuous deployment, або Як деплоїти 5 раз за день Андрій Шумада
  • 7.
  • 8. SCRUM  Пул задач на 2 тижні  Реліз кожних 2 тижні, або більше  Всі працюють в одній вітці (master)  Стабильность -> release  Master -> playground.xxx.com  Release -> staging.xxx.com -> xxx.com
  • 9. 8 девів – master + release
  • 10. А як насправді? Реліз запланований на день Х Зарелізились в день Х + 10
  • 12. Чого затягується реліз?  Трабли після merge release -> master  Під кінець спрінта хтось сів рефакторити (фотка мене)  Фіча велика, не піддається розбиттю на декілька спринтів  Переоцінили свої сили  Спочатку недооціинли свої сили.. А потім переоцінили їх…  Хтось щось поламав.. Всі чекають..  Мокапи помінялись під кінець спрінта
  • 13. Всі чекають.. ..або пилять наступний спрінт в master …реліз затягується..
  • 14. Давайте  Релізитись частіше (5 раз в день)  Не мішати один одному  Не чекати один одного
  • 16. Основні принципи  Одна фіча – один бранч, в одному пул реквесті  При конфліктах – master завжди правий  В мастер попадають бранчі в вигляді одного коміта (--squash) - легко ревертити  Вітка завжди повинна містити останній мастер  QA – тестити треба завжди останній master + feature  В рамках однієї бранчі працювати в –rebase режимі
  • 17. Master завжди правий Після кожного релізу master -> featureBranch
  • 18. Як розібратись що ревертити? git merge featureBranch - -squash git commit –m ‘New feature, fixes #43’
  • 19. Як перевірити, чи девелопер змерджив master? #!/bin/sh echo 'detecting latest master..' localHistory=`git log -n 50 --pretty=format:"%H"` latestMaster=`git ls-remote origin master | awk '{print $1;}'` echo "latest master: $latestMaster" if echo "$localHistory" | grep -q "$latestMaster"; then echo "branch has latest master" else echo "branch doesn't have latest master" exit 1 fi
  • 20. Переваги  Роблю фічу скільки хочу, час ніколи не піджимає  Легше знайти винного..  В разі проблем на продакшені відкатується лише одна фіча  Не блокуються і не відкатуються інші фічі..  Фічі появляються швидше в продакшені  Область тестування завжди обмежена