Conditional Build -- what syntax?

jay's Avatar


13 May, 2015 09:50 PM

I'm trying to set up a master/test/production branch based workflow where I deploy my application via ClickOnce using separate URLs for test & production. To do this, I've moved my after_build, artifacts, deploy, and notifications sections to a yml list per my interpretation of the docs. The error I'm receiving is:

Error parsing appveyor.yml: (Line: 31, Col: 1, Idx: 3063) - (Line: 31, Col: 2, Idx: 3064): While parsing a block mapping, did not find expected key.

My yml file looks like:

... the shared sections of my appveyor.yml file ...

        - production

        - ps: xcopy /i /s $env:project_name\bin\Debug publish\$env:appveyor_build_version

        - path: publish
          name: clickonce

        - provider: AzureBlob
        - provider: Email
          subject: 'Build Production: {{status}}'
  # test
        - test

  # default, no deployment or notification

  1. Support Staff 1 Posted by Feodor Fitsner on 13 May, 2015 09:56 PM

    Feodor Fitsner's Avatar

    What worries me is "... the shared sections of my appveyor.yml file ...". There is no possibility right now to share some sections between different branch configurations. The root of appveyor.yml is either a list (multiple branch configs) or a mapping (single branch config).

  2. 2 Posted by jay on 13 May, 2015 10:19 PM

    jay's Avatar

    Thanks, that cleared it up. Docs may need a bit of a more detailed description here.

  3. jay closed this discussion on 13 May, 2015 10:19 PM.

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