Skip to main content
Version: Release 22.1

Extend the Release User Interface

You can extend Release by creating new endpoints backed by Jython scripts and new UI screens that use them. Each extension must be packaged in a jar archive and saved in the plugins folder of the Release server.

To avoid file name collisions, we recommend that you create a folder under web with a unique name for each UI extension plugin.

The following XML files tell Release where to find and how to interpret the content of an extension:

  • xl-rest-endpoints.xml for adding new REST endpoints
  • xl-ui-plugin.xml for adding new top-menu items

These files are both optional.

Adding menu items to Release

The xl-ui-plugin.xml file contains information about the menu items to add to Release. You can order them using the weight attribute.

For example, xl-ui-plugin.xml could contain:

<plugin xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.xebialabs.com/deployit/ui-plugin"
xsi:schemaLocation="http://www.xebialabs.com/deployit/ui-plugin xl-ui-plugin.xsd">

<menu-ref ref="xlrelease.menu.Main">
<menu id="xlrelease.menu.Custom" label="Custom" weight="45">
<menu-item label="Releases list" uri="include/ReleasesListPage/index.html" weight="10" path-suffix="custom/releases">
<property name="permissions" value="security#edit" />
</menu-item>
</menu>
</menu-ref>

<library name="xlrelease.releasesListPage"/>

</plugin>

Menus are enclosed in the <plugin> tag. The xl-ui-plugin.xsd schema verifies how menus are defined.

In this example, <menu-ref ref="xlrelease.menu.Main"> defines an extension for the Release main menu, which has the ID xlrelease.menu.Main.

<menu id="xlrelease.menu.Custom" label="Custom" weight="45"> adds a new menu with ID xlrelease.menu.Custom. This menu will have the label Custom and will be placed between the menus with IDs xlrelease.menu.Reports and xlrelease.menu.Settings, because weight 45 is between their respective weights.

Referring to predefined menu items

<menu-ref> is used to refer to the predefined Release menus. Predefined menus have structure similar to:

<menu id="xlrelease.menu.Main" label="" weight="-1">
<menu-item label="Tasks" path-suffix="tasks" weight="10" uri=""/>
<menu id="xlrelease.menu.Releases" label="Releases" weight="20">
<menu-item label="Overview" path-suffix="releases" weight="10" uri=""/>
<menu-item label="Pipeline" path-suffix="pipeline" weight="20" uri=""/>
<menu-item label="Templates" path-suffix="templates" weight="30" uri=""/>
</menu>
<menu id="xlrelease.menu.Reports" label="Reports" weight="40">
<menu-item label="Dashboard" path-suffix="dashboard" weight="10" uri="" />
<menu-item label="Release automation" path-suffix="release-automation" weight="20" uri="" />
<menu-item label="Release Value Stream" path-suffix="release-value-stream" weight="30" uri="" />
</menu>
<menu id="xlrelease.menu.Settings" label="Settings" weight="50">
<menu-item label="Profile" path-suffix="profile" weight="10" uri=""/>
<menu-item label="Global variables" path-suffix="global-variables" weight="20" uri=""/>
<!-- ... other menu items ... -->
<menu-item label="Configuration" path-suffix="configuration" weight="100" uri="">
<property name="permissions" value="admin"/>
</menu-item>
</menu>
</menu>

Nesting menu references

You can nest <menu-ref> items. This example shows how to add an item to a nested menu, in this case, xlrelease.menu.Reports:

<plugin xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.xebialabs.com/deployit/ui-plugin"
xsi:schemaLocation="http://www.xebialabs.com/deployit/ui-plugin xl-ui-plugin.xsd">

<menu-ref ref="xlrelease.menu.Main">
<menu-ref ref="xlrelease.menu.Reports">
<menu-item label="Pending releases by team" ... />
</menu-ref>
</menu-ref>
...

The attributes that are available for <menu> are:

AttributeRequiredDescription
idYesMenu item ID, which must be unique among all menu items in Release. If there are duplicate IDs, Release will return a RuntimeException.
labelYesText to show on the menu button.
uriYesLink that will be used to fetch the content of the extension. The link must point exactly to the file that the browser should load. Default pages such as index.html are not guaranteed to load automatically.
weightYesMenu item order. The higher the weight, the further to the right the menu item will be placed.

<menu> can contain <menu>, <menu-item>, and <menu-separator> elements.

The attributes that are available for <menu-separator> are:

AttributeRequiredDescription
weightYesMenu separator order.

Note: Menu separators are not rendered in the Release user interface.

The attributes that are available for <menu-ref> are:

AttributeRequiredDescription
refYesID of the menu item that will be extended. This must refer to an existing menu in the Release.

<menu-ref> can contain <menu>, <menu-item>, or <menu-separator> elements, as well as other <menu-ref> elements.

The attributes that are available for <menu-item> are:

AttributeRequiredDescription
labelYesText to show on the menu button.
uriYesLink that will be used to fetch the content of the extension. The link must point exactly to the file that the browser should load. Default pages such as index.html are not guaranteed to load automatically.
weightYesMenu item order. The higher the weight, the further in the menu item will be placed.
path-suffixYesSuffix that the menu item in the URL will use.

<menu-item> elements can contain <property> elements.

Property attributes

Each menu item can contain multiple <property> elements that you can use to enhance functionality. The attributes that are available for <property> are:

AttributeRequiredDescription
nameYesName of the property exposed on a menu item.
valueYesValue of the property.

The only supported property is named permissions. It allows you to provide a comma-separated list of global or release permissions. If a user has any of the permissions in the list, then he or she can access the menu item. Global permissions are checked for the top-level menu, while release permissions are checked for the Release page submenu.

permissions can have the following values:

Permission nameScopePermission description
adminGlobalAll permissions
loginGlobalLog in to Release
security#editGlobalAccess the Roles and Permissions screens and edit security on releases and templates
template#createGlobalCreate a new template
release#createGlobalCreate a release from any template; also see the Create Release permission on a single release
reports#viewGlobalView reports
global_variables#editGlobalEdit global variables (available in Release 4.8.0 and later)
environment#editGlobalCreate, edit or delete an environment. Permission is required to create stages and create environment labels
application#editGlobalCreate, edit, or delete an application
reservation#editGlobalAccess the scheduling pages, make a schedule, or reserve an environment
template#create_releaseTemplateCreate a release from the template
template#viewTemplateView the template
template#editTemplateEdit the template
template#edit_securityTemplateEdit the template security settings
release#viewReleaseView the release
release#editReleaseEdit the release
release#edit_securityReleaseEdit the release security settings
release#startReleaseStart the release
release#abortReleaseAbort the release
release#edit_taskReleaseEdit task in the release
release#reassign_taskReleaseReassign task in the release

library attributes

The attributes that are available for <library> are:

AttributeRequiredDescription
nameYesName of the Angular module (extension library) that the extension should load.