I'm using Bamboo 8.2.
According to specs manual at https://docs.atlassian.com/bamboo-specs-docs/8.2.0/specs.html?yaml#using-a-shared-artifact-in-another-plan
I'd be able to build an artifact from PROJECTA_PLANA and use it from PROJECTB_PLANB.
Given the publish part shows artifacts actually in Bamboo web ui according to specs -- ie. the scripts artifact is present after build:
version: 2
plan:
project-key: PROJECTA
key: PLANA
..
Build:
artifacts:
- name: scripts
required: true
pattern: '*.sh'
shared: true
Trying to download fails with "Bamboo YAML import failed: Document structure is incorrect: Sandbox / tasks / [0]: Unknown task type artifact-download"
version: 2
deployment:
source-plan: PROJECTB_PLANB
..
Sandbox:
tasks:
- artifact-download:
source-plan: PROJECTA_PLANA
I've also tried variations according to manual in vain, for example:
version: 2
deployment:
source-plan: PROJECTB_PLANB
..
Sandbox:
tasks:
- artifact-download:
source-plan: PROJECTA_PLANA
artifacts:
- destination: ./scripts
name: scripts
How would I debug this issue further, please?
It seems like you are encountering issues with the use of the artifact-download task in your Bamboo YAML configuration. The error message, "Bamboo YAML import failed: Document structure is incorrect," typically indicates a syntax or formatting error, or a misunderstanding of how the task should be defined according to Bamboo's specifications. Here’s a step-by-step approach to debug and potentially resolve the issue:
First, ensure that your YAML syntax is correct. YAML is very sensitive to indentation and formatting. Use a YAML validator tool to check for syntax errors, like improper indentation or misplaced characters.
Since you are using Bamboo 8.2, make sure that the syntax you are using matches exactly with what's specified for version 8.2 in the Bamboo documentation. Sometimes, documentation may have examples that are slightly out of date or apply to only specific versions.
The configuration for downloading artifacts can be tricky. Here’s a correct structure for defining an artifact download task in a deployment project according to the Bamboo YAML specs:
yamlCopy code
version: 2 deployment: project-key: PROJECTB key: PLANB environment: Production tasks: - artifact-download: source-plan: PROJECTA-PLANA artifacts: - name: scripts destination: scripts
Ensure that:
Use the Bamboo UI to manually set up an artifact download task to ensure that you understand the required fields and options. Once you have a working configuration in the UI, try to replicate that configuration in your YAML file.
When you import your YAML configuration and it fails, Bamboo typically provides log output that can give additional clues about what exactly is wrong. Look for specific messages about unrecognized fields or incorrect values.
Make sure that the source-plan key matches exactly what Bamboo expects. This usually includes both the project key and the plan key (e.g., PROJECTA-PLANA). Incorrect references will lead to errors during YAML parsing.
When dealing with complex configurations, build your YAML incrementally. Start by configuring a very simple task or stage and ensure that imports correctly. Then, gradually add more complexity. This can help isolate the specific part of the YAML that causes the issue.
By following these steps, you should be able to pinpoint the source of your configuration problems and get your Bamboo YAML files working as expected.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.