Addressing code review comments and adding opensuse 13.2

This commit is contained in:
Livar Cunha 2016-05-31 13:54:35 -07:00
parent 5174fc06bd
commit 7652335195
54 changed files with 186 additions and 54 deletions

View file

@ -56,7 +56,14 @@ Publish\ the\ application\ for\ a\ given\ runtime.\ If\ the\ option\ is\ not\ sp
\ \ \ \ *\ ubuntu.14.04\-x64
\ \ \ \ *\ ubuntu.16.04\-x64
\ \ \ \ *\ win7\-x64
\ \ \ \ *\ win7\-x86
\ \ \ \ *\ osx.10.10\-x64
\ \ \ \ *\ osx.10.11\-x64
\ \ \ \ *\ centos.7\-x64
\ \ \ \ *\ rhel.7.2\-x64
\ \ \ \ *\ debian.8\-x64
\ \ \ \ *\ fedora.23\-x64
\ \ \ \ *\ opensuse.13.2\-x64
\f[]
.fi
.PP

View file

@ -19,6 +19,7 @@
"centos.7-x64": {},
"rhel.7.2-x64": {},
"debian.8-x64": {},
"fedora.23-x64": {}
"fedora.23-x64": {},
"opensuse.13.2-x64": {}
}
}

View file

@ -19,6 +19,7 @@
"centos.7-x64": {},
"rhel.7.2-x64": {},
"debian.8-x64": {},
"fedora.23-x64": {}
"fedora.23-x64": {},
"opensuse.13.2-x64": {}
}
}

View file

@ -19,7 +19,8 @@
"centos.7-x64": {},
"rhel.7.2-x64": {},
"debian.8-x64": {},
"fedora.23-x64": {}
"fedora.23-x64": {},
"opensuse.13.2-x64": {}
},
"tools": {
"dotnet-portable": {

View file

@ -23,7 +23,8 @@
"centos.7-x64": {},
"rhel.7.2-x64": {},
"debian.8-x64": {},
"fedora.23-x64": {}
"fedora.23-x64": {},
"opensuse.13.2-x64": {}
},
"tools": {
"dotnet-portable": {

View file

@ -23,6 +23,7 @@
"centos.7-x64": {},
"rhel.7.2-x64": {},
"debian.8-x64": {},
"fedora.23-x64": {}
"fedora.23-x64": {},
"opensuse.13.2-x64": {}
}
}

View file

@ -19,6 +19,7 @@
"centos.7-x64": {},
"rhel.7.2-x64": {},
"debian.8-x64": {},
"fedora.23-x64": {}
"fedora.23-x64": {},
"opensuse.13.2-x64": {}
}
}

View file

@ -25,6 +25,7 @@
"centos.7-x64": {},
"rhel.7.2-x64": {},
"debian.8-x64": {},
"fedora.23-x64": {}
"fedora.23-x64": {},
"opensuse.13.2-x64": {}
}
}

View file

@ -19,6 +19,7 @@
"centos.7-x64": {},
"rhel.7.2-x64": {},
"debian.8-x64": {},
"fedora.23-x64": {}
"fedora.23-x64": {},
"opensuse.13.2-x64": {}
}
}

View file

@ -23,6 +23,7 @@
"centos.7-x64": {},
"rhel.7.2-x64": {},
"debian.8-x64": {},
"fedora.23-x64": {}
"fedora.23-x64": {},
"opensuse.13.2-x64": {}
}
}

View file

@ -26,6 +26,7 @@
"centos.7-x64": {},
"rhel.7.2-x64": {},
"debian.8-x64": {},
"fedora.23-x64": {}
"fedora.23-x64": {},
"opensuse.13.2-x64": {}
}
}

View file

@ -25,6 +25,7 @@
"centos.7-x64": {},
"rhel.7.2-x64": {},
"debian.8-x64": {},
"fedora.23-x64": {}
"fedora.23-x64": {},
"opensuse.13.2-x64": {}
}
}

View file

@ -38,6 +38,7 @@
"centos.7-x64": {},
"rhel.7.2-x64": {},
"debian.8-x64": {},
"fedora.23-x64": {}
"fedora.23-x64": {},
"opensuse.13.2-x64": {}
}
}

View file

@ -41,6 +41,7 @@
"centos.7-x64": {},
"rhel.7.2-x64": {},
"debian.8-x64": {},
"fedora.23-x64": {}
"fedora.23-x64": {},
"opensuse.13.2-x64": {}
}
}

View file

@ -42,6 +42,7 @@
"centos.7-x64": {},
"rhel.7.2-x64": {},
"debian.8-x64": {},
"fedora.23-x64": {}
"fedora.23-x64": {},
"opensuse.13.2-x64": {}
}
}

View file

@ -38,6 +38,7 @@
"centos.7-x64": {},
"rhel.7.2-x64": {},
"debian.8-x64": {},
"fedora.23-x64": {}
"fedora.23-x64": {},
"opensuse.13.2-x64": {}
}
}

View file

@ -34,6 +34,7 @@
"centos.7-x64": {},
"rhel.7.2-x64": {},
"debian.8-x64": {},
"fedora.23-x64": {}
"fedora.23-x64": {},
"opensuse.13.2-x64": {}
}
}

View file

@ -19,6 +19,7 @@
"centos.7-x64": {},
"rhel.7.2-x64": {},
"debian.8-x64": {},
"fedora.23-x64": {}
"fedora.23-x64": {},
"opensuse.13.2-x64": {}
}
}

View file

@ -19,7 +19,8 @@
"centos.7-x64": {},
"rhel.7.2-x64": {},
"debian.8-x64": {},
"fedora.23-x64": {}
"fedora.23-x64": {},
"opensuse.13.2-x64": {}
},
"runtimeOptions": {
"somethingString": "anything",

View file

@ -21,6 +21,7 @@
"centos.7-x64": {},
"rhel.7.2-x64": {},
"debian.8-x64": {},
"fedora.23-x64": {}
"fedora.23-x64": {},
"opensuse.13.2-x64": {}
}
}

View file

@ -19,6 +19,7 @@
"centos.7-x64": {},
"rhel.7.2-x64": {},
"debian.8-x64": {},
"fedora.23-x64": {}
"fedora.23-x64": {},
"opensuse.13.2-x64": {}
}
}

View file

@ -19,6 +19,7 @@
"centos.7-x64": {},
"rhel.7.2-x64": {},
"debian.8-x64": {},
"fedora.23-x64": {}
"fedora.23-x64": {},
"opensuse.13.2-x64": {}
}
}

View file

@ -26,6 +26,7 @@
"centos.7-x64": {},
"rhel.7.2-x64": {},
"debian.8-x64": {},
"fedora.23-x64": {}
"fedora.23-x64": {},
"opensuse.13.2-x64": {}
}
}

View file

@ -25,6 +25,7 @@
"centos.7-x64": {},
"rhel.7.2-x64": {},
"debian.8-x64": {},
"fedora.23-x64": {}
"fedora.23-x64": {},
"opensuse.13.2-x64": {}
}
}

View file

@ -24,6 +24,7 @@
"centos.7-x64": {},
"rhel.7.2-x64": {},
"debian.8-x64": {},
"fedora.23-x64": {}
"fedora.23-x64": {},
"opensuse.13.2-x64": {}
}
}

View file

@ -30,6 +30,7 @@
"centos.7-x64": {},
"rhel.7.2-x64": {},
"debian.8-x64": {},
"fedora.23-x64": {}
"fedora.23-x64": {},
"opensuse.13.2-x64": {}
}
}

View file

@ -19,7 +19,8 @@
"centos.7-x64": {},
"rhel.7.2-x64": {},
"debian.8-x64": {},
"fedora.23-x64": {}
"fedora.23-x64": {},
"opensuse.13.2-x64": {}
},
"scripts": {
"prepublish": [

View file

@ -24,7 +24,8 @@
"centos.7-x64": {},
"rhel.7.2-x64": {},
"debian.8-x64": {},
"fedora.23-x64": {}
"fedora.23-x64": {},
"opensuse.13.2-x64": {}
},
"scripts": {
"prepublish": [

View file

@ -23,6 +23,7 @@
"centos.7-x64": {},
"rhel.7.2-x64": {},
"debian.8-x64": {},
"fedora.23-x64": {}
"fedora.23-x64": {},
"opensuse.13.2-x64": {}
}
}

View file

@ -19,6 +19,7 @@
"centos.7-x64": {},
"rhel.7.2-x64": {},
"debian.8-x64": {},
"fedora.23-x64": {}
"fedora.23-x64": {},
"opensuse.13.2-x64": {}
}
}

View file

@ -24,6 +24,7 @@
"centos.7-x64": {},
"rhel.7.2-x64": {},
"debian.8-x64": {},
"fedora.23-x64": {}
"fedora.23-x64": {},
"opensuse.13.2-x64": {}
}
}

View file

@ -24,6 +24,7 @@
"centos.7-x64": {},
"rhel.7.2-x64": {},
"debian.8-x64": {},
"fedora.23-x64": {}
"fedora.23-x64": {},
"opensuse.13.2-x64": {}
}
}

View file

@ -29,6 +29,7 @@
"centos.7-x64": {},
"rhel.7.2-x64": {},
"debian.8-x64": {},
"fedora.23-x64": {}
"fedora.23-x64": {},
"opensuse.13.2-x64": {}
}
}

View file

@ -23,6 +23,7 @@
"centos.7-x64": {},
"rhel.7.2-x64": {},
"debian.8-x64": {},
"fedora.23-x64": {}
"fedora.23-x64": {},
"opensuse.13.2-x64": {}
}
}

View file

@ -21,6 +21,7 @@
"centos.7-x64": {},
"rhel.7.2-x64": {},
"debian.8-x64": {},
"fedora.23-x64": {}
"fedora.23-x64": {},
"opensuse.13.2-x64": {}
}
}

View file

@ -19,6 +19,7 @@
"centos.7-x64": {},
"rhel.7.2-x64": {},
"debian.8-x64": {},
"fedora.23-x64": {}
"fedora.23-x64": {},
"opensuse.13.2-x64": {}
}
}

View file

@ -19,6 +19,7 @@
"centos.7-x64": {},
"rhel.7.2-x64": {},
"debian.8-x64": {},
"fedora.23-x64": {}
"fedora.23-x64": {},
"opensuse.13.2-x64": {}
}
}

View file

@ -20,6 +20,7 @@
"centos.7-x64": {},
"rhel.7.2-x64": {},
"debian.8-x64": {},
"fedora.23-x64": {}
"fedora.23-x64": {},
"opensuse.13.2-x64": {}
}
}

View file

@ -23,6 +23,7 @@
"centos.7-x64": {},
"rhel.7.2-x64": {},
"debian.8-x64": {},
"fedora.23-x64": {}
"fedora.23-x64": {},
"opensuse.13.2-x64": {}
}
}

View file

@ -23,6 +23,7 @@
"centos.7-x64": {},
"rhel.7.2-x64": {},
"debian.8-x64": {},
"fedora.23-x64": {}
"fedora.23-x64": {},
"opensuse.13.2-x64": {}
}
}

View file

@ -66,6 +66,15 @@ namespace Microsoft.DotNet.Cli.Build.Framework
}
}
public static bool IsOpenSuse
{
get
{
var osname = RuntimeEnvironment.OperatingSystem;
return string.Equals(osname, "opensuse", StringComparison.OrdinalIgnoreCase);
}
}
public static bool IsUnix
{
get
@ -87,7 +96,7 @@ namespace Microsoft.DotNet.Cli.Build.Framework
{
get
{
return IsUbuntu || IsCentOS || IsRHEL || IsDebian || IsFedora;
return IsUbuntu || IsCentOS || IsRHEL || IsDebian || IsFedora || IsOpenSuse;
}
}
@ -114,6 +123,8 @@ namespace Microsoft.DotNet.Cli.Build.Framework
return IsDebian;
case BuildPlatform.Fedora:
return IsFedora;
case BuildPlatform.OpenSuse:
return IsOpenSuse;
case BuildPlatform.Unix:
return IsUnix;
case BuildPlatform.Linux:
@ -158,6 +169,10 @@ namespace Microsoft.DotNet.Cli.Build.Framework
{
return BuildPlatform.Fedora;
}
else if (IsOpenSuse)
{
return BuildPlatform.OpenSuse;
}
else
{
return default(BuildPlatform);

View file

@ -10,6 +10,7 @@ namespace Microsoft.DotNet.Cli.Build.Framework
CentOS = 6,
RHEL = 7,
Debian = 8,
Fedora = 9
Fedora = 9,
OpenSuse = 10
}
}

View file

@ -50,7 +50,8 @@ namespace Microsoft.DotNet.Cli.Build
{ "rhel.7-x64", "rhel.7-x64" },
{ "rhel.7.2-x64", "rhel.7-x64" },
{ "debian.8-x64", "debian.8-x64" },
{ "fedora.23-x64", "fedora.23-x64" }
{ "fedora.23-x64", "fedora.23-x64" },
{ "opensuse.13.2-x64", "opensuse.13.2-x64" }
};
public const string SharedFrameworkName = "Microsoft.NETCore.App";

View file

@ -105,7 +105,8 @@ namespace Microsoft.DotNet.Cli.Build
"osx.x64.version",
"debian.x64.version",
"centos.x64.version",
"fedora.23.x64.version"
"fedora.23.x64.version",
"opensuse.13.2.x64.version"
};
string cliVersion = Utils.GetCliVersionFileContent(c);
@ -148,12 +149,13 @@ namespace Microsoft.DotNet.Cli.Build
{ "OSX_x64", false },
{ "Debian_x64", false },
{ "CentOS_x64", false },
{ "Fedora_23_x64", false }
{ "Fedora_23_x64", false },
{ "openSUSE_13_2_x64", false }
};
List<string> blobs = new List<string>(AzurePublisherTool.ListBlobs($"{Channel}/Binaries/{CliNuGetVersion}/"));
var versionBadgeName = $"{CurrentPlatform.Current}_{CurrentArchitecture.Current}";
var versionBadgeName = $"{Monikers.GetBadgeMoniker()}";
if (badges.ContainsKey(versionBadgeName) == false)
{
throw new ArgumentException("A new OS build was added without adding the moniker to the {nameof(badges)} lookup");

View file

@ -83,7 +83,7 @@ namespace Microsoft.DotNet.Cli.Build
CleanNuGetTempCache();
var dotnet = DotNetCli.Stage2;
dotnet.Restore("--verbosity", "verbose", "--disable-parallel")
dotnet.Restore("--verbosity", "verbose")
.WorkingDirectory(Path.Combine(c.BuildContext.BuildDirectory, "TestAssets", "TestPackages"))
.Execute()
.EnsureSuccessful();
@ -101,7 +101,7 @@ namespace Microsoft.DotNet.Cli.Build
var dotnet = DotNetCli.Stage2;
dotnet.Restore(
"--verbosity", "verbose", "--disable-parallel",
"--verbosity", "verbose",
"--fallbacksource", Dirs.TestPackages)
.WorkingDirectory(Path.Combine(c.BuildContext.BuildDirectory, "TestAssets", "TestProjects"))
.Execute()

View file

@ -38,6 +38,7 @@
"centos.7-x64": {},
"rhel.7.2-x64": {},
"debian.8-x64": {},
"fedora.23-x64": {}
"fedora.23-x64": {},
"opensuse.13.2-x64": {}
}
}

View file

@ -110,6 +110,10 @@ namespace Microsoft.DotNet.Cli.Build
{
rid = $"fedora.{RuntimeEnvironment.OperatingSystemVersion}-x64";
}
else if (CurrentPlatform.IsOpenSuse)
{
rid = $"opensuse.{RuntimeEnvironment.OperatingSystemVersion}-x64";
}
return rid;
}

View file

@ -35,6 +35,7 @@
"centos.7-x64": {},
"rhel.7.2-x64": {},
"debian.8-x64": {},
"fedora.23-x64": {}
"fedora.23-x64": {},
"opensuse.13.2-x64": {}
}
}

View file

@ -9,7 +9,7 @@ def project = GithubProject
def branch = GithubBranchName
def isPR = true
def platformList = ['Debian8.2:x64:Debug', 'Ubuntu:x64:Release', 'Ubuntu16.04:x64:Release', 'OSX:x64:Release', 'Windows_NT:x64:Release', 'Windows_NT:x86:Debug', 'RHEL7.2:x64:Release', 'CentOS7.1:x64:Debug', 'Fedora23:x64:Debug']
def platformList = ['Debian8.2:x64:Debug', 'Ubuntu:x64:Release', 'Ubuntu16.04:x64:Debug', 'OSX:x64:Release', 'Windows_NT:x64:Release', 'Windows_NT:x86:Debug', 'RHEL7.2:x64:Release', 'CentOS7.1:x64:Debug', 'Fedora23:x64:Debug', 'openSUSE13.2:x64:Debug']
def static getBuildJobName(def configuration, def os, def architecture) {
return configuration.toLowerCase() + '_' + os.toLowerCase() + '_' + architecture.toLowerCase()
@ -34,9 +34,6 @@ platformList.each { platform ->
else if (os == 'Ubuntu') {
buildCommand = "./build.sh --skip-prereqs --configuration ${configuration} --docker ubuntu --targets Default"
}
else if (os == 'Ubuntu16.04') {
buildCommand = "./build.sh --skip-prereqs --configuration ${configuration} --docker ubuntu.16.04 --targets Default"
}
else {
// Jenkins non-Ubuntu CI machines don't have docker
buildCommand = "./build.sh --skip-prereqs --configuration ${configuration} --targets Default"

View file

@ -0,0 +1,51 @@
#
# Copyright (c) .NET Foundation and contributors. All rights reserved.
# Licensed under the MIT license. See LICENSE file in the project root for full license information.
#
FROM opensuse:13.2
# Install the base toolchain we need to build anything (clang, cmake, make and the like)
# this does not include libraries that we need to compile different projects, we'd like
# them in a different layer.
RUN zypper -n install binutils \
cmake \
which \
gcc \
llvm-clang \
tar \
ncurses-utils \
curl \
git \
sudo && \
ln -s /usr/bin/clang++ /usr/bin/clang++-3.5 && \
zypper clean -a
# Dependencies of CoreCLR and CoreFX. We need to add an additional repository to get lttng.
RUN zypper addrepo -G http://download.opensuse.org/repositories/devel:/tools:/lttng/openSUSE_13.2/devel:tools:lttng.repo && \
zypper refresh && \
zypper -n remove krb5-mini && \
zypper -n install libunwind \
libicu \
lttng-ust \
libuuid1 \
libopenssl1_0_0 \
libcurl4 \
krb5 && \
zypper clean -a
# Setup User to match Host User, and give superuser permissions
ARG USER_ID=0
RUN useradd -m code_executor -u ${USER_ID} -g wheel
RUN echo 'code_executor ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
# With the User Change, we need to change permissions on these directories
RUN chmod -R a+rwx /usr/local
RUN chmod -R a+rwx /home
RUN chmod -R 755 /usr/lib/sudo
# Set user to the one we just created
USER ${USER_ID}
# Set working directory
WORKDIR /opt/code

View file

@ -76,6 +76,12 @@ if [ -z "$DOCKERFILE" ]; then
echo "using 'fedora.23' image"
export DOCKERFILE=scripts/docker/fedora.23
fi
elif [ "$(cat /etc/*-release | grep -cim1 opensuse)" -eq 1 ]; then
echo "Detected current OS as openSUSE, determining openSUSE version to use..."
if [ "$(cat /etc/*-release | grep -cim1 13.2)" -eq 1 ]; then
echo "using 'openSUSE.13.2' image"
export DOCKERFILE=scripts/docker/opensuse.13.2
fi
else
echo "Unknown Linux Distro. Using 'ubuntu' image"
export DOCKERFILE=scripts/docker/ubuntu

View file

@ -87,6 +87,11 @@ get_current_os_name() {
echo "fedora.23"
return 0
fi
elif [ "$(cat /etc/*-release | grep -cim1 opensuse)" -eq 1 ]; then
if [ "$(cat /etc/*-release | grep -cim1 13.2)" -eq 1 ]; then
echo "opensuse.13.2"
return 0
fi
fi
fi

View file

@ -232,7 +232,8 @@ namespace Microsoft.DotNet.Tests.EndToEnd
case "centos":
case "rhel":
case "fedora":
Console.WriteLine("Skipping native compilation tests on Fedora/CentOS/RHEL - https://github.com/dotnet/cli/issues/453");
case "opensuse":
Console.WriteLine("Skipping native compilation tests on OpenSUSE/Fedora/CentOS/RHEL - https://github.com/dotnet/cli/issues/453");
isSupported = false;
break;
case "debian":

View file

@ -130,6 +130,7 @@ namespace Microsoft.Extensions.DependencyModel.Tests
new RuntimeFallbacks("ubuntu.16.04-x64", "ubuntu", "linux-x64", "linux", "unix", "any", "base"),
new RuntimeFallbacks("rhel-x64", "rhel", "linux-x64", "linux", "unix", "any", "base"),
new RuntimeFallbacks("fedora.23-x64", "fedora", "linux-x64", "linux", "unix", "any", "base"),
new RuntimeFallbacks("opensuse.13.2-x64", "opensuse", "linux-x64", "linux", "unix", "any", "base"),
new RuntimeFallbacks("osx-x64", "osx", "unix", "any", "base"),
});
}