Jenkins自动化构建.net项目
Execute Windows batch command
E:\software\nuget.exe restore -nocache F:\xyfm-saas\Source\xyfm-Elefang\Elefang.sln -Source https://www.nuget.org/api/v2/ E:\software\nuget.exe restore -nocache F:\xyfm-saas\Source\xyfm-saas\Saas-Main\云平台主项目.sln -Source https://www.nuget.org/api/v2/ E:\software\nuget.exe restore -nocache F:\xyfm-saas\Source\Saas-BackendAdmin\房盟后台管理.sln -Source https://www.nuget.org/api/v2/ C:\progra~2\MSBuild\14.0\Bin\MSBuild.exe F:\xyfm-saas\Source\Saas-BackendAdmin\ShengYiOa\ShengYiOa.csproj /m /t:Rebuild /p:Configuration=Release;PublishProfile=sit-fm-svn;DeployOnBuild=true;VisualStudioVersion=14.0;WebProjectOutputDir=F:\Jenkins_Publish
备忘:
1. 在Jenkins2.138.4版本之后,构建结束exit 0会持续很长时间,解决办法:在Jenkins的安装路径,打开jenkins.xml,在/service/arguments节点中(-jar之前)添加-DSoftKillWaitSeconds=0,问题解决。
2. visualSVN 钩子(自动更新)
"C:\Program Files\VisualSVN Server\bin\svn.exe" update "d:\xyfm-test-www" --username xyfm-test --password xyfm-test
3. 避免git切换分支失败,需要先撤销所有本地更改,命令为:
git checkout .
4. 若要使用bat命令操作git,需在安装git时勾选允许命令行操作: