5. #netcoreconf
What continuous integration means to devs?
“Having a build pipeline that
- Builds the code for each pushed commit
- Executes the tests (if we managed to have them)
- Publish the build results (main test execution
results)
- Publish the artifacts required to deploy”
10x developer
7. #netcoreconf
Goals
Understand what Continuous Integration NOT is
See some pipelines simples
Meet several techniques that could help up with CI
11. #netcoreconf
Going back to 2013
I had the opportunity to deal with a complex product:
- With long release cycles (6 months or even more)
- QA team that had to verify the release once it had been developed
- Customers with different versions deployed on their premises or in our cloud
- Branches “kidnapped” by customers due to product personalization
- Heavy problems to manage production bugs, and colissions between developed features
13. #netcoreconf
Reading Fowler’s article
Maintain a Single Source Repository.
Automate the Build
Make Your Build Self-Testing
Everyone Commits To the Mainline Every Day
Every Commit Should Build the Mainline on
an Integration Machine
Fix Broken Builds Immediately
Keep the Build Fast
https://nvie.com/posts/a-successful-git-branching-model/
14. #netcoreconf
Trunk Based Development
A source-control branching model, where
developers collaborate on code in a single branch
called ‘trunk’ (or main or master), resist any
pressure to create other long-lived development
branches by employing documented techniques.
They therefore avoid merge hell, do not break the
build, and live happily ever after.
15. #netcoreconf
Our fears
• I am more comfortable if a can fail (bad
commit)
• Sometimes I am not able to complete a feature
in a day
• What if we have a production issue and trunk
branch is not stable?
16. #netcoreconf
Helpful Techniques
Some people think “Trunk Based Development” as “Trunk-only
Development”, which is not correct. TBD works well with short-
lived feature branches. In some cases, people still need to work on
a “short-lived” feature branch, and then merge it back to trunk
when possible.
Use pull requests in order to merge to trunk.
17. #netcoreconf
Helpful Techniques
Develop new features in unknown url’s (not discoverable by users)
Use Feature Toggles (AKA Feature Flags)
Use patterns like “Branch by abstraction”
18. #netcoreconf
Helpful Techniques
"Branch by Abstraction" is a technique for making a large-scale change to a
software system in gradual way that allows you to release the system regularly
while the change is still in-progress.
https://martinfowler.com/bliki/BranchByAbstraction.html
In 1994, Grady Booch used the phrase continuous integration in Object-Oriented Analysis and Design with Applications (2nd edition)[9] to explain how, when developing using micro processes, "internal releases represent a sort of continuous integration of the system, and exist to force closure of the micro process".
Práctica de XP
Primera herramienta de CI en 2001
Me contrataron entre otras cosas para empezar a aplicar buenas prácticas… y me encontré con esto