Parameterizing solution project to build

David Hall's Avatar

David Hall

19 May, 2017 12:50 PM

Hi,

Is it possible in the yaml specification to parameterize the project to build?

In my solution, I have to Azure projects - one for devtest and one for production, that deploy to different cloud services.

Currently appveyor is building both projects (plus the solution it seems) and it would great to be able to build a particular project based on (for example) the branch or an appveyor variable, as is possible for deployment.

  1. 1 Posted by Ilya Finkelshte... on 19 May, 2017 01:27 PM

    Ilya Finkelshteyn's Avatar

    Hi David,

    You can use environment variables as path to project file, like this:

    build:
      project: $(project_path)
    
    you can set this project_path variable to be path to specific project depending on conditions you define. Variable name project_path is arbitrary, you can name it as you like. Path can be absolute or relative to main repo folder.

    Ilya.

  2. 2 Posted by David Hall on 19 May, 2017 02:24 PM

    David Hall's Avatar

    Thanks for that.

    I've just tried this and it works perfectly.

    For those interested - I was also able to get it working through the appveyor UI, not needing a yaml file.

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

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

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