Bamboo Specs Branches doesn't allow to override Expiry settings in YAML Specs

XMLWordPrintable

    • Type: Bug
    • Resolution: Not a bug
    • Priority: Low
    • None
    • Affects Version/s: 9.2.1
    • Component/s: Bamboo Specs
    • None
    • 1
    • Severity 3 - Minor

      Issue Summary

      When Bamboo Spec Branches are created, it will inherit all of it's properties including expiry settings. There might be some requirement to change the Expiry setting of the already created specs branches.

      Currently if we put a separate expiry settings under bamboo.yaml file for the specs branches it doesn't do anything. 

      Steps to Reproduce

      1. Create a specs managed plan in Bamboo and put the below code for new branches section

      branches:
        create: for-new-branch
        delete:
          after-deleted-days: 7
          after-inactive-days: 30
      

      2. Create a new branch in Bitbucket repository and it will create a new Specs Branch in Bamboo.

      3. Modify the bamboo.yaml of the newly created specs branch in Bitbucket server and add the following settings to disable the expiry for this specs branches.

      branches:
        create: for-new-branch
        delete: never
      

      Expected Results

      The expiry settings of the newly created Specs branches will be removed.

      Actual Results

      The expiry settings of the Specs branches are not removed and it remains as same as the default branch from which it was created.

      Workaround

      This options includes DB update queries so please take a backup of the DB before running any queries.

      • Make note of BUILD_ID of the plan branch that you want to disable the expiry option by running the below SQL query
        select build_id from build where full_key='PLAN_BRANCH_KEY'
        

         Please replace PLAN_BRANCH_KEY with the key of the master plan branch.

      • Stop Bamboo.
      • Replace the above build_id in the below SQL query.
        UPDATE build_definition
           SET xml_definition_data = REPLACE(xml_definition_data,'<cleanup><disabled>false</disabled></cleanup>','<cleanup><disabled>true</disabled></cleanup>')
         WHERE build_definition.build_id IN ('build_id'); 
        

         Replace build_id with the result you got from the 1st query.
         The above SQL query was tested in PostgreSQL DB and might need changes for other DB types

      • Run the above update query to disable the option.
      • Start Bamboo.

            Assignee:
            Unassigned
            Reporter:
            Shashank Kumar
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: