Merge pull request #9013 from dotnet/merges/release/2.1.2xx-to-release/2.1.3xx
Merge release/2.1.2xx to release/2.1.3xx
This commit is contained in:
commit
481e4a19b3
11 changed files with 229 additions and 36 deletions
|
@ -5,7 +5,7 @@
|
|||
<MicrosoftAspNetCoreAppPackageVersion>$(MicrosoftAspNetCoreAllPackageVersion)</MicrosoftAspNetCoreAppPackageVersion>
|
||||
<MicrosoftNETCoreAppPackageVersion>2.1.0-rc1-26423-06</MicrosoftNETCoreAppPackageVersion>
|
||||
<MicrosoftNETCoreDotNetHostResolverPackageVersion>$(MicrosoftNETCoreAppPackageVersion)</MicrosoftNETCoreDotNetHostResolverPackageVersion>
|
||||
<MicrosoftBuildPackageVersion>15.7.0-preview-000169</MicrosoftBuildPackageVersion>
|
||||
<MicrosoftBuildPackageVersion>15.7.177</MicrosoftBuildPackageVersion>
|
||||
<MicrosoftBuildFrameworkPackageVersion>$(MicrosoftBuildPackageVersion)</MicrosoftBuildFrameworkPackageVersion>
|
||||
<MicrosoftBuildRuntimePackageVersion>$(MicrosoftBuildPackageVersion)</MicrosoftBuildRuntimePackageVersion>
|
||||
<MicrosoftBuildLocalizationPackageVersion>$(MicrosoftBuildPackageVersion)</MicrosoftBuildLocalizationPackageVersion>
|
||||
|
@ -15,7 +15,7 @@
|
|||
<MicrosoftNETCoreCompilersPackageVersion>$(MicrosoftCodeAnalysisCSharpPackageVersion)</MicrosoftNETCoreCompilersPackageVersion>
|
||||
<MicrosoftCodeAnalysisBuildTasksPackageVersion>$(MicrosoftCodeAnalysisCSharpPackageVersion)</MicrosoftCodeAnalysisBuildTasksPackageVersion>
|
||||
<MicrosoftNetCompilersNetcorePackageVersion>$(MicrosoftCodeAnalysisCSharpPackageVersion)</MicrosoftNetCompilersNetcorePackageVersion>
|
||||
<MicrosoftNETSdkPackageVersion>1.0.0-rc1-62827-06</MicrosoftNETSdkPackageVersion>
|
||||
<MicrosoftNETSdkPackageVersion>2.1.300-rtm-62902-01</MicrosoftNETSdkPackageVersion>
|
||||
<MicrosoftNETBuildExtensionsPackageVersion>$(MicrosoftNETSdkPackageVersion)</MicrosoftNETBuildExtensionsPackageVersion>
|
||||
<MicrosoftNETSdkRazorPackageVersion>$(MicrosoftAspNetCoreAppPackageVersion)</MicrosoftNETSdkRazorPackageVersion>
|
||||
<MicrosoftNETSdkWebPackageVersion>2.1.300-rc1-20180422-1618307</MicrosoftNETSdkWebPackageVersion>
|
||||
|
@ -44,7 +44,7 @@
|
|||
<NuGetPackagingPackageVersion>$(NuGetBuildTasksPackageVersion)</NuGetPackagingPackageVersion>
|
||||
<NuGetProjectModelPackageVersion>$(NuGetBuildTasksPackageVersion)</NuGetProjectModelPackageVersion>
|
||||
<NuGetVersioningPackageVersion>$(NuGetBuildTasksPackageVersion)</NuGetVersioningPackageVersion>
|
||||
<MicrosoftNETTestSdkPackageVersion>15.7.0-preview-20180221-13</MicrosoftNETTestSdkPackageVersion>
|
||||
<MicrosoftNETTestSdkPackageVersion>15.7.0</MicrosoftNETTestSdkPackageVersion>
|
||||
<MicrosoftTestPlatformCLIPackageVersion>$(MicrosoftNETTestSdkPackageVersion)</MicrosoftTestPlatformCLIPackageVersion>
|
||||
<MicrosoftTestPlatformBuildPackageVersion>$(MicrosoftNETTestSdkPackageVersion)</MicrosoftTestPlatformBuildPackageVersion>
|
||||
<XliffTasksPackageVersion>0.2.0-beta-000042</XliffTasksPackageVersion>
|
||||
|
|
|
@ -42,6 +42,8 @@
|
|||
Projects="@(ProjectsToTest)">
|
||||
</MSBuild>
|
||||
|
||||
<Exec Command="$(DotnetInOutputDirectory) exec $(RoslynDirectory)/bincore/VBCSCompiler.dll -shutdown" />
|
||||
|
||||
<Message Text="Finished test execution" Importance="High" />
|
||||
</Target>
|
||||
|
||||
|
|
29
netci.groovy
29
netci.groovy
|
@ -9,17 +9,35 @@ def project = GithubProject
|
|||
def branch = GithubBranchName
|
||||
def isPR = true
|
||||
|
||||
def platformList = ['Linux:x64:Release', 'Debian8.2:x64:Debug', 'Ubuntu:x64:Release', 'Ubuntu16.04:x64:Debug', 'OSX10.12:x64:Release', 'Windows_NT:x64:Release', 'Windows_NT:x86:Debug', 'Windows_NT_ES:x64:Debug', 'RHEL7.2:x64:Release', 'CentOS7.1:x64:Debug', 'RHEL6:x64:Debug', 'Linux-musl:x64:Debug', 'Linux:arm:Debug', 'Linux:arm64:Debug']
|
||||
def platformList = [
|
||||
'CentOS7.1:x64:Debug',
|
||||
'Debian8.2:x64:Debug',
|
||||
'fedora.27:x64:Debug',
|
||||
'Linux:arm:Debug',
|
||||
'Linux:arm64:Debug',
|
||||
'Linux-musl:x64:Debug',
|
||||
'Linux:x64:Release',
|
||||
'opensuse.43.2:x64:Debug',
|
||||
'OSX10.12:x64:Release',
|
||||
'RHEL6:x64:Debug',
|
||||
'RHEL7.2:x64:Release',
|
||||
'Ubuntu:x64:Release',
|
||||
'Ubuntu16.04:x64:Debug',
|
||||
'ubuntu.18.04:x64:Debug',
|
||||
'Windows_NT:x64:Release',
|
||||
'Windows_NT:x86:Debug',
|
||||
'Windows_NT_ES:x64:Debug'
|
||||
]
|
||||
|
||||
def static getBuildJobName(def configuration, def os, def architecture) {
|
||||
return configuration.toLowerCase() + '_' + os.toLowerCase() + '_' + architecture.toLowerCase()
|
||||
}
|
||||
|
||||
|
||||
platformList.each { platform ->
|
||||
// Calculate names
|
||||
def (os, architecture, configuration) = platform.tokenize(':')
|
||||
def osUsedForMachineAffinity = os;
|
||||
def osVersionUsedForMachineAffinity = 'latest-or-auto';
|
||||
|
||||
// Calculate job name
|
||||
def jobName = getBuildJobName(configuration, os, architecture)
|
||||
|
@ -59,6 +77,11 @@ set DOTNET_CLI_UI_LANGUAGE=es
|
|||
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'
|
||||
osVersionUsedForMachineAffinity = 'latest-docker'
|
||||
buildCommand = "./build.sh --linux-portable --skip-prereqs --configuration ${configuration} --docker ${os} --targets Default"
|
||||
}
|
||||
else {
|
||||
// Jenkins non-Ubuntu CI machines don't have docker
|
||||
buildCommand = "./build.sh --skip-prereqs --configuration ${configuration} --targets Default"
|
||||
|
@ -78,7 +101,7 @@ set DOTNET_CLI_UI_LANGUAGE=es
|
|||
}
|
||||
}
|
||||
|
||||
Utilities.setMachineAffinity(newJob, osUsedForMachineAffinity, 'latest-or-auto')
|
||||
Utilities.setMachineAffinity(newJob, osUsedForMachineAffinity, osVersionUsedForMachineAffinity)
|
||||
Utilities.standardJobSetup(newJob, project, isPR, "*/${branch}")
|
||||
// ARM CI runs are build only.
|
||||
if ((architecture != 'arm') && (architecture != 'arm64')) {
|
||||
|
|
|
@ -67,8 +67,6 @@ if (!(Test-Path $env:DOTNET_INSTALL_DIR))
|
|||
mkdir $env:DOTNET_INSTALL_DIR | Out-Null
|
||||
}
|
||||
|
||||
|
||||
|
||||
# Disable first run since we want to control all package sources
|
||||
$env:DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
|
||||
|
||||
|
|
32
scripts/docker/fedora.27/Dockerfile
Normal file
32
scripts/docker/fedora.27/Dockerfile
Normal file
|
@ -0,0 +1,32 @@
|
|||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
# Dockerfile that creates a container suitable to build dotnet-cli
|
||||
FROM microsoft/dotnet-buildtools-prereqs:fedora-27-82a3800-20180326211504
|
||||
|
||||
RUN dnf install -y findutils
|
||||
|
||||
RUN dnf upgrade -y nss
|
||||
|
||||
RUN dnf clean all
|
||||
|
||||
# Set a different rid to publish buildtools for, until we update to a version which
|
||||
# natively supports fedora.24-x64
|
||||
ENV __PUBLISH_RID=fedora.23-x64
|
||||
|
||||
# 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
|
||||
|
||||
# Set user to the one we just created
|
||||
USER ${USER_ID}
|
||||
|
||||
# Set working directory
|
||||
WORKDIR /opt/code
|
49
scripts/docker/opensuse.43.2/Dockerfile
Normal file
49
scripts/docker/opensuse.43.2/Dockerfile
Normal file
|
@ -0,0 +1,49 @@
|
|||
#
|
||||
# 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 microsoft/dotnet-buildtools-prereqs:opensuse-42.3-d46ee12-20180327014902
|
||||
|
||||
# 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 && \
|
||||
zypper clean -a
|
||||
|
||||
# Dependencies of CoreCLR and CoreFX.
|
||||
|
||||
RUN zypper -n install --force-resolution \
|
||||
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
|
29
scripts/docker/ubuntu.18.04/Dockerfile
Normal file
29
scripts/docker/ubuntu.18.04/Dockerfile
Normal file
|
@ -0,0 +1,29 @@
|
|||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
# Dockerfile that creates a container suitable to build dotnet-cli
|
||||
FROM microsoft/dotnet-buildtools-prereqs:ubuntu-18.04-f90bc20-20180320154721
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get -qqy install \
|
||||
sudo && \
|
||||
apt-get clean && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Setup User to match Host User, and give superuser permissions
|
||||
ARG USER_ID=0
|
||||
RUN useradd -m code_executor -u ${USER_ID} -g sudo
|
||||
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
|
|
@ -25,7 +25,7 @@
|
|||
<PackageReference Include="Microsoft.Build.Utilities.Core" Version="$(MicrosoftBuildUtilitiesCorePackageVersion)" />
|
||||
<PackageReference Include="System.Runtime.InteropServices.RuntimeInformation" Version="4.3.0" />
|
||||
<PackageReference Include="XliffTasks" Version="$(XliffTasksPackageVersion)" PrivateAssets="All" />
|
||||
</ItemGroup>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition=" '$(TargetFrameworkIdentifier)' == '.NETStandard' ">
|
||||
<PackageReference Include="NETStandard.Library" Version="2.0.0" />
|
||||
|
|
83
test/EndToEnd/GivenDotNetLinuxInstallers.cs
Normal file
83
test/EndToEnd/GivenDotNetLinuxInstallers.cs
Normal file
|
@ -0,0 +1,83 @@
|
|||
// 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.
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
using Microsoft.DotNet.Tools.Test.Utilities;
|
||||
using Xunit;
|
||||
|
||||
namespace Microsoft.DotNet.Tests.EndToEnd
|
||||
{
|
||||
public class GivenDotNetLinuxInstallers
|
||||
{
|
||||
[Fact]
|
||||
public void ItHasExpectedDependencies()
|
||||
{
|
||||
var installerFile = Environment.GetEnvironmentVariable("SDK_INSTALLER_FILE");
|
||||
if (string.IsNullOrEmpty(installerFile))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var ext = Path.GetExtension(installerFile);
|
||||
switch (ext)
|
||||
{
|
||||
case ".deb":
|
||||
DebianPackageHasDependencyOnAspNetCoreStoreAndDotnetRuntime(installerFile);
|
||||
return;
|
||||
case ".rpm":
|
||||
RpmPackageHasDependencyOnAspNetCoreStoreAndDotnetRuntime(installerFile);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
private void DebianPackageHasDependencyOnAspNetCoreStoreAndDotnetRuntime(string installerFile)
|
||||
{
|
||||
// Example output:
|
||||
|
||||
// $ dpkg --info dotnet-sdk-2.1.105-ubuntu-x64.deb
|
||||
|
||||
// new debian package, version 2.0.
|
||||
// size 75660448 bytes: control archive=29107 bytes.
|
||||
// 717 bytes, 11 lines control
|
||||
// 123707 bytes, 1004 lines md5sums
|
||||
// 1710 bytes, 28 lines * postinst #!/usr/bin/env
|
||||
// Package: dotnet-sdk-2.1.104
|
||||
// Version: 2.1.104-1
|
||||
// Architecture: amd64
|
||||
// Maintainer: Microsoft <dotnetcore@microsoft.com>
|
||||
// Installed-Size: 201119
|
||||
// Depends: dotnet-runtime-2.0.6, aspnetcore-store-2.0.6
|
||||
// Section: devel
|
||||
// Priority: standard
|
||||
// Homepage: https://dotnet.github.io/core
|
||||
// Description: Microsoft .NET Core SDK - 2.1.104
|
||||
|
||||
new TestCommand("dpkg")
|
||||
.ExecuteWithCapturedOutput($"--info {installerFile}")
|
||||
.Should().Pass()
|
||||
.And.HaveStdOutMatching(@"Depends:.*\s?dotnet-runtime-\d+(\.\d+){2}")
|
||||
.And.HaveStdOutMatching(@"Depends:.*\s?aspnetcore-store-\d+(\.\d+){2}");
|
||||
}
|
||||
|
||||
private void RpmPackageHasDependencyOnAspNetCoreStoreAndDotnetRuntime(string installerFile)
|
||||
{
|
||||
// Example output:
|
||||
|
||||
// $ rpm -qpR dotnet-sdk-2.1.105-rhel-x64.rpm
|
||||
|
||||
// dotnet-runtime-2.0.7 >= 2.0.7
|
||||
// aspnetcore-store-2.0.7 >= 2.0.7
|
||||
// /bin/sh
|
||||
// /bin/sh
|
||||
// rpmlib(PayloadFilesHavePrefix) <= 4.0-1
|
||||
// rpmlib(CompressedFileNames) <= 3.0.4-1
|
||||
|
||||
new TestCommand("rpm")
|
||||
.ExecuteWithCapturedOutput($"-qpR {installerFile}")
|
||||
.Should().Pass()
|
||||
.And.HaveStdOutMatching(@"dotnet-runtime-\d+(\.\d+){2} >= \d+(\.\d+){2}")
|
||||
.And.HaveStdOutMatching(@"aspnetcore-store-\d+(\.\d+){2} >= \d+(\.\d+){2}");
|
||||
}
|
||||
}
|
||||
}
|
|
@ -14,4 +14,8 @@
|
|||
<ProjectReference Include="..\..\src\Microsoft.DotNet.Cli.Utils\Microsoft.DotNet.Cli.Utils.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="NETStandard.Library" Version="2.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
|
@ -1,27 +0,0 @@
|
|||
// 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.
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
|
||||
namespace Microsoft.DotNet.Tools.Test.Utilities
|
||||
{
|
||||
public class ProjectUtils
|
||||
{
|
||||
public static string GetProjectJson(string testRoot, string project)
|
||||
{
|
||||
// We assume that the project name same as the directory name with contains the project.json
|
||||
// We can do better here by using ProjectReader to get the correct project name
|
||||
string projectPath = Directory.GetFiles(testRoot, "project.json", SearchOption.AllDirectories)
|
||||
.FirstOrDefault(pj => Directory.GetParent(pj).Name.Equals(project));
|
||||
|
||||
if (string.IsNullOrEmpty(projectPath))
|
||||
{
|
||||
throw new Exception($"Cannot file project '{project}' in '{testRoot}'");
|
||||
}
|
||||
|
||||
return projectPath;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue