Conditional Build -- what syntax?
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
-
branches:
only:
- production
after_build:
- ps: xcopy /i /s $env:project_name\bin\Debug publish\$env:appveyor_build_version
...
artifacts:
- path: publish
name: clickonce
deploy:
- provider: AzureBlob
...
notifications:
- provider: Email
subject: 'Build Production: {{status}}'
...
# test
-
branches:
only:
- test
...
# default, no deployment or notification
-
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

Support Staff 1 Posted by Feodor Fitsner on 13 May, 2015 09:56 PM
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.ymlis either a list (multiple branch configs) or a mapping (single branch config).2 Posted by jay on 13 May, 2015 10:19 PM
Thanks, that cleared it up. Docs may need a bit of a more detailed description here.
jay closed this discussion on 13 May, 2015 10:19 PM.