Slide 1

Slide 1 text

.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 ]

Slide 45

Slide 45 text

NuGet workflow Build

Slide 46

Slide 46 text

NuGet workflow Build Package nuget pack command: nuget.exe pack <.nuspec file>

Slide 47

Slide 47 text

NuGet workflow Build Package Microsoft.Silverlight.Testing 4.0.40413.2012 hagzag hagzag false NuGet package nuget pack command: nuget.exe pack <.nuspec file>

Slide 48

Slide 48 text

NuGet workflow Build Push/Update Package nuget push command: nuget push -s -ApiKey

Slide 49

Slide 49 text

Home Grown solution

Slide 50

Slide 50 text

Home Grown solution

Slide 51

Slide 51 text

Home Grown solution

Slide 52

Slide 52 text

Home Grown solution

Slide 53

Slide 53 text

Home Grown solution • No ACL / AUTH • Friendly URL ? • Friendly UI ? • More …

Slide 54

Slide 54 text

Mature Artifact Repo

Slide 55

Slide 55 text

Mature Artifact Repo

Slide 56

Slide 56 text

Mature Artifact Repo

Slide 57

Slide 57 text

Jenkins NuGet Plugin Trigger a build based on dependency change in NuGet – Check every …

Slide 58

Slide 58 text

Jenkins NuGet Plugin Trigger a build based on dependency change in NuGet – Check every … Java Guys are saying so what …, Maven does the same thing … 

Slide 59

Slide 59 text

So how to CI & CD for with CI DM CQ CD MSBUILD NCOVER FXCOP Nant & more

Slide 60

Slide 60 text

Code Quality

Slide 61

Slide 61 text

Code Quality & Analysis

Slide 62

Slide 62 text

Developers experience

Slide 63

Slide 63 text

Sonar – A standard Add / Manage Sonar(s) Configure version at job level

Slide 64

Slide 64 text

So how to CI & CD for with CI DM CQ CD MSBUILD NCOVER FXCOP Nant & more

Slide 65

Slide 65 text

From CI => CD

Slide 66

Slide 66 text

The easy solution would be …

Slide 67

Slide 67 text

No content

Slide 68

Slide 68 text

Build => Deploy => Test

Slide 69

Slide 69 text

Build => Deploy => Test

Slide 70

Slide 70 text

Choose you poison & more PAAS

Slide 71

Slide 71 text

Build => Deploy => Test

Slide 72

Slide 72 text

Build => Deploy => Test

Slide 73

Slide 73 text

Build => Deploy => Test

Slide 74

Slide 74 text

Build => Deploy => Test - Reuse Elastic Beanstalk Deployment

Slide 75

Slide 75 text

Build => Deploy => Test

Slide 76

Slide 76 text

Build => Deploy => Test

Slide 77

Slide 77 text

So how to CI & CD for with CI DM CQ CD MSBUILD NCOVER FXCOP Nant & more

Slide 78

Slide 78 text

Thank you

Slide 79

Slide 79 text

THANK YOU Haggai Philip Zagury Email: [email protected] Tel: +972-545302525