Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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 - Early Access Program 2

We’re preparing for Bamboo 8.0, which will be our first Data Center release. To make sure our app vendors and customers with written in-house apps are prepared, we’re launching Bamboo 8.0 Early Acces...

132 views 1 7
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