2018-02-01_11-27-21_Configuration as code in Bamboo
We've written down some details about how configuration as code works in Bamboo.
Bamboo uses high-level language for configuration
YAML can get the job done, but we know that enterprise users 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 features that aren't available in languages like YAML:
- 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 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.