실패한 팀 파운데이션 빌드가 끝날 때 작업 품목 생성을 어떻게 비활성화 할 수 있습니까?
문제
Team Foundation Build를 사용하고 있지만 문제 추적을 위해 TFS를 아직 사용하지 않으므로 실패한 빌드에서 작업 항목 작성을 비활성화하고 싶습니다. 이것을 할 방법이 있습니까? 빌드 유형에 대해 tfsbuild.proj 파일의 작업 항목 정보를 주석화하려고 시도했지만 트릭은하지 않았습니다.
해결책
tfsbuild.proj의 속성 그룹 안에 이것을 추가하십시오 :
<SkipWorkItemCreation>true</SkipWorkItemCreation>
이것이 어떻게 작동하는지 궁금하다면 Microsoft.teamfoundation.build.targets Contians 다음과 같습니다.
<Target Name="CoreCreateWorkItem"
Condition=" '$(SkipWorkItemCreation)'!='true' and '$(IsDesktopBuild)'!='true' "
DependsOnTargets="$(CoreCreateWorkItemDependsOn)">
<PropertyGroup>
<WorkItemTitle>$(WorkItemTitle) $(BuildNumber)</WorkItemTitle>
<BuildLogText>$(BuildlogText) <a href='file:///$(DropLocation)\$(BuildNumber)\BuildLog.txt'>$(DropLocation)\$(BuildNumber)\BuildLog.txt</a >.</BuildLogText>
<ErrorWarningLogText Condition="!Exists('$(MSBuildProjectDirectory)\ErrorsWarningsLog.txt')"></ErrorWarningLogText>
<ErrorWarningLogText Condition="Exists('$(MSBuildProjectDirectory)\ErrorsWarningsLog.txt')">$(ErrorWarningLogText) <a href='file:///$(DropLocation)\$(BuildNumber)\ErrorsWarningsLog.txt'>$(DropLocation)\$(BuildNumber)\ErrorsWarningsLog.txt</a >.</ErrorWarningLogText>
<WorkItemDescription>$(DescriptionText) %3CBR%2F%3E $(BuildlogText) %3CBR%2F%3E $(ErrorWarningLogText)</WorkItemDescription>
</PropertyGroup>
<CreateNewWorkItem
TeamFoundationServerUrl="$(TeamFoundationServerUrl)"
BuildUri="$(BuildUri)"
BuildNumber="$(BuildNumber)"
Description="$(WorkItemDescription)"
TeamProject="$(TeamProject)"
Title="$(WorkItemTitle)"
WorkItemFieldValues="$(WorkItemFieldValues)"
WorkItemType="$(WorkItemType)"
ContinueOnError="true" />
</Target>
자체 빌드 스크립트 에서이 기능을 무시할 수 있지만 Microsoft는 상단에 Handy SkipworkItemCreation 조건을 제공하며 전체 대상의 실행을 취소하는 데 사용할 수 있습니다.
다른 팁
TFS2010 이상을 사용하는 경우 빌드 정의 자체에서이를 수행 할 수 있습니다.
에서 프로세스 탭 빌드 정의 세트 Create Work Item on failure
속성 false
(고급 섹션 아래)
제휴하지 않습니다 StackOverflow