Uploaded image for project: 'Bamboo Data Center'
  1. Bamboo Data Center
  2. BAM-21510

YAML Spec scan fails if the include tag files contains permission definition

      Issue Summary

      YAML Specs extends YAML with the !include 'file' tag. The include tag expands to the content of the file where it is placed. If the YAML files contain permission, the Specs scan will fail.

      Steps to Reproduce

      1.  Define multiple YAML Spec files, which contains plan permission e.g. plan1.yml and plan2.yml
      2. Include the files in bamboo.yml file
        ---
        !include 'plan1.yml'
        ---
        !include 'plan2.yml'
        

      Expected Results

      Multiple plans should be created on Specs scan

      Actual Results

      Scan fails, with only one plan created, with error in log

       Invalid format of the YAML file: expected a single document in the stream
      

      Workaround

      Define each plan permission in the main bamboo.yml file, and not in each plan YAML file

      ---
      !include 'plan1.yml'
      ---
      !include 'plan2.yml'
      
      ---
      version: 2
      plan: PROJECT-PLAN1
      
      plan-permissions:
        - users: admin
          permissions:
            - admin
        - roles: logged-in
          permissions:
            - view
      
      ---
      version: 2
      plan: PROJECT-PLAN2
      
      plan-permissions:
        - users:
            - admin
          permissions:
            - view
          - roles: logged-in
          permissions:
            - view 

            [BAM-21510] YAML Spec scan fails if the include tag files contains permission definition

            Alexey Chystoprudov made changes -
            Link New: This issue causes BAM-25728 [ BAM-25728 ]
            SET Analytics Bot made changes -
            UIS Original: 3 New: 0
            SET Analytics Bot made changes -
            UIS Original: 0 New: 3
            SET Analytics Bot made changes -
            UIS Original: 1 New: 0
            SET Analytics Bot made changes -
            Support reference count Original: 4 New: 5
            SET Analytics Bot made changes -
            UIS New: 1
            Venkata Sateesh Pentela made changes -
            Remote Link New: This issue links to "Page (Atlassian Documentation)" [ 964780 ]
            SET Analytics Bot made changes -
            Support reference count Original: 3 New: 4
            SET Analytics Bot made changes -
            Support reference count Original: 2 New: 3
            Bugfix Automation Bot made changes -
            Support reference count Original: 1 New: 2

              Unassigned Unassigned
              voseghale VICTOR-OSEGHALE (Inactive)
              Affected customers:
              4 This affects my team
              Watchers:
              9 Start watching this issue

                Created:
                Updated: