Missed Team ’24? Catch up on announcements here.

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

Bamboo yaml spec, create new repositories

Dimitri Dering April 1, 2022

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
Craig Castle-Mead
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 1, 2022

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 

Dimitri Dering April 2, 2022

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
AUG Leaders

Atlassian Community Events