0

在我的发布管道中,我的任务是在我的文件File Transform中插入几个变量。app.config任务成功完成,从日志看来,所有变量都被替换了,但是我的测试失败了,我觉得这是由于配置文件中的值错误造成的。我想检查该配置文件以验证值,但不知道如何下载它。

在日志中,我有以下内容:

2020-10-21T20:49:07.4398446Z ##[debug]Substituting original value in place of temp_name: CONFIG_FILE_SETTINGS_TOKEN(ClientId)
2020-10-21T20:49:07.4399269Z ##[debug]Substituting original value in place of temp_name: CONFIG_FILE_SETTINGS_TOKEN(ImpersonatedUserGuid)
2020-10-21T20:49:07.4400093Z ##[debug]Substituting original value in place of temp_name: CONFIG_FILE_SETTINGS_TOKEN(AccountId)
2020-10-21T20:49:07.4400969Z ##[debug]Substituting original value in place of temp_name: CONFIG_FILE_SETTINGS_TOKEN(PrivateKey)
2020-10-21T20:49:07.4404687Z ##[debug]Substituting original value in place of temp_name: CONFIG_FILE_SETTINGS_TOKEN(Username)
2020-10-21T20:49:07.4405392Z ##[debug]Substituting original value in place of temp_name: CONFIG_FILE_SETTINGS_TOKEN(Password)
2020-10-21T20:49:07.4406068Z ##[debug]Substituting original value in place of temp_name: CONFIG_FILE_SETTINGS_TOKEN(tokenReplacementInSeconds)
2020-10-21T20:49:07.4406744Z Config file : D:\a\r1\a\testautomation\tests\NDS\bin\Release\net48\NDS.dll.config updated.
2020-10-21T20:49:07.4407872Z XML variable substitution applied successfully.
2020-10-21T20:49:07.4468956Z ##[section]Finishing: File Transform: app.config

从日志中我试图弄清楚如何下载D:\a\r1\a\testautomation\tests\NDS\bin\Release\net48\NDS.dll.config已更新的文件。

有谁知道我怎么能做到这一点?即使将文件内容打印到日志文件也足以让我验证。

4

1 回答 1

1

如果您在发布管道中使用它,您可以将任务移动到构建管道并将文件发布为工件。这是一种选择。

另一个选项可以是Azure 文件复制任务,因此您可以将文件复制到 Azure Blob,然后您可以检查您的文件。

当然,您也可以从托管测试环境的地方获取文件。(你没有提到它在哪里,所以我不能在这里多说)。

如果您有可用的 FTP,您可以在FTP 上传任务中复制您的文件。

如果您只是将文件打印到输出中,您的秘密将被替换,***因此您可能无法按需要进行验证。

于 2020-10-29T16:34:56.500 回答