Commit c8fb1a7d authored by Andrew Nicols's avatar Andrew Nicols

wip

parent 44793dbf
......@@ -15,76 +15,74 @@ def getDefaultRunCombinations(branch) {
return combinations;
}
def runJob(
def getHighestSupportedVersion(branch) {
return branch[branch.size() - 1]
}
def getLowestSupportedVersion(branch) {
return branch[0]
}
def runTask(
String task,
String repo,
String branch,
combinations,
String phpversion,
String database,
Boolean notify,
Boolean publish
) {
def builders = [:]
for (int i = 0; i < combinations.size(); i++) {
def combination = combinations[i]
def label = "${task}: PHP ${combination.php}/${combination.db}"
builders[label] = {
node('docker') {
stage("Git ${label}") {
checkout(
node('docker') {
stage("Git Checkout") {
checkout(
[
$class: 'GitSCM',
branches: [
[
$class: 'GitSCM',
branches: [
[
name: "*/${branch}"
]
],
doGenerateSubmoduleConfigurations: false,
extensions: [
[
$class: 'CloneOption',
depth: 0,
noTags: false,
reference: "${env.HOME}/cache/integration.git",
shallow: false
],
[
$class: 'RelativeTargetDirectory',
relativeTargetDir: 'moodle'
]
],
submoduleCfg: [],
userRemoteConfigs: [
[
url: "${repo}"
]
]
name: "*/${branch}"
]
)
}
stage("Run ${label}") {
withEnv([
"PHP_VERSION=${ combination.php}",
"DBTYPE=${combination.db}",
"TASK=${task}"
]) {
sh '$HOME/scripts/runner/master/run.sh'
}
junit allowEmptyResults: true, testResults: '$BUILD_ID/*.junit/*.xml,$BUILD_ID/*.junit'
archiveArtifacts allowEmptyArchive: true, artifacts: '$BUILD_ID/**'
],
doGenerateSubmoduleConfigurations: false,
extensions: [
[
$class: 'CloneOption',
depth: 0,
noTags: false,
reference: "${env.HOME}/cache/integration.git",
shallow: false
],
[
$class: 'RelativeTargetDirectory',
relativeTargetDir: 'moodle'
]
],
submoduleCfg: [],
userRemoteConfigs: [
[
url: "${repo}"
]
]
]
)
}
cleanWs deleteDirs: true, notFailBuild: true
}
stage("Run ${task}") {
withEnv([
"PHP_VERSION=${phpversion}",
"DBTYPE=${database}",
"TASK=${task}"
]) {
sh '$HOME/scripts/runner/master/run.sh'
}
}
}
parallel builders
stage("Post") {
junit allowEmptyResults: true, testResults: '$BUILD_ID/*.junit/*.xml,$BUILD_ID/*.junit'
archiveArtifacts allowEmptyArchive: true, artifacts: '$BUILD_ID/**'
cleanWs deleteDirs: true, notFailBuild: true
}
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment