- Summary
- Intershop Commerce Management Docker Plugin
- Intershop Commerce Management Customization Docker Plugin
- Intershop Commerce Management Test Docker Plugin
- Intershop Commerce Management GebTest Docker Plugin
- Intershop Commerce Management SolrCloud Plugin
- Configuration properties file
- Contribute
- License
This plugin collection contains plugins for building container images and starting container of and for Intershop Commerce Management. It is necessary that the 'ICM Gradle plugin' was applied to the project. Version 6.0.0 of this plugin is the minimum version.
This plugin is based on 'Gradle Docker plugin' and the 'Docker-Java Framework'.
This plugin configures the basics of an Intershop Commerce Management product project.
The plugins must be applied to the root project.
Groovy
plugins {
id 'com.intershop.gradle.icm.base' version '6.0.0'
id 'com.intershop.gradle.icm.docker' version '5.0.0'
}
intershop {
// see https://github.com/IntershopCommunicationsAG/icm-gradle-plugin
projectInfo {}
projectConfig {}
}
intershop_docker {
images {
webadapter = 'intershophub/icm-webadapter:2.4.9'
webadapteragent = 'intershophub/icm-webadapteragent:4.0.0'
mssql = 'intershophub/mssql-intershop:2019-latest'
mailsrv = 'mailhog/mailhog:latest'
}
imageBuild {
license = 'Intershop Communications AG'
maintainer = 'Intershop Communications AG "www.intershop.de"'
baseDescription = 'Intershop Commerce Management'
baseImageName = '${dockerRegHostName}/intershop/icm'
images {
mainImage {
dockerfile = file('docker/main/Dockerfile')
addFiles(tasks.createMainPkg.outputs.files)
dockerBuildDir = 'main'
description = 'AppServer Container'
enabled = true
}
testImage {
dockerfile = file('docker/test/Dockerfile')
addFiles(tasks.createTestPkg.outputs.files)
dockerBuildDir = 'test'
description = 'AppServer Test Container'
enabled = true
}
}
}
}
Kotlin
plugins {
id("com.intershop.gradle.icm.base") version "6.0.0"
id("com.intershop.gradle.icm.docker") version "5.0.0"
}
intershop {
// see https://github.com/IntershopCommunicationsAG/icm-gradle-plugin
projectInfo {}
projectConfig {}
}
intershop_docker {
images {
webadapter.set("'intershophub/icm-webadapter:2.4.9")
webadapteragent.set("intershophub/icm-webadapteragent:4.0.0")
mssql.set("intershophub/mssql-intershop:2019-latest")
mailsrv.set("mailhog/mailhog:latest")
}
imageBuild {
license.set("Intershop Communications AG")
maintainer.set("Intershop Communications AG 'www.intershop.de'")
baseDescription.set("Intershop Commerce Management")
baseImageName.set("${dockerRegHostName}/intershop/icm")
images {
mainImage {
dockerfile.set(file("docker/main/Dockerfile"))
addFiles(tasks.createMainPkg.get().outputs.files)
dockerBuildDir.set("main")
description.set("AppServer Container")
enabled.set(true)
}
testImage {
dockerfile.set(file("docker/test/Dockerfile"))
addFiles(tasks.createTestPkg.get().outputs.files)
dockerBuildDir.set("test")
description.set("AppServer Test Container")
enabled.set(true)
}
}
}
developmentConfig {
cartridgeList.set(setOf("ft_starter_store"))
}
}
Properties
Property | Type | Default value | Description |
---|---|---|---|
|
|
<project name> |
Underscores will be replaced with dashes. This property is used for container names, volumes and network in Docker. |
|
|
This extension handles the access to a local property file, to adapt the configuration to a local environment. See Configuration properties file. |
|
|
|
This extension contains the configuration of all supported and necessary images. |
|
|
|
This part contains the configuration for all image artifacts of a build project. |
Methods
Method | Parameter | Description |
---|---|---|
|
|
Configures the development configuration of this project in a Groovy context. |
|
|
Configures the development configuration of this project in a Kotlin script context. |
|
|
Configures the images' configuration of this project in a Groovy context. |
|
|
Configures the images' configuration of this project in a Kotlin script context. |
|
|
Configures the image build configuration of this project in a Groovy context. |
|
|
Configures the image build configuration of this project in a Kotlin script context. |
Properties
Property | Type | Default value | Description |
---|---|---|---|
|
|
|
If the appserver runs as a container this value must be true. This is used for customer projects. |
|
|
|
The directory with a valid license file for the running project. |
|
|
|
This directory contains the environment specific development configuration for ICM. See Configuration properties file. |
|
|
|
The file path of the license file (read only). |
|
|
|
The path of the configuration file (read only). |
|
|
none |
The names of the cartridges to be used whenever an ICM-AS server is started inside a container. |
Methods
Method | Parameter | Description |
---|---|---|
|
|
Get a property from the configuration file. If the property key is not available the return value is empty. |
|
|
Get a property from the configuration file. If the property key is not available the return value is specified by the second parameter. |
Properties
Property | Type | Default value | Description |
---|---|---|---|
|
|
|
The image contains the web server of the Intershop Commerce Management application with a special Intershop Apache module. |
|
|
|
The web adapter agent image of the Intershop Commerce Management application. |
|
|
|
The Microsoft SQL server image. There will be also a build file available. |
|
|
|
A mail server for testing the mail feature of the application. |
|
|
|
This image is used for the Solr Cloud configuration with a single node. |
|
|
|
This image is used for the Solr Cloud configuration with a single node. |
|
|
|
This image is used for the Nginx reverse proxy for development without the WebAdapter. |
|
|
|
This image is used for a local redis instance, which can be used as a pagecache when the WebAdapter is disabled. |
Properties
Property | Type | Default value | Description |
---|---|---|---|
|
|
"Intershop Communications AG" |
The license of image artifacts created by this build. |
|
|
"Intershop Communications AG \"www.intershop.de\"" |
The maintainer of image artifacts created by this build. |
|
|
"Intershop Commerce Management" |
The base description for all image artifacts created by this build. |
|
|
The version of image artifacts created by this build. |
|
|
|
<build time> |
The build time of image artifacts created by this build. The machine time is used for the default value. |
|
|
"server/intershop/icm" |
The base image name for all image artifacts created by this build. |
|
|
The detailed configuration of all image builds. |
Properties
Property | Type | Default value | Description |
---|---|---|---|
|
|
The configuration of the main server image build. |
|
|
|
The configuration of the test server image build. This image uses the main image as a base image. |
For all properties configurations methods with a closure or an action are available.
Properties
Property | Type | Default value | Description |
---|---|---|---|
|
|
Image name extension of the special image. The base is used from the [ProjectConfiguration]. |
|
|
|
Extended description of the image. |
|
|
|
Source files for the build (start scripts etc.). These files are referenced by the Dockerfile. |
|
|
|
Files will be packaged by the build for an installation in a docker image. This is the name of the package task. |
|
|
|
The docker file for the image build. |
|
|
|
The working director for the image build. |
|
|
|
The build of the image can be disabled for the project. |
Task name | Description |
---|---|
prepareNetwork |
Creates a network with the specified name <extension name>-network. All start tasks are dependent on this task. |
removeNetwork |
Removes the network from the Docker configuration. |
*MSSQL |
These tasks pull, start, stop and remove the MSSQL image. |
*MailSrv |
These tasks pull, start, stop and remove the Mail server image. |
*SolrCloud |
These tasks orchestrate all Solr Cloud related tasks. |
*ZK |
These tasks pull, start, stop and remove the Zookeeper image. |
*Solr |
These tasks pull, start, stop and remove the Solr image. |
createWebVolumes |
Creates necessary volumes for the ICM web server with WebAdapter Agent. |
removeWebVolumes |
Removes web server volumes from the Docker configuration. |
*WAA |
These tasks pull, start, stop and remove the ICM Web Adapter Agent image. |
*WA |
These tasks pull, start, stop and remove the ICM Web Adapter image. This image contains an Apache webserver with the ICM WA module. |
*WebServer |
These tasks orchestrate all web server related tasks. |
containerClean |
This task starts the remove tasks for all available objects. |
generateICMProps |
Generates an icm.properties file for local development. |
showICMASConfig |
Shows a special part of icm.properties for local application server development. |
startEnv |
Starts a docker based environment based on "intershop.environment.container" in the icm properties file. |
stopEnv |
Stops the docker based environment based on "intershop.environment.container" in the icm properties file. |
*NGINX |
These tasks pull, start, stop and remove the ICM NGINX image. This image contains a NGINX configured to terminate TLS and reverse proxy directly to the Application Server. |
*Redis |
These tasks pull, start, stop and remove the redis image. Redis is always started on Port 6379. |
The task can be called with the following parameters:
Parameter | Description |
---|---|
--db |
Option for the used database. The following values are possible: |
--icmas |
If this parameter specified, the properties file will be generated for app server development. |
--icmenvops |
A comma-separated list of options for the icm.properties files. |
The package of all tasks is com.intershop.gradle.icm.docker.tasks
.
Task name | Class | Description |
---|---|---|
pull* |
|
These task pull the image or a set of images. |
start* |
|
Start image with the necessary configuration. |
stop* |
|
Stop image by name. |
remove* |
|
Removes image from Docker by name. |
The following properties are part of the Configuration properties file.
Key | Description | Co-domain | Mandatory/Optional | Default value |
---|---|---|---|---|
|
the container port to be used for the database (normally no need to change) |
Integer |
Optional |
|
|
the host port to be used for the database |
Integer |
Optional |
|
|
the password to be set for the sa-user |
Integer |
Optional |
|
|
the name of the actual DB to be created |
String |
Optional |
|
|
controls if the actual DB is recreated on container start |
Boolean |
Optional |
|
|
controls if the DB-user is recreated on container start |
Boolean |
Optional |
|
|
controls if the host system’s current user is used for the container start |
Boolean |
Optional |
|
|
the name of the actual DB user to be created |
String |
Optional |
|
|
the password of the actual DB user to be created |
String |
Optional |
|
Key | Description | Co-domain | Mandatory/Optional | Default value |
---|---|---|---|---|
|
the host port to be used for the WebAdapter http port |
Integer |
Optional |
|
|
the host port to be used for the WebAdapter https port |
Integer |
Optional |
|
|
the container port to be used for the WebAdapter http port (normally no need to change) |
Integer |
Optional |
|
|
the container port to be used for the WebAdapter https port (normally no need to change) |
Integer |
Optional |
|
|
the host path to look for TLS certificate and private key (if not defined, no certificates will be mounted for the WA) |
Path |
Optional |
<none> |
|
short name of the certificate file inside of |
String |
mandatory if |
<none> |
|
short name of the private key file inside of |
String |
mandatory if |
<none> |
|
interval in seconds to be used to check if the WebAdapter is ready |
Integer |
Optional |
|
|
max. number of seconds to wait for the WebAdapter to become ready |
Integer |
Optional |
|
|
enables/disables usage of HTTP2 |
Boolean |
Optional |
|
|
controls if the host system’s current user is used for the container start |
Boolean |
Optional |
|
Key | Description | Co-domain | Mandatory/Optional | Default value |
---|---|---|---|---|
|
controls if the host system’s current user is used for the container start |
Boolean |
Optional |
|
Key | Description | Co-domain | Mandatory/Optional | Default value |
---|---|---|---|---|
|
the host port to be used for the NGINX http port |
Integer |
Optional |
|
|
the host port to be used for the WebAdapter https port |
Integer |
Optional |
|
|
the host path to look for TLS certificate and private key (if not defined the certificates will be mounted from the Webserver certificate path) |
Path |
Optional |
<none> |
|
name of the certificate file |
String |
Optional |
|
|
name of the certificate private key file |
String |
Optional |
|
|
controls if the host system’s current user is used for the container start |
Boolean |
Optional |
|
Key | Description | Co-domain | Mandatory/Optional | Default value |
---|---|---|---|---|
|
prefix to be used for indexed inside Solr |
String |
Optional |
<empty> |
|
the host port to be used for the Solr server primary port |
Integer |
Optional |
|
|
controls if the host system’s current user is used for the container start |
Boolean |
Optional |
|
Key | Description | Co-domain | Mandatory/Optional | Default value |
---|---|---|---|---|
|
the host port to be used for the Zookeeper’s primary port |
Integer |
Optional |
|
|
the host port to be used for the Zookeeper’s metrics port |
Integer |
Optional |
|
|
controls if the host system’s current user is used for the container start |
Boolean |
Optional |
|
Key | Description | Co-domain | Mandatory/Optional | Default value |
---|---|---|---|---|
|
the host port to be used for the SMTP port |
Integer |
Optional |
|
|
the host port to be used for the MailHog administration/backoffice port |
Integer |
Optional |
|
|
interval in seconds to be used to check if the mail server is ready |
Integer |
Optional |
|
|
max. number of seconds to wait for the mail server to become ready |
Integer |
Optional |
|
|
controls if the host system’s current user is used for the container start |
Boolean |
Optional |
|
Mails are stored in the build directory mailoutput
.
This plugin configures additional tasks of an Intershop Commerce Management customization project. It uses the same Gradle configuration like the Docker Plugin. With this plugin the task dependencies are adapted to build customization images.
The plugins must be applied to the root project.
Properties
Property | Type | Default value | Description |
---|---|---|---|
|
|
This is a configuration for special Intershop server unit tests. This configuration is used only in a customer project. |
Properties
Property | Type | Default value | Description |
---|---|---|---|
|
|
This is the name of a cartridge that also contains ishUnitTests. |
|
|
|
The name of the test suite. |
Properties
Property | Type | Default value | Description |
---|---|---|---|
|
|
|
This image is used as a base image for the ICM application server image. |
|
|
|
This image is used as a base image for the ICM application server image whenever tests are executed. |
|
|
|
This image is used as a base image for the ICM application server customization image. |
Task name | Description |
---|---|
*Container |
These tasks pull, start, stop and remove the ICM application server image with a special command. There is no running process inside, but it uses the same configuration as the appserver container. |
*AS |
These tasks pull, start, stop and remove the ICM application server image. |
*Server |
These tasks orchestrate all ICM server related tasks (web server and app server) |
dbPrepare |
This task starts dbPrepare inside the running "Container" docker container. |
ishUnitTestReport |
This task starts the creation of a report for all ISHUnit test executions. |
*ISHUnitTest |
This task starts ishUnit tests inside the running "Container" docker container. |
For task classes see the documentation of task in the Intershop Commerce Management Docker Plugin.
The task startContainer and startAS uses StartServerContainer
. pullContainer and pullAS uses PullImage
.
With this task it is possible to use an alternative image for these tasks with a command line parameter --altImage
.
The following properties are part of the Configuration properties file.
Key | Description | Co-domain | Mandatory/Optional | Default value |
---|---|---|---|---|
|
the container port to be used for the appserver service connector http port (normally no need to change) |
Integer |
Optional |
|
|
the host port to be used for the appserver service connector http port |
Integer |
Optional |
|
|
the container port to be used for the appserver management connector http port (normally no need to change) |
Integer |
Optional |
|
|
the host port to be used for the appserver management connector http port |
Integer |
Optional |
|
|
the host port to be used for the appserver JMX port |
Integer |
Optional |
|
|
the host port to be used for the appserver debug port |
Integer |
Optional |
|
|
database type to be used |
{ |
Mandatory |
<none> |
|
JDBC URL pointing to the database to be used |
URL |
Mandatory |
<none> |
|
JDBC database user |
String |
Mandatory |
<none> |
|
JDBC database password |
String |
Mandatory |
<none> |
|
if |
Boolean |
Optional |
|
|
if |
Boolean |
Optional |
|
|
If not specified or set to |
Boolean |
Optional |
|
The referenced database can either be an externally running database or an instance started using the gradle Tasks startMSSQL
.
In either case the properties intershop.databaseType
and intershop.jdbc.*
have to be defined properly (when using the gradle tasks the hostname equals the container name).
Configuration of dbPrepare also applies to the application server. But there are some additional properties:
Key | Description | Co-domain | Mandatory/Optional | Default value |
---|---|---|---|---|
|
interval in seconds to be used to check if the appserver is ready |
Integer |
Optional |
|
|
max. number of seconds to wait for the appserver to become ready |
Integer |
Optional |
|
Configuration of dbPrepare also applies to the container started to run the ISH unit tests.
Parameter | Description | Co-domain | Default value |
---|---|---|---|
|
controls which mode is used by |
{ |
|
|
controls if |
{ |
|
|
controls which cartridges are actually prepared |
comma-separated list of cartridge names to prepare |
<none> |
|
controls which preparers are actually executed |
comma-separated list of preparer property keys to execute |
<none> |
|
additional command line parameters to be passed to |
String |
<none> |
|
controls if the Java code inside of |
{ |
|
|
sets a custom classpath layout |
comma separated list of { |
|
Note
|
To make the classpathLayout sourceJar work the gradle-property localVersion has to be set to true (see https://github.com/IntershopCommunicationsAG/gitflow-version-gradle-plugin#gradle-properties).
|
Examples
./gradlew dbPrepare --mode=init --clean=yes
./gradlew dbPrepare --cartridges=core --property-keys=Class2,Class4
./gradlew dbPrepare --additional-parameter="--force-exec-id=core:Class2,core:Class4" --additional-parameter="--dry-run-save"
Important
|
The following parameters actually belong to the task createAS (not startAS ).
|
Parameter | Description | Co-domain | Default value |
---|---|---|---|
|
controls if the Java code inside application server can be debugged and if the JVM suspends until a debug client connects |
{ |
|
|
toggles if GC logs are written by the application server |
Switch |
|
|
toggles if a heapdump is written by the application server in case of an |
Switch |
|
|
sets a custom name for the application server |
String |
|
|
sets a custom classpath layout |
comma separated list of { |
|
Note
|
To make the classpathLayout sourceJar work the gradle-property localVersion has to be set to true (see https://github.com/IntershopCommunicationsAG/gitflow-version-gradle-plugin#gradle-properties).
|
Examples
./gradlew createAS --debug-icm=suspend
./gradlew createAS --gclog --heapdump
./gradlew startAS
Important
|
As long as the application server is starting the container’s log output is forwarded to the host’s standard out. Afterwards, it is only accessible by docker logs .
|
Note
|
the application server can be started using a custom image (e.g. different version) using the --altImage parameter.
|
Parameter | Description | Co-domain | Default value |
---|---|---|---|
|
controls if the Java code inside application server can be debugged and if the JVM suspends until a debug client connects |
{ |
|
|
sets a custom classpath layout |
comma separated list of { |
|
Note
|
To make the classpathLayout sourceJar work the gradle-property localVersion has to be set to true (see https://github.com/IntershopCommunicationsAG/gitflow-version-gradle-plugin#gradle-properties).
|
Examples
./gradlew ishUnitTestReport
ac_solr_cloud_test
(defined inside of intershop_docker.ishUnitTests
)./gradlew ac_solr_cloud_testISHUnitTest
Note
|
The ISH unit test report is generated to <buildRoot>/build/ishunitrunner .
|
Additional test tasks of an Intershop Commerce Management project will be added by this plugin. It uses the same Gradle configuration like the Docker Plugin. One additional task is added by this plugin.
The plugins must be applied to the root project.
Task name | Description |
---|---|
*TestMailSrv |
These tasks pull, start, stop and remove the Test mail server image. |
For task classes see the documentation of task in the Intershop Commerce Management Docker Plugin.
This plugin adds test tasks for Geb.
The plugin must be applied to the project with included Geb tests. It requires an applied ICM Docker plugin.
Furthermore, it depends on the configuration of Geb self (GebConfig.groovy
).
Groovy
plugins {
id 'com.intershop.gradle.icm.docker.gebtest' version '5.0.0'
}
gebConfiguration {
localDriver {
geckoDriver {
osPackages {
linux {
url = 'https://github.com/mozilla/geckodriver/releases/download/v0.24.0/geckodriver-v0.24.0-linux64.tar.gz'
archiveType = 'tar.gz'
webDriverExecName = 'geckodriver'
}
win {
url = 'https://github.com/mozilla/geckodriver/releases/download/v0.24.0/geckodriver-v0.24.0-win32.zip'
archiveType = 'zip'
webDriverExecName = 'geckodriver.exe'
}
mac {
url = 'https://github.com/mozilla/geckodriver/releases/download/v0.24.0/geckodriver-v0.24.0-macos.tar.gz'
archiveType = 'tar.gz'
webDriverExecName = 'geckodriver'
}
}
}
chromeDriver {
osPackages {
linux {
url = 'https://chromedriver.storage.googleapis.com/86.0.4240.22/chromedriver_linux64.zip'
archiveType = 'zip'
webDriverExecName = 'chromedriver'
}
win {
url = 'https://chromedriver.storage.googleapis.com/86.0.4240.22/chromedriver_win32.zip'
archiveType = 'zip'
webDriverExecName = 'chromedriver.exe'
}
mac {
url = 'https://chromedriver.storage.googleapis.com/86.0.4240.22/chromedriver_mac64.zip'
archiveType = 'zip'
webDriverExecName = 'chromedriver'
}
}
}
}
}
Kotlin
plugins {
id("com.intershop.gradle.icm.docker.gebtest") version "5.0.0"
}
extensions.getByType(GebConfiguration::class.java).apply {
localDriver {
register("geckoDriver") {
osPackages {
register("linux") {
url.set("https://github.com/mozilla/geckodriver/releases/download/v0.24.0/geckodriver-v0.24.0-linux64.tar.gz")
archiveType.set("tar.gz")
webDriverExecName.set("geckodriver")
}
register("win") {
url.set("https://github.com/mozilla/geckodriver/releases/download/v0.24.0/geckodriver-v0.24.0-win32.zip")
archiveType.set("zip")
webDriverExecName.set("geckodriver.exe")
}
register("mac") {
url.set("https://github.com/mozilla/geckodriver/releases/download/v0.24.0/geckodriver-v0.24.0-macos.tar.gz")
archiveType.set("tar.gz")
webDriverExecName.set("geckodriver")
}
}
}
register("chromeDriver") {
osPackages {
register("linux") {
url.set("https://chromedriver.storage.googleapis.com/86.0.4240.22/chromedriver_linux64.zip")
archiveType.set("zip")
webDriverExecName.set("chromedriver")
}
register("win") {
url.set("https://chromedriver.storage.googleapis.com/86.0.4240.22/chromedriver_win32.zip")
archiveType.set("zip")
webDriverExecName.set("chromedriver.exe")
}
register("mac") {
url.set("https://chromedriver.storage.googleapis.com/86.0.4240.22/chromedriver_mac64.zip")
archiveType.set("zip")
webDriverExecName.set("chromedriver")
}
}
}
}
}
This plugin adds also a source set configuration for gebTests:
-
source directory is
"src/gebTest/groovy"
-
resource directory is
"src/gebTest/resources"
The plugin is based on the following GebTest configuration:
import org.junit.runner.Description
import org.junit.runners.model.Statement
import org.openqa.selenium.Dimension
import org.openqa.selenium.chrome.ChromeDriver
import org.openqa.selenium.chrome.ChromeOptions
import org.openqa.selenium.firefox.FirefoxDriver
import org.openqa.selenium.firefox.FirefoxOptions
import org.openqa.selenium.firefox.FirefoxDriverLogLevel
import org.testcontainers.DockerClientFactory
import org.testcontainers.containers.BrowserWebDriverContainer
import org.testcontainers.containers.Network
def webDriverExec = System.getProperty('webdriverExec')
def containerNetwork = System.getProperty('container.network')
waiting {
// max request time in seconds
timeout = 90
// http://gebish.org/manual/current/#failure-causes
includeCauseInMessage = true
}
environments {
firefoxContainer {
driver = {
def networkId = findNetworkIdForName(containerNetwork)
BrowserWebDriverContainer webdriverContainer = addFirefoxContainerToNetwork(networkId)
webdriverContainer.start()
driver = webdriverContainer.getWebDriver()
driver
}
}
chromeContainer {
driver = {
def networkId = findNetworkIdForName(containerNetwork)
BrowserWebDriverContainer webdriverContainer = addFirefoxContainerToNetwork(networkId)
webdriverContainer.start()
driver = webdriverContainer.getWebDriver()
driver
}
}
chromeTablet {
driver = {
def driver = createChromeDriverInstance(webDriverExec)
driver.manage().window().setSize(new Dimension(1024, 768))
driver
}
}
chromePC {
driver = {
def driver = createChromeDriverInstance(webDriverExec)
driver.manage().window().setSize(new Dimension(1920, 1200))
driver
}
}
geckoPC {
driver = {
def driver = createGeckoDriverInstance(webDriverExec)
driver.manage().window().setSize(new Dimension(1920, 1200))
driver
}
}
geckoTablet {
driver = {
def driver = createGeckoDriverInstance(webDriverExec)
driver.manage().window().setSize(new Dimension(1024, 768))
driver
}
}
}
private def createGeckoDriverInstance(String webDriverExec) {
System.setProperty("webdriver.gecko.driver", webDriverExec)
FirefoxOptions options = new FirefoxOptions()
//options.setHeadless(true)
options.setLogLevel(FirefoxDriverLogLevel.ERROR)
driverInstance = new FirefoxDriver(options)
driverInstance
}
private def createChromeDriverInstance(String webDriverExec) {
System.setProperty("webdriver.chrome.driver", webDriverExec)
driverInstance = new ChromeDriver()
driverInstance
}
private BrowserWebDriverContainer addFirefoxContainerToNetwork(String networkId){
Network tcNet = createNetwork(networkId)
FirefoxOptions options = new FirefoxOptions()
options.setHeadless(true)
BrowserWebDriverContainer webdriverContainer = new BrowserWebDriverContainer<>()
.withCapabilities(options)
.withNetwork(tcNet)
return webdriverContainer
}
private BrowserWebDriverContainer addChromeContainerToNetwork(String networkId){
Network tcNet = createNetwork(networkId)
ChromeOptions options = new ChromeOptions()
options.setHeadless(true)
BrowserWebDriverContainer webdriverContainer = new BrowserWebDriverContainer<>()
.withCapabilities(options)
.withNetwork(tcNet)
return webdriverContainer
}
private String findNetworkIdForName(String name) {
def client = DockerClientFactory.instance().client()
def rv = client.inspectNetworkCmd().withNetworkId(name).exec().id
return rv
}
private createNetwork(networkId) {
Network tcNet = new Network() {
String getId() {
return networkId
}
void close() throws Exception {}
Statement apply(Statement base, Description description) {
return null
}
}
return tcNet
}
The plugin set the following system properties for the test:
|
Executable name for local drivers from the extension configuration. |
|
Network for the test containers framework. |
|
The url will be calculated from the base configuration of the web server image. If the container framework is used, the internal network name is used. |
Properties
Property | Type | Default value | Description |
---|---|---|---|
|
|
"firefoxContainer" |
Name of the configured in the Geb configuration file |
|
|
Container with local driver configurations. |
Properties
Property | Type | Default value | Description |
---|---|---|---|
|
|
Container with a configuration to download the necessary driver download. |
Properties
Property | Type | Default value | Description |
---|---|---|---|
|
|
Container with a configuration to download the necessary driver download. |
|
|
|
Container with a configuration to download the necessary driver download. |
|
|
|
Container with a configuration to download the necessary driver download. |
Task name | Class | Description |
---|---|---|
gebTest |
|
Starts the Geb Test form the gebTest source set. |
downloadDriver |
|
Downloads and unpack the configured local driver if necessary. |
Configuration properties file and Image Properties
It is possible to switch to a local driver for development purposes.
Task | Property Key | Property Value |
---|---|---|
|
|
The name of the local driver. |
|
The name of the local environment. |
|
For container configuration |
||
* |
|
The exposed http port of the webserver. Default: 808 |
|
The exposed https port of the webserver. Default: 8443 |
|
For local configuration |
||
* |
|
The hostname or the IP of the local machine. |
|
The exposed http port of the webserver. |
|
|
The exposed https port of the webserver. |
If the project includes SolrCloud as a search engine, this plugin provides some necessary tasks for the management of search indexes. It uses the same configuration as the ICM Docker plugin.
Task name | Class | Description |
---|---|---|
cleanUpSolr |
|
Removes all search configurations and collections with a specified prefix. |
listSolr |
|
List all search configurations and collections with a specified prefix. |
rebuildSearchIndex |
|
Starts an ICM job over the ICM Rest interface to rebuild all search indexes. |
Configuration properties file and Image Properties
Task | Property Key | Property Value |
---|---|---|
cleanUpSolr |
|
A list of all Zookeeper hosts with port and the Solr server prefix. |
|
A simple installation specific prefix for the Solr search configuration, e.g. the hostname. |
|
rebuildSearchIndex |
|
This is the ICM SMC admin user. Default: admin. |
|
This is the password of the SMC admin user. |
|
|
If no public SSL certificate is installed on the webserver, it is possible to disable the verification with the value |
|
* |
|
The hostname or the IP of the local machine. |
|
The exposed http port of the webserver. |
|
|
The exposed https port of the webserver. |
For the configuration on a special local machine it is necessary to provide an Intershop licence file and a
icm.properties
file in file structure. It is possible to configure the location with environment properties.
This is a minimum set of properties.
icm.properties
# database connection configuration
intershop.databaseType = mssql
intershop.jdbc.url = jdbc:sqlserver://host:1433;databaseName=dbname
intershop.jdbc.user = user
intershop.jdbc.password = password
# webserver configuration of the appserver
intershop.WebServerURL=http://host:8080
intershop.WebServerSecureURL=https://host:8443
# webserver configuration
webserver.http.port = 8080
webserver.https.port = 8443
# database container configuration
intershop.db.mssql.dbname = dbname
# server configuration
intershop.servletEngine.connector.port = 7743
# local host configuration
# this is not always 'localhost'.
intershop.local.hostname = 192.168.2.205
# solr configuration
solr.zooKeeperHostList = jengsolr1.intershop.de:2181;jengsolr2.intershop.de:2181;jengsolr3.intershop.de:2181/solr8
solr.clusterIndexPrefix = devhost
intershop.smc.admin.user.name = admin
intershop.smc.admin.user.password = password
# disable the ssl verification of the webserver
disable.ssl.verification = true
# geb.local.environment = chromePC
# geb.local.driver = chromeDriver
# Readiness probe during startAS-task
# number of seconds between requests to http://<hostname>:<port>/status/ReadinessProbe (optional, default=30)
#intershop.as.readinessProbe.interval = 30
# max. number of seconds between start of probing and finally given up assuming that the start failed
# (optional, default=6000)
#intershop.as.readinessProbe.timeout = 30
See here for details.
Copyright 2014-2020 Intershop Communications.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.