After changing repository that manages a Bamboo Spec it cannot be changed back to the previous repository with a simple Specs scan

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

Under a scenario where you change the repository that manages a Bamboo Spec plan and try to change it back to the original repository, a Bamboo Specs scan may report execution successful but not actually change the repository.

Example:

  1. repo-1 with Bamboo Spec pointed to BAM-PLAN

  2. Accidentally push the same Bamboo Spec pointed to BAM-PLAN to repo-2 and change the repository in it

  3. Scan repo-2. BAM-PLAN now becomes managed by repo-2

  4. Try to switch BAM-PLAN back to repo-1 simply by scanning repo-1 again with no other changes performed

  5. Bamboo Specs says execution was successful but didn't actually revert BAM-PLAN to repo-1

Cause

The problem stems from the way that Bamboo Specs scans will do a diff to see if there is actually a difference in the Bamboo Spec file since the last scan before applying it. Since you are just rescanning the original repository, the Bamboo Spec file looks to be identical to the previous commit. The difference actually exists across two different repositories and does not formulate part of the diff.

Solution

Introduce a new commit to the original repository that changes anything within the Bamboo Specs file (bamboo.yml or your Java spec files). The idea is so that Bamboo can identify a difference within the Spec compared to the previous commit so that it will re-scan it. For example, it could be as simple as changing a single character in a Script task. Once the change has been introduced, perform the Specs scan again. Once the scan has successfully changed the repository attributed to the plan, you can revert any previous changes you may have made just to get it to scan.

We also have a feature request for a way to perform a forced update:

Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.