Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,300,116
Community Members
 
Community Events
165
Community Groups

Bamboo yaml spec, create new repositories

Hello, 

I would like to create repositories (not link existing) in a Bamboo yaml-spec, according to the spec ref (https://docs.atlassian.com/bamboo-specs-docs/8.0.4/specs.html?yaml#git-authentication) this should be possible, e.g.

repositories:
- my-repository:
    type: git
    url: ssh://git@bitbucket.org:my-company/my-repository.git
    branch: master
    ssh-key: ENCRYPTED_KEY
    ssh-key-passphrase: ENCRYPTED_PASSPHRASE


However if the spec is scanned, I receive the following error

Bamboo YAML import failed: Could not determine YAML document version: repositories / [0] / my-repository: Property is required.

Whether meaningful config values or just the dummies above are used, it doesn't matter.

I cannot use linked repos since the yaml spec is generated and it contains 100+ build plans

Are there any ways to configure repositories within Bamboo yaml specs?

 

1 answer

1 accepted

0 votes
Answer accepted

Hey Dimitry,

According to https://community.atlassian.com/t5/Bamboo-questions/Confused-by-this-Error-Bamboo-YAML-import-failed-Could-not/qaq-p/1332452 which had a similar error, but the user was trying to achieve a different goal, the issue was related to tabbing.

Based on this, the issue may be your indenting as well

repositories:
- my-repository:
    type: git
    url: ssh://git@bitbucket.org:my-company/my-repository.git
    branch: master
    ssh-key: ENCRYPTED_KEY
    ssh-key-passphrase: ENCRYPTED_PASSPHRASE
repositories:
  - my-repository:
      type: git
      url: ssh://git@bitbucket.org:my-company/my-repository.git
      branch: master
      ssh-key: ENCRYPTED_KEY
      ssh-key-passphrase: ENCRYPTED_PASSPHRASE

Give that  a go and hopefully it helps.

CCM 

Hi Craig, 

the indentation hint helped, I played around with the spaces and finally got it working

 

Best regards,

Dimitri

Suggest an answer

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

Bamboo Data Center on Kubernetes

Hi, If you are running self-managed environments and looking to adopt modern infrastructure, Bamboo Data Center can now be deployed in a Kubernetes cluster. By leveraging Kubernetes, you can easily...

967 views 3 8
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