Continuous Integration has become synonymous with CI-Servers and the concept of CI/CD-Pipelines. Unfortunately, you can have continuous delivery without continuous integration. Just as you can check in directly to 'production' without having trunk-based development. (And shouldn't trunk-based development should be called master based development nowadays?).
This session aims to debunk several misconceptions about good engineering practices and proposes some ways to get from cargo-cult agile (aka in-name-only-agile) to tangible results today.
3. Slide #
2020 Michael Mahlberg
The Princess Bride
3
15 Seconds fromYouTube.com
https://www.youtube.com/watch?v=dTRKCXC0JFg
4. Slide #
2020 Michael Mahlberg 4
Illustration:
Humpty
Dumpty
and
Alice.
From
Through
the
Looking-Glass.
Illustration
by
John
Tenniel.
Text;Lewis
Carroll's
Through
the
Looking-Glass
quoted
on
https://en.wikipedia.org/wiki/Humpty_Dumpty
"When I use a word," Humpty Dumpty
said, in rather a scornful tone, "it means
just what I choose it to mean—neither
more nor less."
5. Slide #
2020 Michael Mahlberg
The original Continuous Integration
5
Slides available at http://bit.ly/gtd2020di21
7. Slide #
2020 Michael Mahlberg
Continuous integration
on a dollar a day
James Shore, 2006
7
8. Slide #
2020 Michael Mahlberg 8
No worries - this ^ is a Rubber Chicken!
Source:
https://www.jamesshore.com/Blog/Continuous-Integration-on-a-Dollar-a-Day.html
9. Slide #
2020 Michael Mahlberg 9
Start Task
Create Branch
set b_name=s123_t45
git branch %b_name%
git checkout %b_name%
git push origin %b_name%
git config branch.%b_name%.remote origin
git config branch.%b_name%.merge refs/heads/%b_name%
Coding
Of course this includes
specs and testing etc.
Pull & Merge
development
checkout
development
merge
task branch
precommit
Push
Merge
integration
Merge
development
into
development
into
development
Smoke Test
integration
test
deployment
„Reset“
development
checkout
integration
„Reset“
integration
Release Token
into
integration
Release Token
Acquire Token
[Error]
[Error]
[Error]
[Error]
Stop the
Line
Push
[Error]
checkout
task branch
migrate db up
migrate db down
Smoke Test
Exportieren der Daten aus „integrate“ via web-interface
rake yyy:db2drop_all_tables
rake db:migrate
server lokal starten
rake yyy:data:populate
Import der Daten von oben via web-interface
[Error]
migrate db up
integration
test
[Error]
git log | grep => sha
git checkout <sha>
git commit –m
Stop the Line – and
after we get here
for the first time we
write down how we
handle the situation!
[OK]
Stop the
Line
[Error]
[Error]
10. Slide #
2020 Michael Mahlberg
What (many) people think
today…
10
Photo
by
Daniel
Hjalmarsson
on
Unsplash
11. Slide #
2020 Michael Mahlberg 11
DZone
Source: https://dzone.com/articles/learn-how-to-setup-a-cicd-pipeline-from-scratch
Red Hat
Source https://www.redhat.com/en/topics/devops/what-is-ci-cd
A continuous delivery pipeline is an
automated expression of your process for
getting software from version control right
through to your users and customers.
Jenkins
Source: https://www.devops-certification.org/
How_Should_You_Design_Your_DevOps_Continuous_Delivery_And_
Deployment_Pipeline.php
DevOps Certifications
Source: https://jenkins.io/doc/pipeline/tour/hello-world/
Random
Sample
14. Slide #
2020 Michael Mahlberg 14
Each development pair is responsible for
integrating their own code when ever a
reasonable break presents itself. This may be
when the unit tests all run at 100% or some
smaller portion of the planned functionality
is finished. Only one pair integrates at any
given moment and after only a few hours of
coding to reduce the potential problem
location to almost nothing.
some
smaller portion of the planned functionality
is finished.
15. Slide #
2020 Michael Mahlberg 15
Photo
by
Christopher
Windus
on
Unsplash
True Story…
16. Slide #
2020 Michael Mahlberg 16
Photo
by
Christopher
Windus
on
Unsplash
3 Requirements
1 Increment
1 Environment
…
One “CI/CD”-System
17. Slide #
2020 Michael Mahlberg 17
Photo
by
Christopher
Windus
on
Unsplash
Req 1: Provide minimum
feedback to user (Using
the envisioned
frameworks)
18. Slide #
2020 Michael Mahlberg 18
Photo
by
Christopher
Windus
on
Unsplash
Req 2: Automatically
install the Application
(with the envisioned
frameworks) on
Windows
19. Slide #
2020 Michael Mahlberg 19
Photo
by
Christopher
Windus
on
Unsplash
Req 3: Automatically
install the Application
(with the envisioned
frameworks) on
Mac OS X
20. Slide #
2020 Michael Mahlberg 20
Photo
by
Christopher
Windus
on
Unsplash
Simple…
21. Slide #
2020 Michael Mahlberg 21
Photo
by
Christopher
Windus
on
Unsplash
But not easy…
22. Slide #
2020 Michael Mahlberg 22
Photo
by
Christopher
Windus
on
Unsplash
Feature 1 was demoed
on http://127.0.0.1/…
23. Slide #
2020 Michael Mahlberg 23
Photo
by
Christopher
Windus
on
Unsplash
Feature 2 was demoed
under C:data…
24. Slide #
2020 Michael Mahlberg 24
Photo
by
Christopher
Windus
on
Unsplash
Feature 3 was demoed
under /Users/demo/…
25. Slide #
2020 Michael Mahlberg 25
Photo
by
Christopher
Windus
on
Unsplash
All three features
- had been built automatically
- had unit and integration tests
- passed all tests
- used the envisioned frameworks
26. Slide #
2020 Michael Mahlberg 26
Photo
by
Christopher
Windus
on
Unsplash
But:
- Feature 2 and 3 used their own demo-
contents (not feature 1)
- Feature 2 and 3 used diffferent versions o
of the frameworks
27. Slide #
2020 Michael Mahlberg 27
Photo
by
Christopher
Windus
on
Unsplash
Therefore
28. Slide #
2020 Michael Mahlberg
All three features
- had been built automatically
- had unit and integration tests
- passed all tests
- used the envisioned frameworks
All three features
- had been built automatically
- had unit and integration tests
- passed all tests
- used the envisioned frameworks
28
Photo
by
Christopher
Windus
on
Unsplash
Not Integrated
-
29. Slide #
2020 Michael Mahlberg 29
You actually can have
continuous deployment
without actual
continuous integration.
31. Slide #
2020 Michael Mahlberg
What To Do About It?
A little collection of things to
keep in mind…
31
Picture Source: https://flic.kr/p/3bNwZu
32. Slide #
2020 Michael Mahlberg
Use an ATDD/BDD Mindset
•Think in Scenarios
•Formulate from a user point of view
•Remember the original Continuous
Integration ideas
32
Photo
by
Mike
from
Pexels
33. Slide #
2020 Michael Mahlberg
Focus onValue
•«Implement X» is not a feature - it’s a work-order
•«Given the situation ABC, when the User XYZ does
MNO then Woosh happens» could be a feature.
•Using a ATDD/BDD approach doesn’t require
ATDD/BDD tools – it is about the original
Continuous Integration Mindset.
33
Image source: https://flic.kr/p/9cWWa2
34. Slide #
2020 Michael Mahlberg
Merge from upstream often
Regardless of your actual
development process
34
37. Slide #
2020 Michael Mahlberg
Merge from upstream often
Regardless of your actual
development process:
make sure to integrate all the
changes from everyone else before
you try to integrate your own.
37
38. Slide #
2020 Michael Mahlberg
Use short lived
branches
Smaller than 4
hours would be
good
38
Photo
by
Aphiwat
chuangchoem
from
Pexels
39. Slide #
2020 Michael Mahlberg
Trunk based development?
• Shouldn’t it be called main-branch-based these days?
• And again: It probably doesn’t mean what many people
think.
• It’s more about short lived branches and…
wait for it ….
Continuous Integration….
39
Image: https://flic.kr/p/23W8iRC
40. Slide #
2020 Michael Mahlberg
Continuous integration is
• … about people consciously integrating things technically and
with respect to functionality.
• Build and Deployment Pipelines help with the technical side.
• BDD helps with automating parts of the integration
• Only after you have checked that the integrated system actually
does what you expect it to do, is your work done.
40
43. Slide #
2020 Michael Mahlberg 43
https://twitter.com/agile_memes/status/1247519535504056320?s=21
44. Slide #
2020 Michael Mahlberg
Contact Information
44
If you have questions,
don’t hesitate to contact me via mail at: mm@michaelmahlberg.com
You can also find me on Twitter as MMahlberg
I blog on http://agile-aspects.michaelmahlberg.com
My homepage is http://www.michaelmahlberg.de