.Net Open Source CI & CD
with Jenkins
06.06.2013
JUC, Israel
Haggai Philip Zagury,
#Jenkinsconf
@Jenkinsconf
Jenkins User Conference
Slide 2
Slide 2 text
Haggai Philip Zagury
DevOps / PS Engineer
“
I am a member of Tikal's ALM group. With
over 5 members, we meet, share,
contribute and code together on a monthly
basis
whoami ?
Slide 3
Slide 3 text
We help companies build,
deliver, deploy, manage
and optimize our
customers products.
WHO WE ARE?
Slide 4
Slide 4 text
OUR EXPERTISE
Slide 5
Slide 5 text
Today we are SURE that we
made the right decision, choosing
Tikal
“
“
Guy Ben-Porat,
Development Manager “ExLibris”
Slide 6
Slide 6 text
1600+
Cummunity
Members
150+
Blog posts
last year
460+
Meet up
Members
12+
Years old
90+
Tikal’s
Experts Team
100+
Projects
Last Year
TIKAL BY NUMBERS
Slide 7
Slide 7 text
Actions speak louder than words
“
“
Tikal's motto
Slide 8
Slide 8 text
Not that kind of consultant
Slide 9
Slide 9 text
Argument of OSS in MSFT env
Slide 10
Slide 10 text
Lets take
another
Journey together
Slide 11
Slide 11 text
A love & hate story
Steve Ballmer
Slide 12
Slide 12 text
A love & hate story
Slide 13
Slide 13 text
For Visual Studio
Slide 14
Slide 14 text
Microsoft launch [2006]
Slide 15
Slide 15 text
Microsoft launch [2006]
An Example I will use
Slide 16
Slide 16 text
The era
&
Slide 17
Slide 17 text
In The era
&
Slide 18
Slide 18 text
We are fully equipped …
Fabric
The Open Source Ecosystem
Slide 19
Slide 19 text
The keys to success
• Implementing CI’s “ 10 commandments “
• Dependency Mechanism
• Code Quality & analysis
Slide 20
Slide 20 text
So how to CI & CD for with
CI DM CQ CD
Slide 21
Slide 21 text
So how to CI & CD for with
CI DM CQ CD
Hopefully answer them one by one …
Slide 22
Slide 22 text
Continuous Integration
The
“10 Commandments
“
• Maintain a code repository (central / shared)
• Automate the build
• Make the build self-testing
• Everyone commits to the baseline every day
• Every commit (to baseline) should be built
• Keep the build fast
• Test in a clone of the production environment
• Make it easy to get the latest deliverables
• Everyone can see the results of the latest build
• Automate deployment
Slide 23
Slide 23 text
• Maintain a code repository (central / shared)
Achieving CI
Slide 24
Slide 24 text
• Maintain a code repository (central / shared)
• Automate the build
Achieving CI
Slide 25
Slide 25 text
• Maintain a code repository (central / shared)
• Automate the build
• Make the build self-testing
Achieving CI
Slide 26
Slide 26 text
• Maintain a code repository (central / shared)
• Automate the build
• Make the build self-testing
• Everyone commits to the baseline every day
• Every commit (to baseline) should be built
Achieving CI
Slide 27
Slide 27 text
• Maintain a code repository (central / shared)
• Automate the build
• Make the build self-testing
• Everyone commits to the baseline every day
• Every commit (to baseline) should be built
Achieving CI
You could probably achieve CI with
TFS – we will see later why it’s not
enough ….
Slide 28
Slide 28 text
Developers experience
Slide 29
Slide 29 text
Developers experience
But you can always use git …
Slide 30
Slide 30 text
If you insist / have TFS
Slide 31
Slide 31 text
MSBUILD plug-in
Add / Manage multiple MSBuild versions
Configure version at job level
Slide 32
Slide 32 text
Execute MSbuild
Slide 33
Slide 33 text
So how to CI & CD for with
CI DM CQ CD
MSBUILD
NCOVER
FXCOP
Nant
& more
Slide 34
Slide 34 text
Dependency Management
2nd and 3rd party build &
development integration
Apache / Maven have tried in
the past …
Reference from SlaeSforce 2008: http://www.slideshare.net/sgreene/dependency-
management-in-a-large-agile-environment-presentation
A maven .NET implementation
Soon to be terminated …
Tip:
Don’t Push Binaries To
Source Control,
Use NuGet Wisely Instead
Slide 35
Slide 35 text
What is NuGet
NuGet is a Visual Studio extension that makes it
easy to install and update third-party libraries
and tools in Visual Studio.
Slide 36
Slide 36 text
What is NuGet
Growing
rapidly
every day …
Slide 37
Slide 37 text
From the comfort of
Browse remote url’s [ Nuget Repositories ]
Slide 38
Slide 38 text
Whats in *.nupkg ?
Slide 39
Slide 39 text
Whats in *.nupkg !
Slide 40
Slide 40 text
Whats in *.nupkg !
& more metadata …
Slide 41
Slide 41 text
From the comfort of
All except Nuget.exe are added to
SCM
Slide 42
Slide 42 text
From the comfort of
Project file [csproj]
Slide 43
Slide 43 text
From the comfort of
NuGet “magic” – the omu.* files are
references imported by the
nuget.exe
Slide 44
Slide 44 text
Nuget workflow
1. Check for update
2. install to pkg dir [ if update needed ]
3. Regular compile sequence [ msbuild ]