Jenkins for .net in 5 Minutes

摘自:http://justinramel.com/2013/01/15/5-minute-setup/

Install
1.Download the latest version of Jenkins from: http://mirrors.jenkins-ci.org/windows/latest
2.Extract the setup files from the zip file.
3.Run the Setup.exe.
4.Accept all the defaults in the setup wizard.
5.Jenkins will now be installed and the main Jenkins page will be open.

Add required .NET Plugins
1.Download and install your required .NET framework from: http://www.microsoft.com/net/download
2.Open the Manage Plugins page, from the Jenkins menu select Jenkins » Manage Jenkins » Manage Plugins.
3.Click the “Available” tab.
4.Tick the “MSBuild” plugin.

Add optional .NET Plugins
1.Tick the plugin for the source control management software your using.
2.If you want to run unit tests as part of your build Tick your chosen testing plugin, this guide will use NUnit.
3.Tick the “Active Directory Plugin” if you want to use Active Directory for Authentication.

Setup Jenkins
1.Open the main setup page, from the Jenkins menu select Jenkins » Manage Jenkins » Configure System.
2.Under the MSBuild section, click the “Add MSBuild” button.
3.Set the name and path to MSBuild for example: Name: v3.5 Path to MSBuild: C:\Windows\Microsoft.NET\Framework\v3.5\MSBuild.exe
4.Click the “Save” button.

Setting up your first job
1.From the Jenkins menu click Jenkins » New Job.
2.Set Job name for example: Demo.
3.Select the “Build a free-style software project” radio button.
4.Then click the “OK” button.
5.Jenkins will now create the Job workspace on disk and redirect you to the job configuration page.

Source Control

This guide will use Subversion but there are many available.
1.Under the Source Control Management section select the “Subversion” radio button.
2.Set the Repository URL for example: https://jenkins-net-demo.googlecode.com/svn/trunk

Build Triggers
1.Under the Build Triggers section, tick the Poll SCM checkbox.
2.Enter “5 * * * *” in the Schedule text area, this translates to check for changes every 5 minutes.

Build the Solution
1.Under the Build section click the “Add build step” button and select “Build a Visual Studio project or solution using MSBuild”.
2.Set “MsBuild Version” to V3.5 (The version we setup previously)
3.Set “MsBuild Build File” to the name of the demo solution: Jenkins-net-demo.sln
4.Click the “Save” button and you’ll be redirected to the Demo project page
5.Click the “Build Now” link.

You’re done!
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值