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
- 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.
- 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. - Create a Linked repository in the Bamboo now with the above specs repository created.
- 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
- mentioned in
-
Page Loading...