Jenkins to automate deployment of ASP.NET applications

Is there any possibility to automate/semi-automate deployments of ASP.NET web applications using Jenkins. It can be under controlled or uncontrolled environments, for uncontrolled user needs to enter userid and password. I am looking out for ways to copy the files from target to destination and run sql scripts in web farm scenario.

Edit
Currently we are using bat files to xcopy/configure app pool/sql cmd, etc to deploy the application. But for this to work, production support team needs to download the source code, build the project and run the bat files to deploy the application.

Now, we want to automate the deployment without user downloading the source code and end user just needs to visit a url and fill userid and password parameters and select svn tag and it should get deployed. But Jenkins is running under anonymous login, so the existing bat file will not work since it doesn’t have permissions to run the script.

So, I would like to know if there exists any alternatives for this kind of situation. It will be good if user context is impersonated by using entered userid and password allowing existing batch file to run without further changes. If it is not possible, we would like to explore other ideas too but we don’t have flexibility to choose a automated tool like puppet, etc, we should stick around with these batch files.

2

I’ll share what we’ve been using, and where we’re planning on going, maybe it’ll help give you a better idea.

  • We currently use Jenkins and Github together– once something is merged into master, Github tells Jenkins and it kicks off a build.
  • We use a Nant script on Jenkins to build the project, run unit tests, and if everything looks good, it kicks off another Jenkins project. The Nant script also spits out a directory with fully compiled code/minimized CSS/JS, etc.
  • The secondary Jenkins project takes the output from the build, and sends it back up to Github, on a separate repository.
  • A .BAT file runs every 5 minutes on the staging web server, and it basically checks for updates to that repository. If an update is found, we download the latest build, backup our staging files, then deploy the newest build over to staging folder.
  • To go live, we have a .BAT file that handles backing up the live files, and copying the repository files over the live files. It’s run manually. It doesn’t handle SQL updates (we do those by hand).

Now, obviously this isn’t totally ideal but it’s working for us. We want to expand this in the future to:

  • Use Web Deploy to push the files from Jenkins straight to IIS, and do any other commands we need to run.
  • Use automatic migrations (a feature of Entity Framework) to handle all SQL updates, as part of the go live.

3

I am already using Jenkins for .Net apps and TFS.

  1. Add required configuration in your project and transformation & check-in the code.
  2. Get the latest from TFS (use TFS Plug-in)
  3. Build the Project (use MSBuild Plug-in). you can publish the code from Msbuild using command line arguments.
  4. Sync the code from publish location to destination using msdeploy.exe command (located at
    “C:Program Files (x86)IISMicrosoft Web Deploy V2msdeploy.exe”)
  5. You can send emails and do the backup via Jenkins too.

You can also use MSTest.exe to execute unit test and show it at jenkin console or publish the test result also.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật