azure - 如何使用 YAML 配置文件在 VSTS 中的 VS2017 代理中启动 Azure 存储模拟器

标签 azure azure-devops azure-storage azure-pipelines azure-pipelines-build-task

在我的 azure-pipelines.yml 文件中,我有此任务:

- task: VSTest@2
  inputs:
    platform: '$(buildPlatform)'
    configuration: '$(buildConfiguration)'

在我的集成测试中,我同时使用 MSQLLocalDB(看起来工作正常)和 AzureStorageEmulator(工作不正常)。

我想尝试this answer .

如何添加这些命令:

sqllocaldb create MSSQLLocalDB
sqllocaldb start MSSQLLocalDB
sqllocaldb info MSSQLLocalDB

"C:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator\AzureStorageEmulator.exe" start

在测试任务之前运行,以便在测试开始之前拥有正在运行的 Azure 存储模拟器实例?

最佳答案

试试这个:

- script: '"C:\Program Files\Microsoft SQL Server\130\Tools\Binn\SqlLocalDB.exe" create "v13.0" 13.0 -s'
  displayName: 'Init Test Db'

- script: '"C:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator\AzureStorageEmulator.exe" start'
  displayName: 'Start Storage Emulator'

需要位于 vs2017-win2016 vmImage 上。

关于azure - 如何使用 YAML 配置文件在 VSTS 中的 VS2017 代理中启动 Azure 存储模拟器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52787601/

相关文章:

azure - 开始-AzureStorageBlobCopy 与 AzCopy : which one takes lesser time

sql-server - 如何检索日志以调查 Azure SQL Server 中删除的数据库用户?

c# - 如何从同一 Azure AD 中的另一个 Web 应用程序访问 Web api?

c# - 如何确定是什么正在重置我的连接?

azure - 如何调整 SQL Azure 数据库的大小

angular - 在我的 Angular2 环境中使用 typescript 使用/导入 azure-storage

azure - 使用 VScode Azure 认知服务扩展一次在索引中插入多个文档。 (Azure 搜索服务)

azure - 需要在Azure Devops中实现发布管道中的回滚

azure-devops - 如何通过 SSH/RDP 连接到 ADO 代理以调查构建问题?

azure - 截至 2020 年,对通过 Azure Web App 上传到 Azure block 存储的文件进行病毒扫描