Broke apart CI into more jobs
This commit is contained in:
Родитель
c1f5dc027d
Коммит
ca2c088832
28
netci.groovy
28
netci.groovy
|
@ -4,24 +4,28 @@ def project = GithubProject
|
||||||
def branch = GithubBranchName
|
def branch = GithubBranchName
|
||||||
def isPR = true
|
def isPR = true
|
||||||
def platformList = ['Ubuntu16.04:Debian', 'Windows_2016:NanoServer']
|
def platformList = ['Ubuntu16.04:Debian', 'Windows_2016:NanoServer']
|
||||||
|
def versionList = ['1.0', '1.1', '2.0']
|
||||||
|
|
||||||
platformList.each { platform ->
|
platformList.each { platform ->
|
||||||
def(hostOS, containerOS) = platform.tokenize(':')
|
def(hostOS, containerOS) = platform.tokenize(':')
|
||||||
def newJobName = Utilities.getFullJobName(project, containerOS, isPR)
|
|
||||||
def machineLabel = (hostOS == 'Windows_2016') ? 'latest-containers' : 'latest-or-auto-docker'
|
def machineLabel = (hostOS == 'Windows_2016') ? 'latest-containers' : 'latest-or-auto-docker'
|
||||||
|
|
||||||
def newJob = job(newJobName) {
|
versionList.each { version ->
|
||||||
steps {
|
def newJobName = Utilities.getFullJobName(project, "${containerOS}_${version}", isPR)
|
||||||
if (hostOS == 'Windows_2016') {
|
|
||||||
batchFile("powershell -NoProfile -Command .\\build-and-test.ps1")
|
def newJob = job(newJobName) {
|
||||||
}
|
steps {
|
||||||
else {
|
if (hostOS == 'Windows_2016') {
|
||||||
shell("docker build --rm -t testrunner -f ./test/Dockerfile.linux.testrunner . && docker run -v /var/run/docker.sock:/var/run/docker.sock testrunner powershell -File build-and-test.ps1")
|
batchFile("powershell -NoProfile -Command .\\build-and-test.ps1 -Filter ${version}")
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
shell("docker build --rm -t testrunner -f ./test/Dockerfile.linux.testrunner . && docker run -v /var/run/docker.sock:/var/run/docker.sock testrunner powershell -File build-and-test.ps1 -Filter ${version}")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
Utilities.setMachineAffinity(newJob, hostOS, machineLabel)
|
Utilities.setMachineAffinity(newJob, hostOS, machineLabel)
|
||||||
Utilities.standardJobSetup(newJob, project, isPR, "*/${branch}")
|
Utilities.standardJobSetup(newJob, project, isPR, "*/${branch}")
|
||||||
Utilities.addGithubPRTriggerForBranch(newJob, branch, containerOS)
|
Utilities.addGithubPRTriggerForBranch(newJob, branch, "${containerOS} - ${version} Dockerfiles")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче