English 中文(简体)
2. 团队指挥线建设操作员: 如何使建筑失败?
原标题:TeamCity command line build runner: How to make the build fail?

我们重新使用团队指挥线建造了操作员,以打造一个分辨器。 书面文件通过将2008年视觉演播室称为“七十五.exe”来建立我们的解决办法,然后进行单位测试,并创建正确的文件夹结构。

我们想做的是,如果要求破灭,使团队认识到该建筑失败,就停止执行该书。 我们可以通过检查 Errorlevel(如果建筑失败,为1台)来追捕失败的静脉冲,此时我们能够从我们的战线上撤出。 但是,,我们怎么能告诉团队,建筑失败了?

这是我们尝试的:

call "build.bat"
IF ERRORLEVEL 1 EXIT /B 1

但是,团队精神并没有承认我们的撤离守则。 而建筑标志则认为:

[08:52:12]: ========== Build: 28 succeeded or up-to-date, 1 failed, 0 skipped ==========
[08:52:13]: C:\_workBuildAgentworkcd14331c8d63b39Build>IF ERRORLEVEL 1 EXIT /B 1 
[08:52:13]: Process exited with code 0
[08:52:13]: Publishing artifacts
[08:52:13]: [Publishing artifacts] Paths to publish: [build/install, teamcity-info.xml]
[08:52:13]: [Publishing artifacts] Artifacts path build/install not found
[08:52:13]: [Publishing artifacts] Publishing files
[08:52:13]: Build finished

因此,团队会报告,该建筑是成功的。 我们如何能够解决这个问题?

<>Solution:

TeamCity provides a mechanism called Service Messages which can be used to handle situations like this. I ve updated my build script to look like the following:

IF %ERRORLEVEL% == 0 GOTO OK
echo ##teamcity[buildStatus status= FAILURE  text= {build.status.text} in compilation ]
EXIT /B 1
:OK

因此,小组会报告,由于“汇编中的失败”,我的建筑工作失败。

最佳回答
问题回答

暂无回答




相关问题
How to speed up Visual Studio 2008? Add more resources?

I m using Visual Studio 2008 (with the latest service pack) I also have ReSharper 4.5 installed. ReSharper Code analysis/ scan is turned off. OS: Windows 7 Enterprise Edition It takes me a long time ...

Trouble with VS.PHP installing it s own Apache server

I tried installing VS.PHP some time ago. I was intent on seeing how it works with my current setup. I immediately encountered trouble: none of my sites wanted to render. On windows, I m using WAMP ...

Jquery and Intellisense in VS 2008 with hotfix and SP1

I followed Scott Guthrie s instructions as outlined at http://weblogs.asp.net/scottgu/archive/2008/11/21/jquery-intellisense-in-vs-2008.aspx but no avail: intellisense still doesn t work. Any tips?

Fixing "error C2065: undeclared identifier"

First off, I m completely out of my depth here. So the question might be the wrong one to ask, but here goes... As per the accepted answer to this question, I m trying to compile the bindings for the ...

View whitespace in VS2008

After Jeph most recent post: http://www.codinghorror.com/blog/archives/001310.html, I thought to myself it would be fun to see if any of my code has those trailing whitespaces. So I open Visual ...

热门标签