Repository parent can not be changed or Changing repository hierarchy is not supported

プラットフォームについて: Data Center のみ。 - This article only applies to Atlassian apps on the Data Center プラットフォーム

この KB は Data Center バージョンの製品用に作成されています。Data Center 固有ではない機能の Data Center KB は、製品のサーバー バージョンでも動作する可能性はありますが、テストは行われていません。 Server* 製品のサポートは 2024 年 2 月 15 日に終了しました。Server 製品を実行している場合は、 アトラシアン Server サポート終了 のお知らせにアクセスして、移行オプションを確認してください。

*Fisheye および Crucible は除く

要約

The user gets the following error when commit change to Repository with Bamboo Specs:

Changing repository hierarchy is not supported.

診断

We can see the following message in the atlassian-bamboo.log file:

13-Jul-2021 13:16:12 com.atlassian.bamboo.specs.api.exceptions.PropertiesValidationException: planRepository / two git repo: Repository parent can not be changed. 13-Jul-2021 13:16:12 java.lang.IllegalArgumentException: com.atlassian.bamboo.specs.api.exceptions.PropertiesValidationException: planRepository / two git repo: Repository parent can not be changed. 13-Jul-2021 13:16:12 at com.atlassian.bamboo.configuration.external.PlanConfigImportServiceImpl.lambda$validateAndCreateRepositoryObjects$21(PlanConfigImportServiceImpl.java:1261) 13-Jul-2021 13:16:12 at com.atlassian.bamboo.variable.CustomVariableContextImpl.withVariableSubstitutor(CustomVariableContextImpl.java:129) 13-Jul-2021 13:16:12 at com.atlassian.bamboo.configuration.external.PlanConfigImportServiceImpl.validateAndCreateRepositoryObjects(PlanConfigImportServiceImpl.java:1235) 13-Jul-2021 13:16:12 at com.atlassian.bamboo.configuration.external.PlanConfigImportServiceImpl.lambda$modifyTopLevelPlanFunction$2(PlanConfigImportServiceImpl.java:556) 13-Jul-2021 13:16:12 at com.atlassian.bamboo.core.ScopedExclusionServiceImpl.tryWithLock(ScopedExclusionServiceImpl.java:74)

原因

Bamboo prevents changing of repository hierarchy to prevent plan branches damage. When linked or project repository is added to plan Bamboo creates copy and link it with original repo which is referenced at "parent". Then if "parent" configuration changes then all children will use new settings. With Bamboo Specs code you can configure plan to use linked repository "Some linked repo"

Plan plan = new Plan(project, "Test", "TEST") .linkedRepository("Some linked repo");
version: 2 plan: project: project name: Test key: TEST repositories: - Some linked repo

But if you decide to change sample plan with code like this Bamboo will raise validation error to not break your plan branches as plan repo might have different URL and other settings than linked repo has.

Plan plan = new Plan(project, "Test", "TEST) .planRepository( new GitRepository().name("Some linked repo").url(some_url) )
version: 2 plan: project: project name: Test key: TEST repositories: - Some linked repo: type: git url: some_url

ソリューション

If you really want to change repository hierarchy, try to make it in two steps. First make change to plan configuration and remove all repos, commit change. Then add repository from another level e.g. linked, project or plan and commit your changes

ステップ 1

Plan plan = new Plan(project, "Test", "TEST");
version: 2 plan: project: project name: Test key: TEST repositories: []

ステップ 2

Plan plan = new Plan(project, "Test", "TEST) .planRepository( new GitRepository().name("Some linked repo").url(some_url) )
version: 2 plan: project: project name: Test key: TEST repositories: - Some linked repo: type: git url: some_url

更新日時: September 26, 2025

さらにヘルプが必要ですか?

アトラシアン コミュニティをご利用ください。