How to locate Build plans and Deployment projects/environments that are bound to Repository Stored Specs

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

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

The steps outlined on this article are provided AS-IS. This means we've had reports of them working for some customers — under certain circumstances — yet are not officially supported, nor can we guarantee they'll work for your specific scenario.

You may follow through and validate them on your own non-prod environments prior to production or fall back to supported alternatives if they don't work out.

We also invite you to reach out to our Community for matters that fall beyond Atlassian's scope of support!

Summary

This article will provide database queries that will help customers identify which Build plans and Deployment projects/environments are linked to a Repository Stored Specs configuration and hence, have a "Read-only" option set on the Bamboo UI.

Environment

Bamboo Server or Data Center

Solution

Build plans with enabled RSS

SELECT  S.PLAN_ID          AS "Plan Id",
        B.FULL_KEY         AS "Plan key",
        CASE
          WHEN B.BUILD_TYPE = 'CHAIN' THEN 'Plan'
          WHEN B.BUILD_TYPE = 'CHAIN_BRANCH' THEN 'Plan branch'
        END                AS "Build type",
        VL.NAME            AS "RSS Repository",
        B.DIVERGENT_BRANCH AS "Specs Branch"
  FROM  PLAN_VCS_SPECS_SOURCE S
  JOIN  BUILD B
    ON  B.BUILD_ID = S.PLAN_ID
  JOIN  VCS_SPECS_SOURCE V
    ON  V.VCS_SPECS_SOURCE_ID = S.VCS_SPECS_SOURCE_ID
  JOIN  VCS_SPECS_STATE VT
    ON  VT.VCS_SPECS_STATE_ID = V.VCS_SPECS_STATE_ID
  JOIN  VCS_LOCATION VL
    ON  VL.VCS_LOCATION_ID = VT.VCS_LOCATION_ID

When a Divergent Branch (Specs Branch) is true, Enhanced Plan Branch is in use. If false it means it is a regular Plan Branch and is linked to the main branch.

Deployment projects/environments with enabled RSS

SELECT  DP.NAME AS "Deploy Project Name",
        DE.NAME AS "Environment Name",
        VL.NAME AS "RSS Repository"
  FROM  DEPLOYMENT_ENVIRONMENT DE
  JOIN  DEPLOYMENT_PROJECT DP
    ON  DP.DEPLOYMENT_PROJECT_ID = DE.PACKAGE_DEFINITION_ID
  JOIN  RSS_PERMISSION_DEPLOYMENT_PROJ RPD
    ON  RPD.DEPLOYMENT_PROJECT_ID = DP.DEPLOYMENT_PROJECT_ID
  JOIN  VCS_LOCATION VL
    ON  VL.VCS_LOCATION_ID = RPD.REPOSITORY_ID

Last modified on Jan 25, 2024

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.