Plan import is blocked to prevent deleting your plan notifications silently with Bamboo Specs
プラットフォームについて: 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 は除く
要約
When pushing a Bamboo Spec to the Bamboo Server and the plan already exists with notifications, Bamboo Specs will stop the push and report the following exception:
com.atlassian.bamboo.specs.api.exceptions.BambooSpecsPublishingException: An error occurred while publishing plan BAMBOO-SPEC: Plan import is blocked to prevent deleting your plan notifications silently. If you are confident that you want to delete all plan notifications, use com.atlassian.bamboo.specs.api.builders.plan.Plan.noNotifications method explicitly環境
Prior to the Bamboo version 7.0
原因
The publish has found an existing plan with the same key as the plan you are trying to publish and this plan has notifications configured which would be entirely removed by the definition you're publishing. As a safe-guard against this silent notification deletion, Bamboo Specs validation is stopping the publish.
回避策
オプション 1
Upgrade to Bamboo version 7.0 or later where this validation has been removed. Simply not specifying any notifications will result in all notifications being removed from the plan. If you want to retain existing notifications, make sure they are defined within your Bamboo Spec.
オプション 2
If you are sure you want to remove all notifications from the existing plan (and that you're publishing to the correct plan key), you can add .noNotifications() to your Plan object in the Spec to override the validation.
例:
Plan plan = new Plan(new Project()
.key(new BambooKey("SPEC"))
.name("SPEC"),
"RSS",
new BambooKey("RSS"))
.noNotifications()
.pluginConfigurations(new ConcurrentBuilds()
.useSystemWideDefault(false)
.maximumNumberOfConcurrentBuilds(4))
.stages(new Stage("Default Stage")
(...)この内容はお役に立ちましたか?