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

testParsers not working as documentation says.

Pierre-Luc Veilleux
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 22, 2018
---
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

0 votes
Gabriel Ribeiro
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 22, 2018

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

pushpak007
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 9, 2019

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
AUG Leaders

Atlassian Community Events