【问题标题】:How to start Azure Storage Emulator in VS2017 agent in VSTS using YAML configuration file如何使用 YAML 配置文件在 VSTS 中的 VS2017 代理中启动 Azure 存储模拟器
【发布时间】:2018-10-12 22:10:54
【问题描述】:

在我的 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 Storage Emulator 实例?

【问题讨论】:

  • 把脚本放到powershell脚本任务里试试吧
  • 你能以某种方式解决这个问题吗?我也有同样的问题:(
  • 不能。我必须使用真正的 Azure 存储帐户。

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


【解决方案1】:

试试这个:

- 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 上。

【讨论】:

    猜你喜欢
    • 2011-11-24
    • 1970-01-01
    • 1970-01-01
    • 2021-09-12
    • 2018-12-28
    • 2017-05-09
    • 2018-03-02
    • 2014-02-08
    相关资源
    最近更新 更多