【发布时间】:2016-06-13 01:01:10
【问题描述】:
如何使此构建设置始终如一地工作?
我有一个构建设置,有时会失败。
如果我重试构建,它可能会成功,也可能不会成功。
我的构建环境似乎有问题。
环境:
- GitLab CI 多运行器
- Windows Server 2012
- 以管理员用户身份运行。
GitLab CI 多运行器配置:
concurrent = 1
[[runners]]
url = "http://gitlab.xxxxx.com/ci"
token = "xxxxxxxxxxxxxxxxxxxxxxx"
tls-skip-verify = false
tls-ca-file = ""
name = "XXXXXXX"
executor = "shell"
解决办法:
- 2 C# 控制台应用程序
- SQL Server 2014 数据库
- C# 单元测试项目
- NuGet
- 实体框架
构建输出:
gitlab-ci-multi-runner 0.7.2 (998cf5d)
Using Shell executor...
Running on XXXXXXX...
Cloning repository...
Cloning into 'C:\Multi-Runner\builds\db00f967\0\xxxxx-log-parser'...
Checking out 344bae64 as master...
devenv "Solution\xxxxx-log-parser.sln" /build Release
Microsoft Visual Studio 2015 Version 14.0.24720.0.
Copyright (C) Microsoft Corp. All rights reserved.
1>------ Build started: Project: xxxxx-database, Configuration: Release Any CPU ------
1> C:\Windows\Microsoft.NET\Framework\v4.0.30319\Csc.exe /noconfig /nowarn:1701,1702,2008 /nostdlib+ /errorreport:prompt /warn:4 /define:TRACE /errorendlocation /preferreduilang:en-US /highentropyva+ /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\mscorlib.dll" /debug:pdbonly /optimize+ /out:obj\Release\xxxxx_database.dll /subsystemversion:6.00 /target:library /warnaserror- /utf8output "C:\Users\user\AppData\Local\Temp\.NETFramework,Version=v4.5.SqlClrAttributes.cs"
1> Loading project references...
1> Loading project files...
1> Building the project model and resolving object interdependencies...
1> Validating the project model...
1> Writing model to C:\Multi-Runner\builds\db00f967\0\xxxxx-log-parser\Solution\xxxxx-database\obj\Release\Model.xml...
1> xxxxx-database -> C:\Multi-Runner\builds\db00f967\0\xxxxx-log-parser\Solution\xxxxx-database\bin\Release\xxxxx_database.dll
1> xxxxx-database -> C:\Multi-Runner\builds\db00f967\0\xxxxx-log-parser\Solution\xxxxx-database\bin\Release\xxxxx-database.dacpac
2>------ Build started: Project: xxxxx-log-parser, Configuration: Release Any CPU ------
2> xxxxx-log-parser -> C:\Multi-Runner\builds\db00f967\0\xxxxx-log-parser\Solution\xxxxx-log-parser\bin\Release\xxxxx-log-parser.exe
3>------ Build started: Project: xxxxx-log-parser-tests, Configuration: Release Any CPU ------
4>------ Build started: Project: xxxxx-log-processor, Configuration: Release Any CPU ------
ERROR: Build failed with: exit status 255
【问题讨论】:
-
可能是您项目内部的依赖问题?如果构建单线程会出现这个错误吗?
-
感谢您的提示,我将尝试切换到 msbuild(这是使用 devenv)。
标签: c# build continuous-integration gitlab-ci devenv