matrix configuration mssql2017 then mssql2016 i.e. services as dimension

MR S N JAMES's Avatar


31 Dec, 2017 01:25 PM


new to AppVeyor, this is an amazing system. - I just set up which is a c++ odbc wrapper in Node JS and right now I am iterating over node 4,5,6,7,8,9 on platforms x64, x86.

ideally I would like also to add a service dimension i.e. run against different instances of sql server as a dimension, is this possible? if i add say 2 versions to services appveyor installs them both, meaning I would then have to set up the test suite to connect to both one after the other?

version: 1.0.{build}
image: Visual Studio 2017
clone_folder: c:\projects\node_modules\msnodesqlv8
  - nodejs_version: 4
  - nodejs_version: 5
  - nodejs_version: 6
  - nodejs_version: 7
  - nodejs_version: 8
  - nodejs_version: 9

  - x86
  - x64

  - mssql2017

  1. Support Staff 1 Posted by Ilya Finkelshte... on 02 Jan, 2018 12:45 AM

    Ilya Finkelshteyn's Avatar

    Thank you for good words! Right, services are not matrix dimension. Yes you can run tests in against different SQL Server instances inside one job, but having SQL-Server-specific matrix job would be clearer. For that you can use different environment variables you can make it work in matrix style.

    All SQL Server installations are hard-coded to use port 1433. So you need to set them to use dynamic ports to start simultaneously. You can use this "issue" to have all versions except one to listen on 1433 so you will know that on specific matrix job specific version of SQL server is listening on 1433. Look at this sample:

    - ps: set-itemproperty -path "HKLM:\software\microsoft\microsoft sql server\$env:SqlRegKey\mssqlserver\supersocketnetlib\tcp\ipall" -name TcpDynamicPorts -value "0"
    - ps: set-itemproperty -path "HKLM:\software\microsoft\microsoft sql server\$env:SqlRegKey\mssqlserver\supersocketnetlib\tcp\ipall" -name TcpPort -value ""
      - SqlRegKey: mssql13.SQL2016
      - SqlRegKey: mssql14.SQL2017
    - mssql2016
    - mssql2017

    Here when SqlRegKey is mssql13.SQL2016, SQL Server 2017 is listening on 1433.

    In addition you can use the same environment variables to stop unneeded SQL Servers. You can RDP to build worker, or run something like - ps: Get-Service | findstr /psi "sql" to get correct services names.

  2. Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 02:25 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac