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.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The plan compiled now but the permissions were not applied.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That worked! Using the "full" key "EEWTWS-HEALTH2" and having everything in the same file.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I will say even though this is solved, this is incredibly counter intuitive and poorly documented.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What is the difference between double and single quotes in your YAML?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.