DSL editors

2 minute readReferenceDeveloper productivity

CloudBees CD/RO provides two different DSL editors:

  • DSL IDE: general purpose DSL editor to easily create and evaluate DSL files.

  • DSL inline object editor: available within an object’s visual editor, it provides a convenient way to view or edit the underlying DSL for the object.

Alternatively, use the evalDsl API call to programmatically edit DSL code.

DSL IDE

The DSL IDE provides a platform to easily test and evaluate local DSL files from the CloudBees CD/RO UI.

To access this feature from the CloudBees CD/RO UI, browse to https://<cloudbees-cd-server>/ and select DevOps Essentials  DSL IDE from the main menu.

IDE editor
Figure 1. DSL IDE

The DSL IDE (Integrated Development Environment) provides access to the following features: code editing, importing, and exporting.

Action Description

Import

Export

Import or export DSL code to or from local storage.

Undo

Redo

Clear

Format

Shortcuts for standard editor actions.

Format

Select a CloudBees CD/RO DSL format. Choices are:

  • Groovy

  • YAML format is a Preview feature.

A Preview feature:
  • Has not undergone end-to-end testing with CloudBees products

  • Is provided without service-level agreements (SLA) and therefore does not include CloudBees' commitment on functionality or performance

  • May impact other stable areas of the product when used

  • May have limited documentation

  • May not be feature complete during the Preview period

  • May graduate from preview state to fully supported or be removed from the product

  • May introduce incompatible, backward-breaking changes that could revoke the ability to upgrade

Product features and documentation are frequently updated. If you find an issue or have a suggestion, please contact CloudBees Support.

Examples

Seed scripts for several common DSL operations and CloudBees CD/RO objects. Select a script from the pull down to get you started with the selected operation.

When finished editing, select the Run button to evaluate the DSL script. Results appear in the bottom panel.

DSL inline object editor

The DSL inline object editor is available from within the visual editors for application, dashboard, environment, environment template, microservice, pipeline, and release objects. It provides a convenient way to view or edit the underlying DSL for the object. Buttons let you toggle between the object editors and the DSL editor.

The DSL editor simplifies the modeling process, because you can run DSL code from the CloudBees CD/RO Deploy UI rather than using an external IDE or commandline interface via the evalDsl API call. The following example shows how to access the DSL editor from the pipeline editor.

DSL editor
Figure 2. DSL editor
  1. Navigate to the pipeline object list and select a pipeline. The selected pipeline displays in the pipeline editor.

  2. Select the DSL Editor button from the tools bar. The DSL editor opens in edit mode, displaying the DSL code for the current object.

  3. Make a change to the DSL code and then select the Save button in the upper right corner of the editor pane. Your changes are applied to the object and saved.

  4. Select the Back arrow to return to the pipeline list.