Skip to content
Snippets Groups Projects
Commit a1aa23ff authored by Vincent Massol's avatar Vincent Massol
Browse files

Revert "[Misc] Parallelize execution of docker-based tests"

This reverts commit 9561115e.
parent eccb5a1c
No related branches found
No related tags found
No related merge requests found
......@@ -141,12 +141,12 @@ if (!params.type || params.type == 'standard') {
buildDocker(params.type)
}
private void buildStandardSingle(build)
def buildStandardSingle(build)
{
build.call()
}
private void buildStandardAll(builds)
def buildStandardAll(builds)
{
parallel(
'main': {
......@@ -222,39 +222,58 @@ private void buildStandardAll(builds)
)
}
private void buildDocker(type)
def buildDocker(type)
{
def dockerConfigurations = dockerConfigurations(type)
def customJobProperties = getCustomJobProperties()
node('docker') {
// Build xwiki-platform-docker test framework since we use it and we happen to make changes to it often and thus
// if we don't build it here, we have to wait for the full xwiki-platform to be built before being able to run
// the docker tests again. It can also lead to build failures since this method is called during scheduled jobs
// which could be triggered before xwiki-platform-docker has been rebuilt.
buildInsideNode(
name: 'Docker Test Framework',
profiles: 'docker,integration-tests',
mavenFlags: '--projects org.xwiki.platform:xwiki-platform-test-docker -U -e',
xvnc: false,
goals: 'clean install',
skipMail: true
)
def dockerModuleList
if (type == 'docker-unsupported') {
dockerModules = 'xwiki-platform-core/xwiki-platform-menu'
} else {
// Checkout platform to find all docker test modules so that we can then parallelize executions of configs and
// modules across Jenkins agents.
node() {
checkout skipChangeLog: true, scm: scm
dockerModuleList = dockerModules()
}
}
// Build the minimal war module to make sure we have the latest dependencies present in the local maven repo
// before we run the docker tests. By default the Docker-based tests resolve the minimal war deps from the local
// repo only without going online.
// Note 1: skipCheckout is true since the previous build will have checked out xwiki-platform
// Note 2: Since the previous build will have checked out xwiki-platform, we need to set the current dir inside the
// checkout for the build.
buildInsideNode(
name: 'Minimal WAR Dependencies',
mavenFlags: '--projects org.xwiki.platform:xwiki-platform-minimaldependencies -U -e',
skipCheckout: true,
xvnc: false,
goals: 'clean install',
skipMail: true
)
xwikiDockerBuild {
configurations = dockerConfigurations
modules = dockerModuleList
// Make sure that we don't reset the job properties!
jobProperties = customJobProperties
def dockerConfigurations = dockerConfigurations(type)
def customJobProperties = getCustomJobProperties()
xwikiDockerBuild {
configurations = dockerConfigurations
if (type == 'docker-unsupported') {
modules = 'xwiki-platform-core/xwiki-platform-menu'
}
// Make sure that we don't reset the job properties!
jobProperties = customJobProperties
}
}
}
private void build(map)
def build(map)
{
node(map.node ?: '') {
buildInsideNode(map)
}
}
private void buildInsideNode(map)
def buildInsideNode(map)
{
// We want to get a memory dump on OOM errors.
// Make sure the memory dump directory exists (see below)
......@@ -305,7 +324,7 @@ private void buildInsideNode(map)
}
}
private void buildFunctionalTest(map)
def buildFunctionalTest(map)
{
def sharedPOMPrefix =
'xwiki-platform-distribution/xwiki-platform-distribution-flavor/xwiki-platform-distribution-flavor-test'
......@@ -319,7 +338,7 @@ private void buildFunctionalTest(map)
)
}
private def getCustomJobProperties()
def getCustomJobProperties()
{
// Define a scheduler job to execute the Docker-based functional tests at regular intervals. We do this since they
// take time to execute and thus we cannot run them all the time.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment