Using Jenkins for the build and deployment of .NET applications
-
Upload
connor-howard -
Category
Documents
-
view
44 -
download
0
description
Transcript of Using Jenkins for the build and deployment of .NET applications
![Page 1: Using Jenkins for the build and deployment of .NET applications](https://reader036.fdocuments.in/reader036/viewer/2022062408/56813160550346895d97d846/html5/thumbnails/1.jpg)
Jenkins User Conference San Francisco, Sept 30 2012 #jenkinsconf
Using Jenkins for the build and deployment of .NET applications
Constantin CaraivanAdobe Systems
http://www.businesscatalyst.com
![Page 2: Using Jenkins for the build and deployment of .NET applications](https://reader036.fdocuments.in/reader036/viewer/2022062408/56813160550346895d97d846/html5/thumbnails/2.jpg)
Jenkins User Conference San Francisco, Sept 30 2012 #jenkinsconf
Agenda
Business Catalyst
Migration from CruiseControl.NET to Jenkins– CC.NET system architecture– Jenkins system architecture– Migration plan– The good parts– The bad parts– And the ugly parts– Supported features: CC.NET versus Jenkins
(Side note) Using Jenkins for deployment
Lessons learned
Q & A
![Page 3: Using Jenkins for the build and deployment of .NET applications](https://reader036.fdocuments.in/reader036/viewer/2022062408/56813160550346895d97d846/html5/thumbnails/3.jpg)
Jenkins User Conference San Francisco, Sept 30 2012 #jenkinsconf
Business Catalyst
Integrated platform for building online businesses
Just basic web technology knowledge needed
![Page 4: Using Jenkins for the build and deployment of .NET applications](https://reader036.fdocuments.in/reader036/viewer/2022062408/56813160550346895d97d846/html5/thumbnails/4.jpg)
Jenkins User Conference San Francisco, Sept 30 2012 #jenkinsconf
Business Catalyst
A collection of .NET applications
A lot of code
Server side languages 1.2M LOC
Resources & client side languages
2M LOC
Classes Tens of thousands
![Page 5: Using Jenkins for the build and deployment of .NET applications](https://reader036.fdocuments.in/reader036/viewer/2022062408/56813160550346895d97d846/html5/thumbnails/5.jpg)
Jenkins User Conference San Francisco, Sept 30 2012 #jenkinsconf
Migration from CC.NET to Jenkins
CC.NET system architecture
3x CruiseControl.NET
MSBuild & batch scripts
Scheduled tasks on machines
![Page 6: Using Jenkins for the build and deployment of .NET applications](https://reader036.fdocuments.in/reader036/viewer/2022062408/56813160550346895d97d846/html5/thumbnails/6.jpg)
Jenkins User Conference San Francisco, Sept 30 2012 #jenkinsconf
Migration from CC.NET to Jenkins
CC.NET build
machine
CC.NET test environment instance 1
CC.NET integration
test machine
CC.NET test environment instance N
CC.NET test environment
„master”
MSBuild
MSBuild
MSBuild
Batch
MSBuild
Batch
CC.NET system architecture
![Page 7: Using Jenkins for the build and deployment of .NET applications](https://reader036.fdocuments.in/reader036/viewer/2022062408/56813160550346895d97d846/html5/thumbnails/7.jpg)
Jenkins User Conference San Francisco, Sept 30 2012 #jenkinsconf
Migration from CC.NET to Jenkins
CC.NET system architecture
Everything looked like a rundown house
![Page 8: Using Jenkins for the build and deployment of .NET applications](https://reader036.fdocuments.in/reader036/viewer/2022062408/56813160550346895d97d846/html5/thumbnails/8.jpg)
Jenkins User Conference San Francisco, Sept 30 2012 #jenkinsconf
Migration from CC.NET to Jenkins
Jenkins system architecture
Jenkins master - slave system
MSBuild & Powershell & Python scripts
Lots & lots of jobs
![Page 9: Using Jenkins for the build and deployment of .NET applications](https://reader036.fdocuments.in/reader036/viewer/2022062408/56813160550346895d97d846/html5/thumbnails/9.jpg)
Jenkins User Conference San Francisco, Sept 30 2012 #jenkinsconf
Migration from CC.NET to Jenkins
Jenkins master
Jenkins build slave
(same
machine)
Jenkins integration test slave
1
Jenkins test environment
slave 1
Jenkins integration test slave
N
Jenkins test environment
slave N
Jenkins automated test runner
slave 1
Jenkins automated test runner
slave N
MSBuild
PowerShell & Python
JmeterSelenium
MSBuild
Jenkins system architecture
![Page 10: Using Jenkins for the build and deployment of .NET applications](https://reader036.fdocuments.in/reader036/viewer/2022062408/56813160550346895d97d846/html5/thumbnails/10.jpg)
Jenkins User Conference San Francisco, Sept 30 2012 #jenkinsconf
Migration from CC.NET to Jenkins
Jenkins system architecture
Much nicer!
![Page 11: Using Jenkins for the build and deployment of .NET applications](https://reader036.fdocuments.in/reader036/viewer/2022062408/56813160550346895d97d846/html5/thumbnails/11.jpg)
Jenkins User Conference San Francisco, Sept 30 2012 #jenkinsconf
Migration from CC.NET to Jenkins
Migration plan
Initially ran both systems in parallel
Moved every component gradually
Phased out CC.NET when we were sure
![Page 12: Using Jenkins for the build and deployment of .NET applications](https://reader036.fdocuments.in/reader036/viewer/2022062408/56813160550346895d97d846/html5/thumbnails/12.jpg)
Jenkins User Conference San Francisco, Sept 30 2012 #jenkinsconf
Migration from CC.NET to Jenkins
The good parts
.NET integration is easy (MSBuild, Nunit, Ncover, Powershell)
System easily accessible (AD login)
![Page 13: Using Jenkins for the build and deployment of .NET applications](https://reader036.fdocuments.in/reader036/viewer/2022062408/56813160550346895d97d846/html5/thumbnails/13.jpg)
Jenkins User Conference San Francisco, Sept 30 2012 #jenkinsconf
Migration from CC.NET to Jenkins
The good parts
Flexibility (master-slave, matrix jobs)
Security (Role-based Authorization Strategy)
![Page 14: Using Jenkins for the build and deployment of .NET applications](https://reader036.fdocuments.in/reader036/viewer/2022062408/56813160550346895d97d846/html5/thumbnails/14.jpg)
Jenkins User Conference San Francisco, Sept 30 2012 #jenkinsconf
Migration from CC.NET to Jenkins
The good parts
Visibility
![Page 15: Using Jenkins for the build and deployment of .NET applications](https://reader036.fdocuments.in/reader036/viewer/2022062408/56813160550346895d97d846/html5/thumbnails/15.jpg)
Jenkins User Conference San Francisco, Sept 30 2012 #jenkinsconf
Migration from CC.NET to Jenkins
The bad parts
Compatibility problems
Upgrades can cause regressions
Jenkins getting stuck sometimes
![Page 16: Using Jenkins for the build and deployment of .NET applications](https://reader036.fdocuments.in/reader036/viewer/2022062408/56813160550346895d97d846/html5/thumbnails/16.jpg)
Jenkins User Conference San Francisco, Sept 30 2012 #jenkinsconf
Migration from CC.NET to Jenkins
The ugly parts
Connecting slaves
Memory usage (2GB RAM with 40 slaves)
![Page 17: Using Jenkins for the build and deployment of .NET applications](https://reader036.fdocuments.in/reader036/viewer/2022062408/56813160550346895d97d846/html5/thumbnails/17.jpg)
Jenkins User Conference San Francisco, Sept 30 2012 #jenkinsconf
Migration from CC.NET to Jenkins
Supported features: CC.NET versus Jenkins
* - Works better
Feature CC.NET Jenkins
Perforce Yes Yes
MSBuild Yes Yes
NUnit Yes Yes*
NCover Yes Yes
Tray application Yes* Yes
Mail notifications
Yes Yes
![Page 18: Using Jenkins for the build and deployment of .NET applications](https://reader036.fdocuments.in/reader036/viewer/2022062408/56813160550346895d97d846/html5/thumbnails/18.jpg)
Jenkins User Conference San Francisco, Sept 30 2012 #jenkinsconf
(Side note) Using Jenkins for deployment
Currently with matrix jobs
Cannot reuse a lot of configuration
Hard to scale
![Page 19: Using Jenkins for the build and deployment of .NET applications](https://reader036.fdocuments.in/reader036/viewer/2022062408/56813160550346895d97d846/html5/thumbnails/19.jpg)
Jenkins User Conference San Francisco, Sept 30 2012 #jenkinsconf
(Side note) Using Jenkins for deployment
Future plans
Goal: 1 execution scenario for all environments
NodeLabel Parameter
Parametrized Trigger plugins
![Page 20: Using Jenkins for the build and deployment of .NET applications](https://reader036.fdocuments.in/reader036/viewer/2022062408/56813160550346895d97d846/html5/thumbnails/20.jpg)
Jenkins User Conference San Francisco, Sept 30 2012 #jenkinsconf
Lessons learned
For a new .NET project definitely use Jenkins
If you’re want to a plugin, test it with slaves and matrix jobs
Don’t execute anything on the master
![Page 21: Using Jenkins for the build and deployment of .NET applications](https://reader036.fdocuments.in/reader036/viewer/2022062408/56813160550346895d97d846/html5/thumbnails/21.jpg)
Jenkins User Conference San Francisco, Sept 30 2012 #jenkinsconf
Lessons learned
Use one of the config versioning plugins
Separate your builds from your config
Don’t allow anonymous configuration acces
![Page 22: Using Jenkins for the build and deployment of .NET applications](https://reader036.fdocuments.in/reader036/viewer/2022062408/56813160550346895d97d846/html5/thumbnails/22.jpg)
Jenkins User Conference San Francisco, Sept 30 2012 #jenkinsconf
Lessons learned
A good Jenkins setup won’t save you from a bad build system
Try to rotate developers on „build duty”
![Page 23: Using Jenkins for the build and deployment of .NET applications](https://reader036.fdocuments.in/reader036/viewer/2022062408/56813160550346895d97d846/html5/thumbnails/23.jpg)
Jenkins User Conference San Francisco, Sept 30 2012 #jenkinsconf
Q & A & other stuff
Godsend:– https://
wiki.jenkins-ci.org/display/JENKINS/Installing+Jenkins+as+a+Windows+service
– https://wiki.jenkins-ci.org/display/JENKINS/Hudson+windows+service+fails+to+start
Thank you for watching!http://www.adobe.com/products/business-catalyst.html
![Page 24: Using Jenkins for the build and deployment of .NET applications](https://reader036.fdocuments.in/reader036/viewer/2022062408/56813160550346895d97d846/html5/thumbnails/24.jpg)
Jenkins User Conference San Francisco, Sept 30 2012 #jenkinsconf
Thank You To Our Sponsors