1

I'm trying to build a bamboo specs yaml but I'm having some weird errors which have messages that are not helping much. I followed the documentation for it here but still not working.

So I have bamboo 7.2.4 and I'm trying to create a stage

version:2

    stages:
     - run tests:
            jobs:
              - Test
    Test:
      tasks:
        - script:whatever

When running this I get

Bamboo YAML import failed: Document structure is incorrect: Tests: Property is required.

No clue what that means nor why it's happening

user2137817
  • 1,825
  • 5
  • 28
  • 45
  • What you show is incorrect YAML. The error message you show however implies your input is syntactically valid YAML and thus not what you show here. Please make sure that the YAML you're showing is your actual input. – flyx Jun 16 '21 at 18:15
  • 1
    Well it was a representation of what I have as structure, I’m looking more to an explanation of the error msg – user2137817 Jun 16 '21 at 18:34
  • 1
    The issues with your input are very basic: A space is missing before `2` and `whatever`. Then, `stages:` and `Test:` are too far indented. I assume that these errors are not in your original YAML, because they would get you a different error message. – flyx Jun 16 '21 at 21:43
  • Yes they are not, I’m not talking about the snippet I shared, it was to show the structure that’s it and I gave the error msg I got, the same structure can be found in the documentation I shared in the link above. – user2137817 Jun 16 '21 at 21:45
  • 1
    We can't help you interpreting the error message without seeing how, exactly, your input looks. From what you posted, even in the context of your statement that it is to „show the structure“, we cannot deduce how your input looks. – flyx Jun 17 '21 at 12:05

1 Answers1

3

Bamboo YAML specs are very difficult to troubleshoot. This is one disadvantage of YAML specs when compared to Java specs. Looks like you are missing some key and essential tags in your example code. Can you re-format as below and see?

First, manually create a project (or use an existing project) but make sure to update the project-key by replacing <MYKEY> below,

---
version:2
plan:
  project-key: <MYKEY>
  key: MYPLN
  name: My Plan

stages:
  - run tests:
     jobs:
       - Test

Test:
  key: JB1
  tasks:
  - script:
    - echo 'My Plan'
Anuradha Fernando
  • 1,063
  • 12
  • 17
  • 1
    As per the above comments, what I can point out is, 1. Always be careful with the indentation 2. Link the plan to a project by key mapping. – Anuradha Fernando Jun 18 '21 at 05:29