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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

[YAML spec] How to make a 'plan permission' for multiple build plan?

Hi Team,

I'm trying to configure my build plan with a YAML spec and have a problem with plan permissions.

I have created the file "permission.yml" and Imported it in "bamboo.yml"

"permission.yml" has the following instructions:

---
version: 2
plan: PROJECT-PLANKEY

plan-permissions:
  - users: [ user1, user2, user3 ]
    permissions:
- view
- build
...

--- version: 2 plan: PROJECT-PLANKEY2 plan-permissions: - users: [ user1, user2, user3 ] permissions:
- view
- build
...

And in this case I have an error.

Also, I have tried to add permission in every file with a plan configuration, but it gives the same error

22-Feb-2023 05:52:12 Bamboo YAML import failed: Invalid format of the YAML file: expected a single document in the stream
22-Feb-2023 05:52:12 in 'reader', line 2, column 1:
22-Feb-2023 05:52:12 version: 2
22-Feb-2023 05:52:12 ^
22-Feb-2023 05:52:12 but found another document
22-Feb-2023 05:52:12 in 'reader', line 84, column 1:
22-Feb-2023 05:52:12 ---
22-Feb-2023 05:52:12 ^
22-Feb-2023 05:52:12
22-Feb-2023 05:52:12
22-Feb-2023 05:52:12 Do you need help? Please visit http://docs.atlassian.com/bamboo/docs-0802/Bamboo+Specs+troubleshooting

Could you help me find a solution?

 

2 answers

1 vote
Eduardo Alvarenga
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Feb 22, 2023

Hello @Valerii

Just remove the first three dots (...) from the initial permissions block and it should work.

---
version: 2
plan: PROJECT-PLANKEY

plan-permissions:
- users: [ user1, user2, user3 ]
permissions:
- view
- build
---
version: 2
plan: PROJECT-PLANKEY2

plan-permissions:
- users: [ user1, user2, user3 ]
permissions:
- view
- build
...

The three dots indicate the "End of Document" in standard YAML and that will confuse the parser as it had not really ended at that stage.

Sincerely,

Eduardo Alvarenga
Atlassian Support APAC

--please don't forget to Accept the answer if the reply is helpful-- 

i am having a similar issue with includes that contain multiple "documents"

bamboo specs include file with multiple documents (atlassian.com)

23-Feb-2023 17:37:02	Bamboo YAML import failed: Invalid format of the YAML file: expected a single document in the stream
23-Feb-2023 17:37:02	 in 'reader', line 2, column 1:
23-Feb-2023 17:37:02	    version: 2
23-Feb-2023 17:37:02	    ^
23-Feb-2023 17:37:02	but found another document
23-Feb-2023 17:37:02	 in 'reader', line 42, column 1:
23-Feb-2023 17:37:02	    ---
23-Feb-2023 17:37:02	    ^
23-Feb-2023 17:37:02	
23-Feb-2023 17:37:02	
23-Feb-2023 17:37:02	Do you need help? Please visit http://docs.atlassian.com/bamboo/docs-0902/Bamboo+Specs+troubleshooting
23-Feb-2023 17:37:02	

 

bamboo.yml

---
!include 'Deployment\ServiceA-Deployment.yml'

 Deployment\ServiceA-Deployment.yml

---
version: 2
deployment:
name: My deployment
source-plan: PLAN-KEY
release-naming:
next-version-name: release-1.0
applies-to-branches: true
auto-increment: true
environments:
- QA
QA:
tasks:
- clean
- artifact-download:
destination: /workdir
- script:
- echo 'hello world'
- echo "I’m done"
---
version: 2
deployment:
name: My deployment

deployment-permissions:
- users:
- local-admin
- remote-admin
groups:
- bamboo-remote-users
permissions:
- view
- edit

 

Hi @Eduardo Alvarenga ,

I have tried to remove "..." (three dots) but it doesn't help. The same error.

Eduardo Alvarenga
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Feb 28, 2023

Hello @Valerii

As your issue goes beyond a syntax error, I advise you to open a Support Ticket with Atlassian.

Please do not expose any private information here as it is a public forum.

Cheers,

Eduardo Alvarenga
Atlassian Support APAC

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events