Continuous Integration ~ Jenkins builds GitHub project implementation, jenkinsgithub

Source: Internet
Author: User

Continuous Integration ~ Jenkins builds GitHub project implementation, jenkinsgithub

With the basis of the previous two lectures, we can now implement the github project in CI (jenkins) so that it can be automatically integrated and deployed for continuous integration ~ NuGet and MSBuild plug-ins in Jenkins, continuous integration ~ The powershell plug-in Jenkins has released a remote site. The procedure is as follows.

Perform jenkins operations

Http: // localhost: 8080/

Both the user and password are admin

Add work item

Add a free-style project

Add description

Add Source Code address and enter the account and password

Select git. If you use svn, select subversion. This depends on the actual situation.

Add nuget package recovery support

Restore and restore third-party referenced bags

Add msbuild compilation and release support

Compile and release your project to the specified position. This is an optional plug-in jenkins and can be expanded for installation.

Add powershell remote copy support

Powershell is a new tool language in the Microsoft environment. It is similar to the sh script but is more powerful than the latter. The following code project copies the directories on the original server to the target server, they use the net use command

$ RemoteDirPath = "\ DESKTOP-9KAK340 \ remote" Write-Host 'connect to the remote Host... 'Net use $ remoteDirPath "zzl"/user: "lind" Write-host' recursively copy a file (forced overwrite mode )... '$ files = Get-ChildItem-Path "C: \ Jenkins_Publish" # obtain the file foreach ($ file in $ files) {Copy-Item-Path $ file in the local directory. fullName-Destination $ remoteDirPath-Include "*"-Exclude ""-Recurse-Force} Write-host' directory copy is complete! '

Build a running project

You can run the build manually and automatically. To run the build automatically, You need to configure the corresponding cron script.

After the build is complete, we can see logs of success or failure, or output logs of the console, which are very friendly.

Thank you for reading this article!

Our research on CI persistent integration will continue!

 

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.