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

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,641,229
Community Members
 
Community Events
196
Community Groups

How to specify a non-default repository for a vcs.commit or .branch task in yaml spec

Edited

Hello,

 

This question can be ignored, the issue was caused by the repository id being part of the yaml spec file. changing this to defaultRepository like shown below fixed the issue:

  - any-task:
      plugin-key: com.atlassian.bamboo.plugins.vcs:task.vcs.commit
      configuration:
        commitMessage: '"bamboo: committing something"'
        selectedRepository: defaultRepository

The question remains though: how would one specify a different repository in this case?

Is that only possible by hardcoding the repository ID to selectedRepository?

for some unclear reason sometimes plans using a linked repository suddenly fail at a create branch task with the following error:

Error occurred while running Task 'Create branch to commit changes to' of type com.atlassian.bamboo.plugins.vcs:task.vcs.branching.
com.atlassian.bamboo.task.TaskException: Repository id 302514704 is invalid. Please reselect from the configuration screen.

We had this before with plans created via UI and were then able to fix this issue by going to the repository page and simply hitting safe again. We of course dont have that option with spec created plans as these cannot be changed via UI.

2 questions:

1. How can we fix this for a spec created job and

2. what exactly is causing this error in the first place?

1 answer

1 accepted

0 votes
Answer accepted
Eduardo Alvarenga
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Sep 28, 2022

Hello @margo

You are right. You have to specify the Repository ID in quotes. For example:

- any-task:
plugin-key: com.atlassian.bamboo.plugins.vcs:task.vcs.commit
configuration:
commitMessage: message!
selectedRepository: '1114113'
description: Commit and push to repository

Kind regards,

Eduardo Alvarenga
Atlassian Support APAC

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

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events