From f8823769337d862437b56c52fb25584e2985fe95 Mon Sep 17 00:00:00 2001 From: John Beisner Date: Thu, 21 Jun 2018 12:00:28 -0700 Subject: [PATCH 1/2] Adding 'NoSuffix' legs to the CI (#9502) * Adding 'NoSuffix' legs to the CI * Fixing typo... * Updates per code review... * "openSUSE 43.2" should be "openSUSE 42.3"; fixing 'netci.groovy' command formation logic. --- build/BuildDefaults.props | 4 +- netci.groovy | 79 +++++++++++-------- .../Dockerfile | 0 3 files changed, 46 insertions(+), 37 deletions(-) rename scripts/docker/{opensuse.43.2 => opensuse.42.3}/Dockerfile (100%) diff --git a/build/BuildDefaults.props b/build/BuildDefaults.props index eb114a390..d574b1789 100644 --- a/build/BuildDefaults.props +++ b/build/BuildDefaults.props @@ -10,7 +10,7 @@ ($(Rid.StartsWith('rhel.6')) OR $(Rid.StartsWith('linux-musl')) OR $(Rid.StartsWith('fedora.27')) - OR $(Rid.StartsWith('opensuse.43.2')) + OR $(Rid.StartsWith('opensuse.42.3')) OR $(Rid.StartsWith('ubuntu.18.04')))">true false true @@ -19,7 +19,7 @@ AND '$(Rid)' != 'rhel.6-x64' AND '$(Rid)' != 'linux-musl-x64' AND '$(Rid)' != 'fedora.27-x64' - AND '$(Rid)' != 'opensuse.43.2-x64' + AND '$(Rid)' != 'opensuse.42.3-x64' AND '$(Rid)' != 'ubuntu.18.04-x64'">true true diff --git a/netci.groovy b/netci.groovy index c2283cd23..9b9ce5d4f 100644 --- a/netci.groovy +++ b/netci.groovy @@ -18,7 +18,9 @@ def platformList = [ 'Linux:arm64:Debug', 'Linux-musl:x64:Debug', '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', 'RHEL6:x64:Debug', 'RHEL7.2:x64:Release', @@ -27,7 +29,8 @@ def platformList = [ 'ubuntu.18.04:x64:Debug', 'Windows_NT:x64:Release', '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) { @@ -42,50 +45,56 @@ platformList.each { platform -> // Calculate job name 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 - if (os == 'Windows_NT') { - buildCommand = ".\\build.cmd -Configuration ${configuration} -Architecture ${architecture} -Targets Default" + if (os.startsWith("Windows_NT")) { + osUsedForMachineAffinity = 'Windows_NT' + buildCommand = "${baseBatchBuildCommand}" + if (os == 'Windows_NT_ES') { + buildCommand = """ +set DOTNET_CLI_UI_LANGUAGE=es +${buildCommand} +""" + } + else if (os == 'Windows_NT_NoSuffix') { + buildCommand = "${buildCommand} /p:DropSuffix=true" + } } else if (os == 'Windows_2016') { - buildCommand = ".\\build.cmd -Configuration ${configuration} -Architecture ${architecture} -RunInstallerTestsInDocker -Targets Default" + buildCommand = "${baseBatchBuildCommand} -RunInstallerTestsInDocker" } - else if (os == 'Windows_NT_ES') { - osUsedForMachineAffinity = 'Windows_NT' - buildCommand = """ -set DOTNET_CLI_UI_LANGUAGE=es -.\\build.cmd -Configuration ${configuration} -Architecture ${architecture} -Targets Default -""" + else if (os.startsWith("Linux")) { + osUsedForMachineAffinity = 'Ubuntu16.04'; + if (os == 'Linux-musl') { + buildCommand = "${buildCommand} --runtime-id linux-musl-x64 --docker alpine.3.6" + } + else + { + buildCommand = "${baseShellBuildCommand} --linux-portable" + if ((architecture == 'arm') || (architecture == 'arm64')) { + buildCommand = "${buildCommand} --architecture ${architecture} /p:CLIBUILD_SKIP_TESTS=true" + } + if (os == 'Linux_NoSuffix') { + buildCommand = "${buildCommand} /p:DropSuffix=true" + } + } } else if (os == 'Ubuntu') { - buildCommand = "./build.sh --skip-prereqs --configuration ${configuration} --docker ubuntu.14.04 --targets Default" - } - else if (os == 'Linux') { - osUsedForMachineAffinity = 'Ubuntu16.04'; - if ((architecture == 'arm') || (architecture == 'arm64')) { - buildCommand = "./build.sh --linux-portable --skip-prereqs --architecture ${architecture} --configuration ${configuration} --targets Default /p:CLIBUILD_SKIP_TESTS=true" - } - else { - buildCommand = "./build.sh --linux-portable --skip-prereqs --configuration ${configuration} --targets Default" - } + buildCommand = "${baseShellBuildCommand} --docker ubuntu.14.04" } else if (os == 'RHEL6') { 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') { - 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') { + else if (os == 'ubuntu.18.04' || os == 'fedora.27' || os == 'opensuse.42.3') { osUsedForMachineAffinity = 'Ubuntu16.04' osVersionUsedForMachineAffinity = 'latest-docker' - buildCommand = "./build.sh --linux-portable --skip-prereqs --configuration ${configuration} --docker ${os} --targets Default" + buildCommand = "${baseShellBuildCommand} --docker ${os} --linux-portable" } else { - // Jenkins non-Ubuntu CI machines don't have docker - buildCommand = "./build.sh --skip-prereqs --configuration ${configuration} --targets Default" + buildCommand = "${baseShellBuildCommand}" } def newJob = job(Utilities.getFullJobName(project, jobName, isPR)) { @@ -110,10 +119,10 @@ set DOTNET_CLI_UI_LANGUAGE=es } Utilities.addGithubPRTriggerForBranch(newJob, branch, "${os} ${architecture} ${configuration} Build") - def archiveSettings = new ArchivalSettings() - archiveSettings.addFiles("test/**/*.trx") - archiveSettings.setFailIfNothingArchived() - archiveSettings.setArchiveOnFailure() + def archiveSettings = new ArchivalSettings() + archiveSettings.addFiles("test/**/*.trx") + archiveSettings.setFailIfNothingArchived() + archiveSettings.setArchiveOnFailure() Utilities.addArchival(newJob, archiveSettings) } diff --git a/scripts/docker/opensuse.43.2/Dockerfile b/scripts/docker/opensuse.42.3/Dockerfile similarity index 100% rename from scripts/docker/opensuse.43.2/Dockerfile rename to scripts/docker/opensuse.42.3/Dockerfile From dc2443ca74e30c5cf255e20d3382447c31879bf9 Mon Sep 17 00:00:00 2001 From: John Beisner Date: Fri, 22 Jun 2018 13:45:53 -0700 Subject: [PATCH 2/2] Fix the CI legs; CLI:release/2.1.3xx (#9535) * Linux-musl command should be derived from "baseShellBuildCommand" not "buildCommand"; setting 'DropSuffix' in the environment. --- netci.groovy | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/netci.groovy b/netci.groovy index 9b9ce5d4f..3d49daada 100644 --- a/netci.groovy +++ b/netci.groovy @@ -59,7 +59,10 @@ ${buildCommand} """ } else if (os == 'Windows_NT_NoSuffix') { - buildCommand = "${buildCommand} /p:DropSuffix=true" + buildCommand = """ +set DropSuffix=true +${buildCommand} +""" } } else if (os == 'Windows_2016') { @@ -68,7 +71,7 @@ ${buildCommand} else if (os.startsWith("Linux")) { osUsedForMachineAffinity = 'Ubuntu16.04'; if (os == 'Linux-musl') { - buildCommand = "${buildCommand} --runtime-id linux-musl-x64 --docker alpine.3.6" + buildCommand = "${baseShellBuildCommand} --runtime-id linux-musl-x64 --docker alpine.3.6" } else { @@ -77,7 +80,10 @@ ${buildCommand} buildCommand = "${buildCommand} --architecture ${architecture} /p:CLIBUILD_SKIP_TESTS=true" } if (os == 'Linux_NoSuffix') { - buildCommand = "${buildCommand} /p:DropSuffix=true" + buildCommand = """ +export DropSuffix=true +${buildCommand} +""" } } }