How get a worker with VS2013, VS2015 and VS2017 & Cygwin32/64 installed

zosrothko's Avatar

zosrothko

17 Mar, 2017 12:23 PM

Hi
I am testing a software against the 3 version of VisualStudio: VS2013, VS2015 and VS2017. From the documentation, I understand that only one image can be choosen. Thus how can one gets the 3 VS cersion on one worker?
(BTW, I need also Cygwin & Cygwin64 available on the worker image)

  1. Support Staff 1 Posted by Ilya Finkelshte... on 17 Mar, 2017 06:18 PM

    Ilya Finkelshteyn's Avatar

    Don't you like idea of a build matrix? Image is actually first-class matrix dimension

    There are a lot of benefits in having separate jobs per scenario instead of single build.

    image:
    - Visual Studio 2013
    - Visual Studio 2015
    - Visual Studio 2017
    
  2. 2 Posted by zosrothko on 18 Mar, 2017 11:26 AM

    zosrothko's Avatar

    OK image as one matrix dimension is fine as soon as there is a environement variable that states which is the current image. And for now, it does not seems to be:

    7zip="C:\Program Files\7-Zip\7z.exe"
    ALLUSERSPROFILE=C:\ProgramData
    APPDATA=C:\Users\appveyor\AppData\Roaming
    APPVEYOR=True
    APPVEYOR_ACCOUNT_NAME=zosrothko
    APPVEYOR_API_URL=http://localhost:1031/
    APPVEYOR_BUILD_FOLDER=C:\projects\poco
    APPVEYOR_BUILD_ID=7559912
    APPVEYOR_BUILD_NUMBER=463
    APPVEYOR_BUILD_VERSION=build appveyor-refactoring-cygwin-463
    APPVEYOR_JOB_ID=cxn917o8lq8xnabc
    APPVEYOR_JOB_NAME=Environment: builder=msbuild, vsver=120, linkmode=shared; Platform: Win32
    APPVEYOR_PROJECT_ID=154638
    APPVEYOR_PROJECT_NAME=poco
    APPVEYOR_PROJECT_SLUG=poco
    APPVEYOR_REPO_BRANCH=appveyor-refactoring-cygwin
    APPVEYOR_REPO_COMMIT=7b21471e17d51a9e7c74fa0539e77067bbfe4892
    APPVEYOR_REPO_COMMIT_AUTHOR=FrancisANDRE
    APPVEYOR_REPO_COMMIT_AUTHOR_EMAIL=[email blocked]
    APPVEYOR_REPO_COMMIT_MESSAGE=Fix typo
    APPVEYOR_REPO_COMMIT_TIMESTAMP=2017-03-18T11:12:35.0000000Z
    APPVEYOR_REPO_NAME=Kampbell/poco
    APPVEYOR_REPO_PROVIDER=gitHub
    APPVEYOR_REPO_SCM=git
    APPVEYOR_REPO_TAG=false
    APPVEYOR_URL=https://ci.appveyor.com
    APR_ICONV_PATH=C:\Program Files (x86)\Subversion\iconv
    AVVM_DOWNLOAD_URL=http://av1southus4workers.blob.core.windows.net/downloads/avvm
    builder=msbuild
    bundling=bundled
    ChocolateyInstall=C:\ProgramData\chocolatey
    ChocolateyLastPathUpdate=Wed Dec 28 22:23:13 2016
    CI=True
    CodeContractsInstallDir=C:\Program Files (x86)\Microsoft\Contracts\
    CommonProgramFiles=C:\Program Files\Common Files
    CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files
    CommonProgramW6432=C:\Program Files\Common Files
    COMPUTERNAME=APPVYR-WIN
    ComSpec=C:\windows\system32\cmd.exe
    Configuration=release
    DXSDK_DIR=C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\
    EnableNuGetPackageRestore=true
    ERLANG_HOME=C:\Program Files\erl7.3
    FP_NO_HOST_CHECK=NO
    GIT_LFS_PATH=C:\Program Files\Git LFS
    GOROOT=C:\go
    HOMEDRIVE=C:
    HOMEPATH=\Users\appveyor
    JAVA_HOME=C:\Progra~1\Java\jdk1.8.0
    lastexitcode=0
    linkmode=shared
    LOCALAPPDATA=C:\Users\appveyor\AppData\Local
    LOGONSERVER=\APPVYR-WIN
    M2_HOME=C:\Program Files (x86)\Apache\Maven
    MAVEN_HOME=C:\Program Files (x86)\Apache\Maven
    MSYS2_PATH_TYPE=inherit
    MYSQL32=C:\mysql-5.7.16-win32
    MYSQL64=C:\Program Files\MySql\MySQL Server 5.6
    NUMBER_OF_PROCESSORS=2
    OPENSSL_CONF=C:\OpenSSL-Win32\bin\openssl.cfg
    OS=Windows_NT
    Path=C:\ProgramData\chocolatey\bin;C:\Perl\site\bin;C:\Perl\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\7-Zip;C:\Program Files\Microsoft\Web Platform Installer\;C:\Tools\GitVersion;C:\Tools\PsTools;C:\Program Files\Git LFS;C:\Program Files (x86)\Subversion\bin;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\110\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\Microsoft SQL Server\120\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\ManagementStudio\;C:\Program Files\Microsoft Windows Performance Toolkit\;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Tools\WebDriver;C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.4\;C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\PrivateAssemblies\;C:\Program Files (x86)\Microsoft SDKs\Azure\CLI\wbin;C:\Ruby193\bin;C:\Tools\NUnit\bin;C:\Tools\xUnit;C:\Tools\MSpec;C:\Tools\Coverity\bin;C:\Program Files (x86)\CMake\bin;C:\go\bin;C:\Program Files\Java\jdk1.8.0\bin;C:\Python27;C:\Program Files\erl7.3\bin;C:\Program Files\nodejs;C:\Program Files (x86)\iojs;C:\Program Files\iojs;C:\Users\appveyor\AppData\Roaming\npm;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Program Files (x86)\MSBuild\14.0\Bin;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\SQLDB\DAC\120;C:\Tools\NuGet;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow;C:\Program Files\Amazon\AWSCLI\;C:\Windows\SysWOW64\WindowsPowerShell\v1.0\Modules\TShell\TShell\;C:\Program Files\Microsoft DNX\Dnvm;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\130\DTS\Binn\;C:\Program Files\Microsoft SQL Server\130\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\110\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\120\DTS\Binn\;C:\Program Files (x86)\Apache\Maven\bin;C:\Program Files\LLVM\bin;C:\Program Files\Microsoft Service Fabric\bin\Fabric\Fabric.Code;C:\Program Files\Microsoft SDKs\Service Fabric\Tools\ServiceFabricLocalClusterManager;C:\Python27\Scripts;C:\Tools\NUnit3;C:\Program Files\dotnet\;C:\Program Files\Git\cmd;C:\Program Files\Git\usr\bin;C:\Program Files\Mercurial\;C:\Program Files (x86)\Yarn\bin;C:\ProgramData\chocolatey\bin;C:\Program Files (x86)\nodejs\;C:\Users\appveyor.dnx\runtimes\dnx-clr-win-x86.1.0.0-rc1-update2\bin;C:\Users\appveyor\AppData\Local\Yarn.bin;C:\Users\appveyor\AppData\Roaming\npm;C:\Program Files\AppVeyor\BuildAgent\
    PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.PY;.CPL
    Platform=Win32
    POCO_BASE=C:\projects\poco
    POSTGRES32=C:\Program Files (x86)\PostgreSQL\9.4
    POSTGRES64=C:\Program Files\PostgreSQL\9.4
    PROCESSOR_ARCHITECTURE=AMD64
    PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 63 Stepping 2, GenuineIntel
    PROCESSOR_LEVEL=6
    PROCESSOR_REVISION=3f02
    ProgramData=C:\ProgramData
    ProgramFiles=C:\Program Files
    ProgramFiles(x86)=C:\Program Files (x86)
    ProgramW6432=C:\Program Files
    PROMPT=$P$G
    PSModulePath=C:\Users\appveyor\Documents\WindowsPowerShell\Modules;C:\Users\appveyor\Documents\WindowsPowerShell\Modules;C:\Program Files\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules\;C:\Program Files (x86)\Microsoft SQL Server\110\Tools\PowerShell\Modules\;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\PowerShell\Modules\;C:\Program Files (x86)\AWS Tools\PowerShell\;C:\Program Files\AppVeyor\BuildAgent\Modules;C:\Program Files (x86)\Microsoft SQL Server\130\Tools\PowerShell\Modules\;C:\Program Files\WindowsPowerShell\Modules\;C:\Program Files (x86)\Microsoft SDKs\Azure\PowerShell\ResourceManager\AzureResourceManager\;C:\Program Files (x86)\Microsoft SDKs\Azure\PowerShell\ServiceManagement\;C:\Program Files (x86)\Microsoft SDKs\Azure\PowerShell\Storage\
    PUBLIC=C:\Users\Public
    SESSIONNAME=Console
    SystemDrive=C:
    SystemRoot=C:\windows
    TEMP=C:\Users\appveyor\AppData\Local\Temp\1
    TMP=C:\Users\appveyor\AppData\Local\Temp\1
    USERDOMAIN=APPVYR-WIN
    USERDOMAIN_ROAMINGPROFILE=APPVYR-WIN
    USERNAME=appveyor
    USERPROFILE=C:\Users\appveyor
    VS100COMNTOOLS=c:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Tools\
    VS110COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\Tools\
    VS120COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\
    VS140COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\
    VS90COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\Tools\
    VSSDK120Install=C:\Program Files (x86)\Microsoft Visual Studio 12.0\VSSDK\
    VSSDK140Install=C:\Program Files (x86)\Microsoft Visual Studio 14.0\VSSDK\
    vsver=120
    windir=C:\windows
    WIX=C:\Program Files (x86)\WiX Toolset v3.10\
    xunit20=C:\Tools\xUnit20
    
  3. 3 Posted by zosrothko on 19 Mar, 2017 10:05 AM

    zosrothko's Avatar

    "There are a lot of benefits in having separate jobs per scenario instead of single build." That's right, but our single build script is made to work with any of this VS environment because it is up to the final user to build the software with the VS solution he wants. Thus, we do not provide 3 build scripts but only one that supports VS2005, VS2008, VS2012, VS2015 & VS2017. As one wants to keep this script a single file because it centralizes any change in on the build, one should have access to a environnement variable to select the proper parameter of the single script.

  4. Support Staff 4 Posted by Feodor Fitsner on 19 Mar, 2017 08:36 PM

    Feodor Fitsner's Avatar

    We've added APPVEYOR_BUILD_WORKER_IMAGE variable: https://github.com/appveyor/ci/issues/1417

  5. 5 Posted by zosrothko on 20 Mar, 2017 06:56 AM

    zosrothko's Avatar

    I would have expected a variable named 'Image' similar to others dimensions like 'Platform' or 'Configuration'

  6. Support Staff 6 Posted by Ilya Finkelshte... on 20 Mar, 2017 07:51 AM

    Ilya Finkelshteyn's Avatar
    • image is dimension for the matrix, and it is used by AppVeyor servers to provision VM for build.
    • APPVEYOR_BUILD_WORKER_IMAGE is for build code to be be able to answer the question "on what image am I currently running?"
  7. 7 Posted by zosrothko on 20 Mar, 2017 08:12 AM

    zosrothko's Avatar

    Yes, understood but there are others dimensions of the matrix that become also environement variables like Platform and Configuration. Thus I am expecting to see a variable named 'image' that correspondonds to the appveryor.yml, better than APPVEYOR_BUILD_WORKER_IMAGE.

    I do not see what's problem it means to use 'image' as variable's name. It is consistent with others names while APPVEYOR_BUILD_WORKER_IMAGE is not.

    Our script is using for example:

          if (!($env:builder -eq "cygwin"))
          {
            if ($env:platform -eq "Win32")
            {
    

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? 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