Bamboo Java Specs

We've written down some details about how configuration as a code in Java works in Bamboo.

Bamboo uses high-level language for configuration

YAML can get the job done when you want to define your plan quickly but we know that enterprise users sometimes need something much more powerful. That's why we decided to pick Java as the default language for creating Bamboo Specs.

When using Java, you get the following features:

  • syntax checking and highlighting while editing
  • code autocompletion - IDE "knows" what is available (whereas a YAML file is just text)
  • code refactoring
  • code analysis - IDE helps you find usages of given method or object
  • code validation by the compiler - you can easily spot any spelling mistakes
  • offline and online code validation by the Bamboo Specs runner
  • API versioning and deprecation (via JavaDoc's '@since' and '@deprecated' tags)
  • language features such as loops, modularisation, libraries etc.

Bamboo allows you to write configuration in language of your choice

The Bamboo Specs library which provides API to write configuration as code has been written in Java. Thus the most natural is to use Java to write the configuration as well and this is a language which Atlassian will officially support for Bamboo Specs.

However, if you are familiar with other JVM language and have experience how to integrate it with Java classes, you can use any language of your choice. Good examples are: Groovy, Scala or Kotlin (we performed smoke tests with Groovy and Kotlin and it worked fine).

We also provide a Spec Runner Maven plugin, which eases the deployment of plans.

Last modified on Jul 20, 2020

Was this helpful?

Provide feedback about this article
Powered by Confluence and Scroll Viewport.