Jenkins

1.强制所有用户查看系统的时候,都显示英文

https://stackoverflow.com/questions/12350707/jenkins-in-windows-shows-ui-in-russian-language

首先安装一个叫做 locale 的插件,然后打开系统配置

2.在一个项目中,clone多个repository

https://stackoverflow.com/questions/14843696/checkout-multiple-git-repos-into-same-jenkins-workspace

With the Multiple SCMs Plugin:

  • create a different repository entry for each repository you need to checkout (main project or dependancy project.

  • for each project, in the "advanced" menu (the second "advanced" menu, there are two buttons labeled "advanced" for each repository), find the "Local subdirectory for repo (optional)" textfield. You can specify there the subdirectory in the "workspace" directory where you want to copy the project to. You could map the filesystem of my development computer.

The "second advanced menu" doesn't exist anymore, instead what needs to be done is use the "Add" button (on the "Additional Behaviours" section), and choose "Check out to a sub-directory"

  • if you are using ant, as now the build.xml file with the build targets in not in the root directory of the workspace but in a subdirectory, you have to reflect that in the "Invoke Ant" configuration. To do that, in "Invoke ant", press "Advanced" and fill the "Build file" input text, including the name of the subdirectory where the build.xml is located.

Hope that helps. 

 3.Jenkins nuget restore website

https://stackoverflow.com/questions/46352956/nuget-package-restore-doesnt-install-packages-for-asp-net-web-site

https://stackoverflow.com/questions/29808177/nuget-automatic-restore-for-website

I also have the same problem described in the above question. I was wondering if you figured out how to do a nuget restore on the website without the project file. I do have a package.config in the website.

I tried a bunch of different things and the following command got me closer to a resolution, but not quite.

nuget restore packages.config -PackagesDirectory ..packages

The above command does restore the packages into the ..packages folder as expected, but I cannot figure out how to get the correct assemblies into the website's bin folder. 

需要restore两次,一次是restore Solution;另外一次需要用上面的命令,显式处理website项目的packages.config

4.Jenkins中使用visual studio编译solution

https://juristr.com/blog/2014/03/Jenkins-Build-Setup-Project/

需要使用devenv.com

5.环境变量的配置以及使用

Manage Jenkins-->Configure System

在global properties中add一个新的

使用方法%devenv.com%,需要注意的时候,value如果有空格的话,需要在外面加上双引号

6.发送邮件给多个用户

https://stackoverflow.com/questions/24291167/jenkins-do-not-send-emails-to-multple-recipients

 用逗号和空格来分隔邮箱,比如abc@**.com, bcd@**.com

 7.NUnit

https://stackoverflow.com/questions/9121312/how-do-you-run-nunit-tests-from-jenkins

 8.User 

不能使用LocalSystem这个账户进行nuget restore,因为代理的原因。

D:JENKINS_HOMECodeCoverage>whoami
nt authoritysystem   对应的是LocalSystem

D:JENKINS_HOMECodeCoverage>whoami
asnetsa-syg-guest     对应的是具体的账户,有用户名和密码

可以通过给系统配置代理来解决问题

https://serverfault.com/questions/34940/how-do-i-configure-proxy-settings-for-local-system

Copy IE proxy settings to WinHttp:

  • Run cmd as administrator:
    • netsh
    • winhttp
    • show proxy
    • import proxy source=ie
    • show proxy
原文地址:https://www.cnblogs.com/chucklu/p/8295573.html