Brian Foster, Sales Engineer and Rick Broker, Solutions Architect, XebiaLabs recently guided our customers through the process of custom tile creation in XL Release. This post will show you the benefits of creating custom tiles and a little how-to. If XL Release is not yet a part of your software delivery process, learn more here.
Custom tiles benefit your release process in many ways including:
Let’s get started with creating custom tiles!
This is the command center for your plugin. It defines the synthetic types in the XebiaLabs platform (tiles, tasks, triggers, etc.) For a new tile, you need to define the tile model like this:
Please note: xlrelease.Tile, github.UserTile, user-summary.html, and scope
Postman is a great tool to use when starting your development and accessing the API rest endpoints you want to display in your tiles. Here is the JSON response for the user API from Github. We will leverage these variables in our python logic.
Now we create a python script that retrieves and organizes the JSON data we want to present. A few things to note:
Here is an example of a request call in the Gitlab plugin. This is another way to can access API rest endpoints. Notice how the response object data was converted to a JSON string and returned.
Use third party tools like echarts to create graphical charts in your tiles.
Again, access the data via the response data variable.
When displayed in XL Release, charts can take any form such as pie charts, line charts, tables, etc…Build what best suits your organization!
When you are ready to test your changes and render the code in XL Release, use Gradle to fire up a Docker image. Each plugin should have a build.gradle file. Make sure the xlDocker entries are in your build.gradle file. Your build.gradle file will also contain other dependencies your code needs like jython, PyGithub, license, etc.
When ready, you can run ./gradlew runDocker at a unix command line or within your IDE to start up a local instance of XL Release. Be sure you have Docker installed and running on your machine. Other helpful Gradle commands are −./gradlewclean, ./gradlewbuild