Deploying. NET applications using Jenkins

Source: Internet
Author: User

First download the required version from https://jenkins.io/download/

Here, choose Windows Edition to test.

Install Jenkins.msi directly, after installation use win+r input services.msc, you can see the service of Jenkins

Open address with browser: http://localhost:8080/, first Open will prompt to the installation directory in a TXT file to find the password, and then install the default recommended plug-in, after installation, the following interface appears:

Deploying. NET programs requires MSBuild plug-ins to find MSBuild in System Management-plug-in management-optional plugins:

Select Direct installation:

Installation Complete:

MSBuild settings appear in the System Management-tool configuration:

Set MSBuild Path

Default installation path for MSBuild

32 Guests C:\Program Files (x86) \msbuild\14.0\bin\msbuild.exe
64 guests C:\Program Files (x86) \msbuild\14.0\bin\amd64\msbuild.exe

When you are finished configuring, click the Save button at the bottom.

Next configure source control, here we use git to test

At this point, if you look at the tool configuration, Git is not available.

To https://git-scm.com/download the Windows 64-bit version of Git, install to the default directory

To https://sourceforge.net/projects/kdiff3/files/download the 64-bit KDIFF3, install to the default directory

To http://gitextensions.github.io/download gitextentions, the installation will not have to choose these two, because the above has been installed

Go back to just the setup there

Create a new repository to https://github.com/new before you create the task

Copy this address when you have finished creating:

Open Gitextensions, set the mailbox and user name in the tools--settings

Create a new archive

Add a default filter item

Click on the tool--putty--generate or Import key, click Generate, this time the mouse to move, and so the progress bar to finish

Copy the public key to GitHub's settings

Save the public and private keys locally.

Back to the main screen, select Archive--Manage remote archive

Click Test Connection after loading key, enter Y to

Login success will see the user name.

When you click Save, you will be prompted:

Click Submit

Refresh page on GitHub

Create a new MVC project using VS2015

It's simpler here, and there's no need for authentication.

Once the creation is successful, you can submit the

Now, start creating tasks in Jenkins.

Set your own address in source management:

Add authentication

You need to select after saving

There's no mistake when you choose.

Next, configure the build trigger, which is set up here:

* * * * *

Notice the middle space, where the cron expression is used, indicating that it is triggered once per minute

Next Configure the Build

Because NuGet is required for our applications, the NuGet is configured first

can be downloaded to http://www.nuget.org/Nuget.exe, here we put it under the D-plate

Add one more build step

Here are the settings to refer to:

MSBuild1

MSBuild command-line reference

Once saved you can click Build now

The blue flag is displayed when successful

You can see the automatically downloaded code in the installation directory of Jenkins

You can see the console output here

From the console you can see that the project was compiled successfully and published to a temporary directory:

Open Directory to see files

Create a new Web site with IIS to point to this directory, start the site to see the page

Then we change the code from the source code, such as the Ere page display, and then submit, you can see that Jenkins automatically started to create a

Build success

Refresh Page

Deploying. NET applications using Jenkins

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.