Jenkins

1.強制全部用戶查看系統的時候,都顯示英文

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

首先安裝一個叫作 locale 的插件,而後打開系統配置web

 

 

2.在一個項目中,clone多個repository

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

 

With the Multiple SCMs Plugin:post

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

  • 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.spa

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-siterest

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

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_HOME\CodeCoverage>whoami
nt authority\system   對應的是LocalSystem

D:\JENKINS_HOME\CodeCoverage>whoami
asnet\sa-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
相關文章
相關標籤/搜索