GitLab Ci使用记录

Posted by hqpsoft on December 25, 2016

工具集合

部署疑难杂症solution

  • 关于msbuild发布提示文件路径长度超过256的问题
    ``` 修改C:\Program Files (x86)\MSBuild\14.0\Bin\Microsoft.Common.targets 在
下添加D:\Temp 或者直接在项目的csproj的添加也可以 ``` * 关于CI发版, webconfig transfer转换与本地vs预览效果不一致的问题 ``` 关于这个问题, 通过排查找到的原因是site下的其他文件夹还有webconfig文件导致没有使用根目录下 webconfig文件 ``` * 关于CI部署的时候出现`Not possible to fast-forward, aborting`的问题 ``` 这个问题是pre分支和dev分支滞后了,2种解决方案: 1:删除pre,重新从master从创建分支,然后dev合并到pre 2:本地用命令执行下在dev分支下执行merge(git merge oringin/pre) ``` * 关于部署出现`The OutputPath property is not set for project "xxxx"问题`. ``` 这个问题是webconfig transfer配置导致, 要配置成全局的 ``` * 关于部署出现`Your local changes to the following files would be overwritten by checkout问题`. ``` 这个问题我们的之前的项目是从tfs迁移过来的, 解决方案是打开项目根目录的`.gitattributes`文件,把开头的 `* text=auto`注释掉,像这样`#* text=auto` ``` * 关于部署出现提示服务器权限/授权等信息问题. ``` 这种一般是IIS网站没有启用msbuild部署 ``` # powershell远程更新文件(设置目录共享) ``` Copy-item -Path E:/Git\fire-proj/build.fsx -Destination \\WIN-DEVTEST-004\gitlab-runner -recurse Copy-item -Path E:/Git\fire-proj/build.fsx -Destination \\WIN-DEVTEST-003\gitlab-runner -recurse Copy-item -Path E:/Git\fire-proj/build.fsx -Destination \\WIN-DEVTEST-002\gitlab-runner -recurse Copy-item -Path E:/Git\fire-proj/build.fsx -Destination \\192.168.200.25\gitlab-runner -recurse ``` # 设置webconfig的加密方式 ``` aspnet_regiis.exe -pef "connectionStrings" "D:\Git\J-Go\fire-proj\src\Uoko.FireProj.WebSite" ```
Creative Commons License
This work is licensed under a CC A-S 4.0 International License.