Redo merge to netci.groovy

This commit is contained in:
Nick Guerrera 2018-07-31 15:06:02 -07:00
parent d6d0130942
commit 6ebed76f95

View file

@ -19,7 +19,9 @@ def platformList = [
'Linux:arm64:Debug', 'Linux:arm64:Debug',
'Linux-musl:x64:Debug', 'Linux-musl:x64:Debug',
'Linux:x64:Release', 'Linux:x64:Release',
'opensuse.43.2:x64:Debug', 'Linux_NoSuffix:arm:Release',
'Linux_NoSuffix:x64:Release',
'opensuse.42.3:x64:Debug',
'OSX10.12:x64:Release', 'OSX10.12:x64:Release',
'RHEL6:x64:Debug', 'RHEL6:x64:Debug',
'RHEL7.2:x64:Release', 'RHEL7.2:x64:Release',
@ -28,7 +30,8 @@ def platformList = [
'ubuntu.18.04:x64:Debug', 'ubuntu.18.04:x64:Debug',
'Windows_NT:x64:Release', 'Windows_NT:x64:Release',
'Windows_NT:x86:Debug', 'Windows_NT:x86:Debug',
'Windows_NT_ES:x64:Debug' 'Windows_NT_ES:x64:Debug',
'Windows_NT_NoSuffix:x64:Release'
] ]
def static getBuildJobName(def configuration, def os, def architecture) { def static getBuildJobName(def configuration, def os, def architecture) {
@ -43,54 +46,66 @@ platformList.each { platform ->
// Calculate job name // Calculate job name
def jobName = getBuildJobName(configuration, os, architecture) def jobName = getBuildJobName(configuration, os, architecture)
def buildCommand = ''; def baseBatchBuildCommand = ".\\build.cmd -Configuration ${configuration} -Architecture ${architecture} -Targets Default";
def baseShellBuildCommand = "./build.sh --skip-prereqs --configuration ${configuration} --targets Default";
// Calculate the build command // Calculate the build command
if (os == 'Windows_NT') { if (os.startsWith("Windows_NT")) {
buildCommand = ".\\build.cmd -Configuration ${configuration} -Architecture ${architecture} -Targets Default"
}
else if (os == 'Windows_2016') {
buildCommand = ".\\build.cmd -Configuration ${configuration} -Architecture ${architecture} -RunInstallerTestsInDocker -Targets Default"
}
else if (os == 'Windows_NT_ES') {
osUsedForMachineAffinity = 'Windows_NT' osUsedForMachineAffinity = 'Windows_NT'
buildCommand = "${baseBatchBuildCommand}"
if (os == 'Windows_NT_ES') {
buildCommand = """ buildCommand = """
set DOTNET_CLI_UI_LANGUAGE=es set DOTNET_CLI_UI_LANGUAGE=es
.\\build.cmd -Configuration ${configuration} -Architecture ${architecture} -Targets Default ${buildCommand}
""" """
} }
else if (os == 'Ubuntu') { else if (os == 'Windows_NT_NoSuffix') {
buildCommand = "./build.sh --skip-prereqs --configuration ${configuration} --docker ubuntu.14.04 --targets Default" buildCommand = """
set DropSuffix=true
${buildCommand}
"""
} }
else if (os == 'Linux') { }
else if (os == 'Windows_2016') {
buildCommand = "${baseBatchBuildCommand} -RunInstallerTestsInDocker"
}
else if (os.startsWith("Linux")) {
osUsedForMachineAffinity = 'Ubuntu16.04'; osUsedForMachineAffinity = 'Ubuntu16.04';
if (os == 'Linux-musl') {
buildCommand = "${baseShellBuildCommand} --runtime-id linux-musl-x64 --docker alpine.3.6"
}
else
{
buildCommand = "${baseShellBuildCommand} --linux-portable"
if ((architecture == 'arm') || (architecture == 'arm64')) { if ((architecture == 'arm') || (architecture == 'arm64')) {
buildCommand = "./build.sh --linux-portable --skip-prereqs --architecture ${architecture} --configuration ${configuration} --targets Default /p:CLIBUILD_SKIP_TESTS=true" buildCommand = "${buildCommand} --architecture ${architecture} /p:CLIBUILD_SKIP_TESTS=true"
} }
else { if (os == 'Linux_NoSuffix') {
buildCommand = "./build.sh --linux-portable --skip-prereqs --configuration ${configuration} --targets Default" buildCommand = """
export DropSuffix=true
${buildCommand}
"""
} }
} }
}
else if (os == 'Ubuntu') {
buildCommand = "${baseShellBuildCommand} --docker ubuntu.14.04"
}
else if (os == 'RHEL6') { else if (os == 'RHEL6') {
osUsedForMachineAffinity = 'Ubuntu16.04'; osUsedForMachineAffinity = 'Ubuntu16.04';
buildCommand = "./build.sh --skip-prereqs --configuration ${configuration} --runtime-id rhel.6-x64 --docker rhel.6 --targets Default" buildCommand = "${baseShellBuildCommand} --runtime-id rhel.6-x64 --docker rhel.6"
} }
else if (os == 'Linux-musl') { else if (os == 'ubuntu.18.04' || os == 'fedora.27' || os == 'opensuse.42.3') {
osUsedForMachineAffinity = 'Ubuntu16.04';
buildCommand = "./build.sh --skip-prereqs --configuration ${configuration} --runtime-id linux-musl-x64 --docker alpine.3.6 --targets Default"
}
else if (os == 'ubuntu.18.04' || os == 'fedora.27' || os == 'opensuse.43.2') {
osUsedForMachineAffinity = 'Ubuntu16.04' osUsedForMachineAffinity = 'Ubuntu16.04'
osVersionUsedForMachineAffinity = 'latest-docker' osVersionUsedForMachineAffinity = 'latest-docker'
buildCommand = "./build.sh --linux-portable --skip-prereqs --configuration ${configuration} --docker ${os} --targets Default" buildCommand = "${baseShellBuildCommand} --docker ${os} --linux-portable"
} }
else if (os == 'AllLinux') { else if (os == 'AllLinux') {
osUsedForMachineAffinity = 'Ubuntu16.04' osUsedForMachineAffinity = 'Ubuntu16.04'
buildCommand = "./build.sh --skip-prereqs --configuration ${configuration} --targets Default /t:BuildAndPublishAllLinuxDistrosNativeInstallers" buildCommand = "{baseShellBuildCommand} --skip-prereqs --configuration ${configuration} --targets Default /t:BuildAndPublishAllLinuxDistrosNativeInstallers"
} }
else { else {
// Jenkins non-Ubuntu CI machines don't have docker buildCommand = "${baseShellBuildCommand}"
buildCommand = "./build.sh --skip-prereqs --configuration ${configuration} --targets Default"
} }
def newJob = job(Utilities.getFullJobName(project, jobName, isPR)) { def newJob = job(Utilities.getFullJobName(project, jobName, isPR)) {