The xl-docker-gradle-plugin allows to startup a Docker container with the XL Tool installed to compile the plugin.
Also you can use runDocker
to start an XL Tool container with your plugin preloaded.
- Gradle 2.13+
Define on top of the build.gradle
file:
plugins {
id "com.xebialabs.xl.docker" version "1.1.0"
}
For the latest version of the plugin have a look at: xl-docker-gradle-plugin
You can make use of the following gradle tasks
compileDocker
compileImage
: Specifies which image to use for compilation (xebialabs/xlr_dev_compile
,xebialabs/xld_dev_compile
orxebialabs/xltv-dev-compile
)compileVersion
: Specifies which version of the image to use. See Docker hubdownload
: Specifies any additional plugins to be downloaded.
runDocker
compileImage
: Specifies which image to use for compilation (xebialabs/xlr_dev_compile
,xebialabs/xld_dev_compile
orxebialabs/xltv-dev-compile
)compileVersion
: Specifies which version of the image to use. See Docker hubrunImage
: Specifies which image to use for running the XL Tool (xebialabs/xlr_dev_run
,xebialabs/xld_dev_run
orxebialabs/xltv-dev-run
)runVersion
: Specifies which version of the image to use. See Docker hubrunPortMapping
: Specifies which port mapping to use. For example4516:4516
download
: Specifies any additional plugins to be downloaded.- The
src/main/resources
folder will be linked into the XLext
folder (so you don't have to restart on script changes) - This task depends on
compileDocker
runDockerCompose
- A
docker-compose.yml
should be present undersrc/test/resources/docker
- This task depends on
compileDocker
- A
stopDockerCompose
xlDocker {
compileImage = 'xebialabs/xlr_dev_compile'
compileVersion = 'v6.0.0.1'
runImage = 'xebialabs/xlr_dev_run'
runVersion = 'v6.0.0.1'
runPortMapping = '5516:5516'
download("xlr_community_plugins") {
src(["https://github.com/xebialabs-community/xlr-xldeploy-plugin/releases/download/v2.1.5/xlr-xldeploy-plugin-2.1.5.jar",
"https://github.com/xebialabs-community/xlr-xltestview-plugin/releases/download/v2.1.1/xlr-xltestview-plugin-2.1.1.jar"])
dest file("src/downloads/plugins")
acceptAnyCertificate true
}
}