This plugin offers an interface from XL Release to Jenkins 2.x.
This document describes the functionality provided by the XL Release xlr-jenkins2-trigger-api.
See the XL Release reference manual for background information on XL Release and release automation concepts.
This is a 'See It Work' plugin project, meaning the code base includes functionality that makes it easy to spin up and configure a dockerized version of the XebiaLabs platform with this plugin already installed. Using the provided test data, you can then try out the plugin features. This is useful for familiarizing yourself with the plugin functionality, for demonstrations, for testing and for further plugin development. Currently the Demo Data is configured to demonstrate the tasks Get Parameters and Get Environment Variables only.
You can configure a job trigger by first going to your template and selecting Triggers
. You can use 2 trigger types:
- JobTrigger: Polls for a Jenkins Job to finish
- FolderTrigger: Polls for any Jenkins job(s) to finish underneath a Jenkins folder
When selected, you can provide the Jenkins details.
- Jenkins Job Summary Tile: This tile can be used to pull a summary of all runs of a jenkins job
Configure Tile
Preview Tile
- Jenkins Pipeline View Tile: This tile breaks down the build time for recent jobs, down to the level of build stages. Users can quickly identify skipped stages, outlier build times, and build performance degradation.
The Pipeline Stage View Jenkins Plugin must be installed in Jenkins, before using this dashboard tile.
NOTE: You must have the Jenkins plugin ‘Environment Injector’ id=envinject installed prior to executing the Jenkins job
Build and package the plugin with...
./gradlew clean build
The following will set up a xlr/jenkins testbed using docker.
- Clone this github project to your local dev environment
- You will need to have Docker and Docker Compose installed.
- You will need to be able to run bash scripts
- The XL-Release docker image uses the community trial license
- Build the xlr-jenkins2-plugin.jar - Open a terminal and cd into and run ./gradlew clean build . Be sure to re-run the command whenever code is changed.
- From another terminal, cd into the /src/test/resources/docker/ directory.
- Then run: docker-compose up
- XL Release will run on the localhost port 15516. It may take up to a minute for XL Release to start up
- The XL Release username / password is admin / admin
- Jenkins will run on the localhost port 9080.
- The Jenkins username / password is admin / admin
- After XL Release has started, you can set up a template, a shared configuration server in XLR and a test job and build in Jenkins by running the script /src/test/resources/docker/initialize/initialize_data.sh.
- You can then run a release within XLR using the template named 'jenkingTest'.
- When code is modified, re-run the ./gradlew clean build (in the first terminal), then refresh the testbed by running docker-compose down (in a third terminal) followed by docker-compose up (in the second terminal). After XL Release starts up, re-run /src/test/resources/docker/initialize/initialize_data.sh.
Further Demo/Dev Notes:
- The log file for the plugin - plugin.log will be persisted to the local directory /build/reports/tests/log directory.
Please review the contributing guidelines for xebialabs-community at http://xebialabs-community.github.io/
This community plugin is licensed under the MIT license.
See license in License.md