Conditional Build -- what syntax?

jay's Avatar

jay

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
-
  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
  -

  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

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

Recent Discussions

20 Mar, 2019 11:36 PM
20 Mar, 2019 09:03 PM
20 Mar, 2019 08:55 PM
20 Mar, 2019 08:48 PM
20 Mar, 2019 08:02 PM