Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,293,448
Community Members
 
Community Events
165
Community Groups

testParsers not working as documentation says.

---
project:
key: TEST
plan:
key: BYT
name: Bamboo Spec tutorial
stages:
- jobs:
- scripts:
- '#!/bin/bash'
- echo 'Going to slay the red dragon, in bash'
interpreter: shell
# Job's test parsers.
testParsers:
- type: junit
testResults: '**/junit/*.xml'
Bamboo YAML import failed: Invalid format of the YAML document: while parsing a block collection
31-Dec-1969 19:00:00 in 'string', line 15, column 13:
31-Dec-1969 19:00:00 - type: junit
31-Dec-1969 19:00:00 ^
31-Dec-1969 19:00:00 expected <block end>, but found Key
31-Dec-1969 19:00:00 in 'string', line 16, column 13:
31-Dec-1969 19:00:00 testResults: '**/junit/*.xml'
31-Dec-1969 19:00:00 ^

https://confluence.atlassian.com/bamboo0603/bamboo-specs-yaml-format-946020345.html 

1 answer

Hi Pierre-Luc

Your YAML indentation looks to be incorrect. Could you please remove the two extra spaces before the type definition and try again?

Ex.

project:
key: PROJ
plan:
key: BYT
name: Bamboo Spec tutorial
stages:
- jobs:
- scripts:
- '#!/bin/bash'
- echo 'Going to slay the red dragon, in bash '
interpreter: shell
# Job's test parsers.
testParsers:
- type: junit
testResults: '**/junit/*.xml'

I suggest you to use a YAML validation tool to check the code before committing it to the repo. (e.g. http://www.yamllint.com/)

thanks

I also Suggest you to use a YAML Validation tool like https://www.yamlonline.com . it's validate your YAML and also convert your YAML TO JSON or YAML TO XML and CSV so on.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bamboo

Bamboo Data Center on Kubernetes

Hi, If you are running self-managed environments and looking to adopt modern infrastructure, Bamboo Data Center can now be deployed in a Kubernetes cluster. By leveraging Kubernetes, you can easily...

912 views 3 8
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you