Issue Summary
VCS Tasks do not work with SPECS-defined plans when targeting a specific repository. The problem appears to be related to the way data is prepared from Bamboo Specs Java form for those tasks, which don't have native YAML support.
Steps to Reproduce
- Define a VCS task in specs yaml with a target repositoryID
- any-task: plugin-key: com.atlassian.bamboo.plugins.vcs:task.vcs.commit configuration: commitMessage: test selectedRepository: '688131' description: test
- Execute the build
- VCS task fails with:
- "Repository id 688131 is invalid. Please reselect from the configuration screen."
Additional Notes
We confirmed the specs repository has 'access all repositories' enabled:

We also confirmed the specs repository has access to the target repository that is being committed to during the (specs-defined) plan execution:

We configured a plan on the UI with the vcs task (commit), which succeeds when running it. When converting to yaml, we see a similar YAML to the failing one:
any-task:
plugin-key: com.atlassian.bamboo.plugins.vcs:task.vcs.commit
configuration:
commitMessage: test
selectedRepository: '688131'
description: test
However, when we copy it to our yaml file, we continue to see the same error "Repository id 688131 is invalid. Please reselect from the configuration screen."
Expected Results
VCS Task to succeed when defining a target linked repository with specs YAML.
This forum suggests that it previously worked.
Actual Results
The below exception is thrown in the build plan
"Repository id 688131 is invalid. Please reselect from the configuration screen."
When viewing the tasks configuration on UI, the repository drop-down states 'No access to the repository'.

Workaround
- Define script task in SPECS YAML to execute git commit push.
Example:- script: interpreter: SHELL scripts: - |- cd repob echo '1234' >> test.txt git remote set-url origin https://admin:${bamboo.gitPassword}@linux-<REDACTED>/bitbucket/scm/proj/repob.git git add test.txt git commit -m "adding test.txt modification" git push origin master
- OR Convert YAML specs to Java Specs and use vcs tasks via anyplugin. Click here for details.
- mentioned in
-
Page Loading...