Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Bamboo YAML import failed: Document structure is incorrect: Found following unused properties: plan- Edited

Bamboo YAML import failed: Document structure is incorrect: Found following unused properties: plan-permissions

 

 My YAML

 

---
version: 2
plan:
project-key: EEWTWS
  key: 'HEALTH2'  
name: Health
plan-permissions:
  - groups: '_Bamboo__Build_Admins'
    permissions: admin

 

 

I dont understand what im doing wrong. I want  _Bamboo__Build_Admins to be an admin on the plan when its created.

2 answers

1 accepted

1 vote
Answer accepted

Hi Victorio,

Manage plan permissions to control which users have access to various functions of the build plan using Bamboo YAML was introduced in Bamboo v6.1.0.

Which Bamboo version are you currently running? Could be this the root couse of your problem?

 

Anyway, do you mind to try using the following content?


bamboo.yaml

---
version: 2
plan:  
project-key: EEWTWS
  key: HEALTH2
name: Health

---
version: 2
plan: 
  key: EEWTWS-HEALTH2

plan-permissions:
- groups:
- _Bamboo__Build_Admins
  permissions: 
- admin

 

6.9.2 build 60911 - 04 Jul 19

Also im not alone. But his answer makes no sense. He probably doesnt even realize he disconnected the permissions from his plan by "moving them to a new block" whatever that means. Maybe we are looking at a real bug here?

Hi Victorio,

 

I've added a YAML proposal in my original answer.
Not sure if it is the same as you are currently using since the YAML you post in the original post seems to be malformed (I believe because copy & paste here)

I have updated the formatting but yes the copy/paste was an issue.

 

Your code snippet did not work, I still have the same error "

Bamboo YAML import failed: Document structure is incorrect: Found following unused properties: plan-permissions

 

 I just saw you made some big edits and created an entirely new YAML. I will try that one second

Yes, sorry It is because reading the documentation it seems that the Plan Permissions entity is a first level entity and need to be placed in a separated file as denis.kot already suggested in his post.

image.pngThe plan compiled now but the permissions were not applied.

I just realized after see the Alexander comment that I forgot to add the project key in the second file (planHEALTH2.yaml)

So the correct plan key is indeed EEWTWS-HEALTH2

I can not get that to work @Jack Nolddor _Sweet Bananas_  its the same result, no permissions. Maybe I have to have those includes? II dont think its picking up planHEALTH2.yaml. Nothing is telling it to right?

Yeah, that seems to be the problem I've updated again my proposal and merged the two files into one.

Since I'm not pretty sure if plan key should be EEWTWS-HEALTH2 or plan key or HEALTH2 do you mind to try both options, please? (only in the permission section)

That worked! Using the "full" key "EEWTWS-HEALTH2" and having everything in the same file.

Yeah! Congrats

I've updated my initial answer to reflect the final solution so you can mark the proposed solution as an 'Accepted answer'. This will help other people with the same or a quite similar problem to find a solution in a easy and faster way.

In addition, by doing this the post will automatically gain the "Solved:" prefix in search results to indicate other people that no further support is needed.

Kind Regards.

I will say even though this is solved, this is incredibly counter intuitive and poorly documented.

Jimmy Seddon Community Leader Oct 03, 2019

Thanks @Jack Nolddor _Sweet Bananas_!

I've just started using YAML specs myself and found this while trying to figure out plan permissions.  This was very helpful.

I'm fairly certain that plan permissions need to be in their own YAML document in order for Bamboo to use them, much like how build and deploy plans need to be separate from each other.

Ideally, it's best practice to keep your plans and permissions in their own file, and include them in your bamboo.yaml.

bamboo-specs
|-bamboo.yaml
|-build.yaml
|-permissions.yaml

bamboo.yaml:

---
!include 'build.yaml'
---
!include 'permissions.yaml'
...

build.yaml:

---
version: 2
plan:  
project-key: EEWTWS
  key: HEALTH2
name: Health

I'm not quite sure how the permissions.yaml needs to be formed, but here's my guess at it:

permissions.yaml

---
version: 2
plan: "EEWTWS-HEALTH2"

plan-permissions:
groups: "_Bamboo_Build_Admins"
permissions: admin
...

The three dashes in a YAML file mark the start of a new YAML document.

My YAML all parses correctly but now I get a  new error:

 

There was an error when processing yaml file "bamboo.yaml". File structure is correct, contact Atlassian Support for assistance on resolving this issue.

Could not parse key 'HEALTH2'
java.lang.IllegalArgumentException: Could not parse key 'HEALTH2'


 

I didnt change any of the details, I just created the new files and added the includes

Ah, try this in your permissions.yaml:

plan: "EEWTWS-HEALTH2"

 I'll edit my above answer to put double quotes around that value as well.

What is the difference between double and single quotes in your YAML?

There's no functional difference between the single and double quotes in my example. Good question, I'd suggest looking at some basic YAML syntax guides if you're new to the language.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bamboo

Bamboo 7.1 is here and is packed with value!

I'm happy to announce that Bamboo 7.1 has been released and it’s overflowing with awesome new features. Top-voted issues First and foremost, a bunch of JAC top voted issues has been delivered - y...

653 views 1 6
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you