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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

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,559,417
Community Members
 
Community Events
184
Community Groups

Bamboo specification yaml include a task

Edited

I am currently investigating the use of Bamboo-specs using yaml. As we have a few scripted tasks that are fairly similar for different jobs I wanted to separate the script from the rest of the spec file. However I am getting errors;

Bamboo YAML import failed: Document structure is incorrect: Run tests / tasks / [1]: Task must have its type defined as the only YAML property

Stucture of bamboo-specs.yaml;

---
version: 2
plan:
project-key: DDNAM
key: ATLUIR
name: Testing - ATL UI regression (experimental)
stages:
- Run all tests:
manual: false
final: false
jobs:
- Run tests
Run tests:
key: CT
tasks:
- checkout:
path: testing
force-clean-build: 'true'
- !include 'tasks/robot_run_chrome.yaml'
- !include 'tasks/robot_run_firefox.yaml'
......more config....

tasks/robot_run_chrome.yaml:

script: |
./scripts/ui-test-runner.sh -t "${bamboo_RobotFiles}" \
--variable browser:Chrome \
...some other variables....
--variable BambooBuildID:${bamboo.buildResultKey}
exit 0
workingDirectory: testing

 Can someone help me out on how to make these files work

 

We use Bamboo 7.1.1 (on premise)

 

---- UPDATE-----

Apparently the workingDirectory property caused an issue, if I remove it the task works.

However how can I add the workingDirectory to this script or is cd to folder the only option?

2 answers

After having this error myself, I found the problem was incorrect indentation of properties within a task's YAML definition.

The working directory for a script is specified using

working-dir

https://docs.atlassian.com/bamboo-specs-docs/latest/specs.html?yaml#task-script

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events