Jenkins failed to execute batch file

Source: Internet
Author: User

Today build Jenkins continuous Integration environment, the compilation environment is. NET, there is no better code coverage test plug-in under. NET, so use open source Opencover, calculate code coverage, and then use Reportgenerator to export test reports in HMTL format. The batch script is used here, and here the problem arises.

After the script is written, it runs directly under the Windows system without any problems. But you have to put it in Jenkins as a compile-time execution, it will be an error, very strange. I also suspect that there is a problem with user rights. But it's still okay to run the script directly with a normal user. Google a bit in the afternoon. According to Http://stackoverflow.com/questions/10952280/ Execute-windows-batch-command-from-jenkins-fails-but-runs-fine-in-cmd-exe provided the way to try the OK.

The method is simple. is to sign in to Jenkins service.

Specific process:

Enter "Services.msc" in "Run" to open the service window and find "Jenkins".

Then right-click the property and select "This user" in the "login" navigation to any user who can run CMD.exe. Here I use the administrator user.

Jenkins failed to execute batch file

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.