在vs2017-win2016托管代理上使用SQL Server docker容器

时间:2019-04-26 13:51:49

标签: sql-server azure docker azure-devops

我正在尝试使用Azure Pipelines在Windows和Linux上为pymssql创建更简化的CI流程。 Linux构建能够成功下载并启动Docker MSSQL映像以进行集成测试,但是当我尝试在Windows上执行相同操作时,即使45分钟超时,映像也从未成功下载。是否有人成功在MS Windows Hosted Agent上启动了Docker MSSQL容器?

https://dev.azure.com/alexander-hagerman/pymssql/_build/results?buildId=48

azure-pipelines.yaml

jobs:

- job: Windows
  timeoutInMinutes: 45
  pool:
    vmImage: 'vs2017-win2016'
  strategy:
    matrix:
      Python37:
        python.version: '3.7'

  steps:
  - task: UsePythonVersion@0
    displayName: 'Use Python $(python.version)'
    inputs:
      versionSpec: '$(python.version)'

  - script: docker run -d -p 1433:1433 -e sa_password=YourStrong@Passw0rd -e ACCEPT_EULA=Y microsoft/mssql-server-windows-developer:latest
    displayName: 'Start SQL Server container service'

  - script: cp tests/tests.cfg.tpl tests/tests.cfg
    displayName: "Create config file from template for test connections."

  - script: pip install tox cython
    displayName: 'Install initial dependencies'

  - script: tox -e py
    displayName: 'Run Tox'

0 个答案:

没有答案