使用发布管理客户端(更新 2)附带的发布模板,我们正在尝试使用 TFS 构建和发布管理服务器 2013 更新 2 进行自动部署。
一切都很顺利,直到我们决定开始使用标记化的 Web.Config (Web.config.token) 来帮助我们管理部署。
看起来很简单,在发布模板组件中创建变量,并将匹配的 __VARIABLES__ 放入重复的 Web.config.token 中。
将构建模板设置为处理构建令牌并点击 go。
构建似乎并没有真正处理令牌文件,我们只剩下原始的 Web.config。任何想法我做错了什么?
它说它正在处理令牌,但实际上并没有做任何事情。构建日志:
Overall Build Process
Overall build process
Update build number
Run on agent (reserved build agent {Redacted} Build - Agent 2)
Initialize environment
Get sources from Team Foundation Version Control
Associate the changesets that occurred since the last good build
Compile, Test and Publish
Run optional script before MSBuild
Run MSBuild
Built {Redacted}.sln for default targets.
Built ${Redacted}.csproj for default targets.
Built $/{Redacted}/.nuget/NuGet.targets for target(s) _DownloadNuGet.
Built $/{Redacted}.Database.sqlproj for default targets.
MSBuild Log File
Run optional script after MSBuild
Process the release
Get the Build Directory
If ProcessReleaseTokens is set
Initialize tokens
Prepare folder to search
Find all .token files
Process each .token file
Rename files
Assign
Remove read-only flag from x.y
Copy x.y.token to x.y
If ReleaseBuild is set
Try to release the build
Get the build details
Initialize release build variables
Get the Release Management install directory
Verify the Release Management install directory
Get the Release Management install directory (x64)
Get the Team Project Collection instance
If ConfigurationsToRelease is not set
Copy binaries to drop
Process each ConfigurationsToRelease
Release the build
Run the Release Management build process for the current configuration
Microsoft.TeamFoundation.Release.Build starting process...
Processing using the following parameters:
TeamFoundationServerUrl: {Redacted}
TeamProjectName: {Redacted}
TeamProjectWithCollection: {Redacted}
BuildDefinitionName: {Redacted}
BuildNumber: {Redacted}
TargetStage:
Creating the release and waiting for deployment result...
Release was created and deployment was successful.
If a Release Build error cccurs
Skipped due to successful completion
Run optional script before Test Runner
Run VS Test Runner
Run optional script after Test Runner
Get Impacted Tests
Publish Symbols
Perform Final Actions On Agent
Copy binaries to drop
Reset the Environment