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 

          Form Name

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

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

                Created:
                Updated: