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,557,537
Community Members
 
Community Events
184
Community Groups

YAML spec structure for custom plugin fields

I'm trying to define field values for a custom Bamboo plugin that I've written and I can't seem to find any information on the structure of the YAML to do so. It seems like I'll have to use the "AllOtherPluginsConfiguration", based on looking at the Java spec examples. I'm basically looking to do this, but in YAML (with my own plugin, not clover):

AllOtherPluginsConfiguration configurationForJob = new AllOtherPluginsConfiguration()
    .configuration(new MapBuilder()
        .put("custom", new MapBuilder()
            .put("clover", new MapBuilder()
                .put("path", "results")
                .put("license", "")
                .put("integration", "custom")
                .put("exists", "true")
                .put("useLocalLicenseKey", "true")
                .build())
            .build())
        .build());

Plan plan = new Plan(project, "My Plan Two", "PLAN2") .description("This is an example of a plan") .enabled(true) .stages(new Stage("Stage 1") .jobs(new Job("Job 1", "JOB") .pluginConfigurations(configurationForJob)));

 So far I have something that looks like:

Job 1:
tasks:
- script:
- echo 'Hello from YAML Specs'
pluginConfigurations:
allOtherPluginsConfiguration:
custom:
myPlugin:
field1: true

I've tried a variety of combinations similar to that but can't seem to stumble upon the correct one. So I guess my question is: is this possible to do in YAML spec like it seems to be in Java spec? And if so, is there documentation anywhere as to how it should be formatted?

2 answers

1 accepted

0 votes
Answer accepted
Alexey Chystoprudov
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Jan 21, 2020 • edited

Hello Cory,

There's no automatic support of such functionality for YAML specs.

But since Bamboo 7.0 it's possible to have this functionality if plugin vendor adds it to app.

There's no official documentation but you can see implementation details at open source plugins:

* see https://bitbucket.org/atlassian/bamboo-plan-ownership-plugin/src/master/src/main/java/com/atlassian/buildeng/ownership/plan/PlanOwnershipPlanConfigurationPlugin.java method fromYaml

* see usage of https://bitbucket.org/atlassian/per-build-container/src/master/bamboo-isolated-docker-plugin/src/main/java/com/atlassian/buildeng/isolated/docker/yaml/YamlConfigParser.java

 

Bamboo 7.0.0-rc1 is available for download already

Thanks for the reply. We're not currently using Bamboo 7 yet, but I will keep this for reference once we upgrade.

Alexey Chystoprudov
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Jan 22, 2020

Just checked source code, it's available since 6.10

Hi everyone, I couldn't find a way how to make it work, all the time it says that the structure of my yaml is incorrect, I'm using the documentation from here:
https://docs.atlassian.com/bamboo-specs-docs/6.9.0/specs.html?yaml#miscellaneous-plugins

It says that miscellaneous plugins are supported; however, I'm out of ideas how to make it work. I'm trying to do something like, but it fails on wrong yaml structure:

---
version
: 2
plan:
project-key: foo
key: bar
name: foo-bar
other:
allOtherPluginsConfigurations:
custom:
allure:
artifact.name: "allure-results"
config:
failed.only: "false"
executable: "allure-2.5.0"
enabled: "true" 

 
@Alexey Chystoprudov could you give me a piece of advice on that matter? I'd appreciate any help

Alexey Chystoprudov
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Jun 17, 2021

Hello @D , sorry for delay.

Unfortunately the provided code will not work until Allure Bamboo plugin team provides support for YAML specs at app's code. You need to contact them with feature request or PR for such functionality .

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events