Bamboo YAML Specs doesn't publish plan configuration when it has Bitbucket mirror details configuration for repository

XMLWordPrintable

    • 1
    • Severity 3 - Minor

      Issue Summary

      • Unable to publish the plan in Bamboo with Bitbucket mirror details repository configuration through Bamboo Yaml specs.

      This is reproducible on Data Center: yes

      Steps to Reproduce

      1. Create a sample YAML Specs repository in the Bitbucket server. Please refer to this page tutorial-bamboo-specs-yaml-stored-in-bitbucket-server on how to create it.
      2. Add the repository configuration with Bitbucket mirror details to the YAML specs configuration file (bamboo.yaml). Below is the sample configuration:
        repositories:
        - bambooyaml:
            scope: global
        - planrepo1:
            type: bitbucket-server
            server: Bitbucket
            project: PROJ
            slug: repo1
            clone-url: ssh://git@XXXXXXXXX:7999/proj/bambooyaml.git
            public-key: ssh-rsa XXXXXXXXXXXXXXXXXX
            private-key: BAMSCRT@0@0@XXXXXXXXXXXXXX
            branch: master
            mirror: Cloud Deployments Bitbucket Mirror Farm
            command-timeout-minutes: '180'
            use-shallow-clones: 'false'
            cache-on-agents: 'true'
            submodules: 'false'
            verbose-logs: 'false'
            fetch-all: 'false'
            lfs: 'false'
            viewer: com.atlassian.bamboo.plugins.stash.atlassian-bamboo-plugin-stash:bbServerViewer
            

        planrepo1 is the additional plan repository name created through the above specs code.
        Replace the details of the bitbucket mirror name, clone-URL, and private and public keys according to your Bitbucket server and repository details.

      3. Create a Linked repository in the Bamboo now with the above specs repository created.
      4. Enable the Specs scan option to this linked repository and scan the spes code.

      Expected Results

      • Bamboo will process the YAML Specs code successfully and it creates a plan with an additional repository (mentioned in the specs code) with Bitbucket mirror configuration.

      Actual Results

      The below error is thrown in the atlassian-bamoo.log file:

      12-Jan-2023 08:44:16	com.atlassian.bamboo.specs.api.exceptions.PropertiesValidationException: Both url and name of a mirror must be defined when using repository stored specs.
      12-Jan-2023 08:44:16	java.lang.IllegalArgumentException: com.atlassian.bamboo.specs.api.exceptions.PropertiesValidationException: Both url and name of a mirror must be defined when using repository stored specs.
      12-Jan-2023 08:44:16		at com.atlassian.bamboo.configuration.external.PlanConfigImportServiceImpl.lambda$validateAndCreateRepositoryObjects$21(PlanConfigImportServiceImpl.java:1261)
      12-Jan-2023 08:44:16		at com.atlassian.bamboo.variable.CustomVariableContextImpl.withVariableSubstitutor(CustomVariableContextImpl.java:129)
      12-Jan-2023 08:44:16		at com.atlassian.bamboo.configuration.external.PlanConfigImportServiceImpl.validateAndCreateRepositoryObjects(PlanConfigImportServiceImpl.java:1235)
      12-Jan-2023 08:44:16		at com.atlassian.bamboo.configuration.external.PlanConfigImportServiceImpl.lambda$createTopLevelPlanFunction$17(PlanConfigImportServiceImpl.java:1151)
      12-Jan-2023 08:44:16		at com.atlassian.bamboo.core.ScopedExclusionServiceImpl.tryWithLock(ScopedExclusionServiceImpl.java:74)
      

      Workaround

      Currently there is no known workaround for this behavior. A workaround will be added here when available

              Assignee:
              Alexey Chystoprudov
              Reporter:
              Jyothi Charupalli
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: