Use the xl-docker-gradle-plugin
This document describes the functionality provided by the xld docker gradle plugin.
The xld-docker-gradle plugin allows to startup a Docker container with XLD installed to compile the plugin.
Also you can use runDocker
to start an XLD container with your plugin preloaded.
- XL Deploy 5.x
- Gradle 2.12+
Define on top of the build.gradle
file:
plugins {
id "com.xebialabs.xld.docker" version "1.2.2"
}
For the latest version of the plugin have a look at: xld-docker-gradle-plugin
You can make use of the following gradle tasks
compileDocker
compileVersion
: specifies which version of the XLD image to use.
runDocker
compileVersion
: specifies which version of the XLD compile image to use.runVersion
: specifies which version of the XLD run image to use.xld_initialize.py
: If your project has a filesrc/test/resources/docker/initialize/xld_initialize.py
, this will be run through the CLI. This allows you to create some dummy CI's for testing.- The
src/main/resources
folder will be linked into the XLDext
folder (so you don't have to restart on script changes)
runDockerCompose
- A
docker-compose.yml
should be present undersrc/test/resources/docker
- This task depends on
compileDocker
- A
stopDockerCompose
xldDocker {
compileVersion = 'v5.5.5.4'
runVersion = 'v5.5.5.5'
download("xld_community_plugins") {
src(["https://github.com/xebialabs-community/xld-openshift-plugin/releases/download/v6.1.1/xld-openshift-plugin-6.1.1.xldp",
"https://github.com/xebialabs-community/xld-docker-plugin/releases/download/5.1.5/xld-docker-plugin-5.1.5.xldp"])
dest file("src/downloads/plugins")
acceptAnyCertificate true
}
}