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

Script task with empty lines in body generates invalid YAML Specs

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Low Low
    • 7.2.0, 7.1.2
    • 7.1.0
    • Bamboo Specs
    • None

      Issue Summary

      If Script task body contains empty lines for inline script body it produces YAML Specs which can't be used by Bamboo

      Steps to Reproduce

      1. Create Plan with script task which contains empty lines for inline body
      2. Export plan to YAML Specs
      3. Use generated Specs for plan import

      Expected Results

      Plan is imported and works as expected

      Actual Results

      Error message

      Workaround

      Update script task inline body and remove empty lines

          Form Name

            [BAM-21025] Script task with empty lines in body generates invalid YAML Specs

            Upgraded to 7.1.2 and confirmed empty lines and #'s seem to be OK for Yaml export now. 

            Craig Castle-Mead added a comment - Upgraded to 7.1.2 and confirmed empty lines and #'s seem to be OK for Yaml export now. 

            Ace added a comment -

            We are attempting to roll out Bamboo CI internally and are also affected by this, what can we to do help, or at least work around this? We are a Microsoft Shop and would prefer not to write any JavaSpecs if possible (YAML is a reasonable compromise in our opinion).

            Here's a sampling of just one of our plans when exported, as you can see we heavily rely on this:

            Verify Code Quality:
              key: VCQ
              tasks:
              - checkout:
                  force-clean-build: 'false'
            # Task com.atlassian.bamboo.plugins.scripttask:task.builder.command is not supported yet
            # Task com.atlassian.bamboo.plugins.scripttask:task.builder.command is not supported yet
            # Task com.atlassian.bamboo.plugins.scripttask:task.builder.command is not supported yet
            # Task com.atlassian.bamboo.plugins.scripttask:task.builder.command is not supported yet
            # Task com.atlassian.bamboo.plugins.scripttask:task.builder.command is not supported yet
            # Task com.atlassian.bamboo.plugins.scripttask:task.builder.command is not supported yet
            # Task com.atlassian.bamboo.plugins.scripttask:task.builder.command is not supported yet
            # Task com.atlassian.bamboo.plugins.scripttask:task.builder.command is not supported yet
            # Task com.atlassian.bamboo.plugins.scripttask:task.builder.command is not supported yet
            # Task com.atlassian.bamboo.plugins.scripttask:task.builder.command is not supported yet
            # Task com.atlassian.bamboo.plugins.scripttask:task.builder.command is not supported yet
            # Task com.atlassian.bamboo.plugins.scripttask:task.builder.command is not supported yet
            # Task com.atlassian.bamboo.plugins.scripttask:task.builder.command is not supported yet
            # Task com.atlassian.bamboo.plugins.scripttask:task.builder.command is not supported yet
            

            Ace added a comment - We are attempting to roll out Bamboo CI internally and are also affected by this, what can we to do help, or at least work around this? We are a Microsoft Shop and would prefer not to write any JavaSpecs if possible (YAML is a reasonable compromise in our opinion). Here's a sampling of just one of our plans when exported, as you can see we heavily rely on this: Verify Code Quality: key: VCQ tasks: - checkout: force-clean-build: ' false ' # Task com.atlassian.bamboo.plugins.scripttask:task.builder.command is not supported yet # Task com.atlassian.bamboo.plugins.scripttask:task.builder.command is not supported yet # Task com.atlassian.bamboo.plugins.scripttask:task.builder.command is not supported yet # Task com.atlassian.bamboo.plugins.scripttask:task.builder.command is not supported yet # Task com.atlassian.bamboo.plugins.scripttask:task.builder.command is not supported yet # Task com.atlassian.bamboo.plugins.scripttask:task.builder.command is not supported yet # Task com.atlassian.bamboo.plugins.scripttask:task.builder.command is not supported yet # Task com.atlassian.bamboo.plugins.scripttask:task.builder.command is not supported yet # Task com.atlassian.bamboo.plugins.scripttask:task.builder.command is not supported yet # Task com.atlassian.bamboo.plugins.scripttask:task.builder.command is not supported yet # Task com.atlassian.bamboo.plugins.scripttask:task.builder.command is not supported yet # Task com.atlassian.bamboo.plugins.scripttask:task.builder.command is not supported yet # Task com.atlassian.bamboo.plugins.scripttask:task.builder.command is not supported yet # Task com.atlassian.bamboo.plugins.scripttask:task.builder.command is not supported yet

            Task descriptions aren't included as part of the Yaml specs

            It's not supported by YAML yet

            Alexey Chystoprudov added a comment - Task descriptions aren't included as part of the Yaml specs It's not supported by YAML yet

            Other findings:

            1. Empty lines in a script file aren't handled
              This works (can export Yaml as expected)
            foo=1
            echo $foo

            Doesn't export the Script task, Yaml export has "# Task com.atlassian.bamboo.plugins.scripttask:task.builder.script is not supported yet" in it's place

            foo=1
            
            echo $foo 
            1.  

             Task descriptions aren't included as part of the Yaml specs

             

             

            Craig Castle-Mead added a comment - Other findings: Empty lines in a script file aren't handled This works (can export Yaml as expected) foo=1 echo $foo Doesn't export the Script task, Yaml export has "# Task com.atlassian.bamboo.plugins.scripttask:task.builder.script is not supported yet" in it's place foo=1 echo $foo    Task descriptions aren't included as part of the Yaml specs    

              achystoprudov Alexey Chystoprudov
              37e1a2f066c3 Craig Castle-Mead
              Affected customers:
              3 This affects my team
              Watchers:
              9 Start watching this issue

                Created:
                Updated:
                Resolved: