Parse errors on Multiple Configurations

adamv's Avatar

adamv

06 Nov, 2015 06:31 AM

I feel really dumb but I just can't get the following to work in my yml file:

# configuration for "master" branch
# build in Release mode and deploy to Azure
-
  branches:
    only:
      - master

  configuration: Release
  deploy:
    provider: AzureCS
    ...

# configuration for all branches starting from "dev-"
# build in Debug mode and deploy locally for testing
-
  branches:
    only:
      - /dev-.*/

  configuration: Debug
  deploy:
    provider: Local
    ...

# "fall back" configuration for all other branches
# no "branches" section defined
# do not deploy at all
-
  configuration: Debug

I copied it directly out of the documentation and its failing the linter in Atom as well as online parsers.

Is there something im missing???

  1. Support Staff 1 Posted by Feodor Fitsner on 06 Nov, 2015 06:35 AM

    Feodor Fitsner's Avatar

    Well, I've just removed ... from that sample and it passes validation:

    # configuration for "master" branch 
    # build in Release mode and deploy to Azure 
    - 
      branches: 
        only: 
          - master
    
      configuration: Release 
      deploy: 
        provider: AzureCS 
    
    # configuration for all branches starting from "dev-" 
    # build in Debug mode and deploy locally for testing 
    - 
      branches: 
        only: 
          - /dev-.*/
    
      configuration: Debug 
      deploy: 
        provider: Local 
    
    # "fall back" configuration for all other branches 
    # no "branches" section defined 
    # do not deploy at all 
    - 
      configuration: Debug
    
  2. 2 Posted by adamv on 06 Nov, 2015 06:43 AM

    adamv's Avatar

    Thanks! I tried putting that in my yml and I am still getting parsing errors from being inside my actual file.

    version: 1.5.{build}

    # configuration for "master" branch
    # build in Release mode and deploy to Azure
    -
      branches:
        only:
          - master

      configuration: Release
      deploy:
        provider: AzureCS

    # configuration for all branches starting from "dev-"
    # build in Debug mode and deploy locally for testing
    -
      branches:
        only:
          - /dev-.*/

      configuration: Debug
      deploy:
        provider: Local

    # "fall back" configuration for all other branches
    # no "branches" section defined
    # do not deploy at all
    -
      configuration: Debug

    I'm sure its just cause I suck at yml but I dont understand why this isnt working.

  3. 3 Posted by adamv on 06 Nov, 2015 06:46 AM

    adamv's Avatar

    Oh... I think I get it now... does everything have to now be inside of that list item since we now have a list?

  4. Support Staff 4 Posted by Feodor Fitsner on 06 Nov, 2015 06:48 AM

    Feodor Fitsner's Avatar

    Yes, topmost element must be either a list of hash.

    Also, you can validate yml here: https://ci.appveyor.com/tools/validate-yaml

  5. 5 Posted by adamv on 06 Nov, 2015 06:57 AM

    adamv's Avatar

    I got it now. Thanks for your extremely fast response!

  6. adamv closed this discussion on 06 Nov, 2015 06:58 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