Skip to content
This repository was archived by the owner on Apr 20, 2023. It is now read-only.

Commit 6600612

Browse files
committed
Adding new docker files for opensuse.42.3, ubuntu.18.04 and fedora.27 and removing the project.json CLI from the build. It was not being used anymore.
1 parent 60218ce commit 6600612

File tree

13 files changed

+116
-288
lines changed

13 files changed

+116
-288
lines changed

build/DependencyVersions.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<PropertyGroup>
4-
<MicrosoftNETCoreAppPackageVersion>2.0.6</MicrosoftNETCoreAppPackageVersion>
4+
<MicrosoftNETCoreAppPackageVersion>2.0.7-servicing-26322-01</MicrosoftNETCoreAppPackageVersion>
55
<MicrosoftNETCoreDotNetHostResolverPackageVersion>$(MicrosoftNETCoreAppPackageVersion)</MicrosoftNETCoreDotNetHostResolverPackageVersion>
66
<MicrosoftBuildPackageVersion>15.6.82</MicrosoftBuildPackageVersion>
77
<MicrosoftBuildFrameworkPackageVersion>$(MicrosoftBuildPackageVersion)</MicrosoftBuildFrameworkPackageVersion>

build/NugetConfigFile.targets

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
<NugetConfigCLIFeeds>
2020
<![CDATA[
2121
<add key="BlobFeed" value="https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json" />
22+
<add key="dotnet-core" value="https://dotnet.myget.org/F/dotnet-core/api/v3/index.json" />
2223
<add key="templating" value="https://dotnet.myget.org/F/templating/api/v3/index.json" />
2324
<add key="aspnet" value="https://dotnet.myget.org/F/aspnetcore-release/api/v3/index.json" />
2425
<add key="websdkfeed" value="https://dotnet.myget.org/F/dotnet-web/api/v3/index.json" />

run-build.sh

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -163,14 +163,6 @@ if [ $EXIT_CODE != 0 ]; then
163163
exit $EXIT_CODE
164164
fi
165165

166-
# Install a project.json based CLI for use by tests
167-
(set -x ; "$REPOROOT/scripts/obtain/dotnet-install.sh" --channel "master" --install-dir "$DOTNET_INSTALL_DIR_PJ" --architecture "$ARCHITECTURE" --version "1.0.0-preview2-1-003177")
168-
EXIT_CODE=$?
169-
if [ $EXIT_CODE != 0 ]; then
170-
echo "run-build: Error: installing project-json based cli failed with exit code $EXIT_CODE." >&2
171-
exit $EXIT_CODE
172-
fi
173-
174166
# Put stage 0 on the PATH (for this shell only)
175167
PATH="$DOTNET_INSTALL_DIR:$PATH"
176168

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#
2+
# Copyright (c) .NET Foundation and contributors. All rights reserved.
3+
# Licensed under the MIT license. See LICENSE file in the project root for full license information.
4+
#
5+
6+
# Dockerfile that creates a container suitable to build dotnet-cli
7+
FROM microsoft/dotnet-buildtools-prereqs:fedora-27-82a3800-20180326211504
8+
9+
RUN dnf install -y findutils
10+
11+
RUN dnf upgrade -y nss
12+
13+
RUN dnf clean all
14+
15+
# Set a different rid to publish buildtools for, until we update to a version which
16+
# natively supports fedora.24-x64
17+
ENV __PUBLISH_RID=fedora.23-x64
18+
19+
# Setup User to match Host User, and give superuser permissions
20+
ARG USER_ID=0
21+
RUN useradd -m code_executor -u ${USER_ID} -g wheel
22+
RUN echo 'code_executor ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
23+
24+
# With the User Change, we need to change permissions on these directories
25+
RUN chmod -R a+rwx /usr/local
26+
RUN chmod -R a+rwx /home
27+
28+
# Set user to the one we just created
29+
USER ${USER_ID}
30+
31+
# Set working directory
32+
WORKDIR /opt/code
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
#
2+
# Copyright (c) .NET Foundation and contributors. All rights reserved.
3+
# Licensed under the MIT license. See LICENSE file in the project root for full license information.
4+
#
5+
6+
FROM microsoft/dotnet-buildtools-prereqs:opensuse-42.3-d46ee12-20180327014902
7+
8+
# Install the base toolchain we need to build anything (clang, cmake, make and the like)
9+
# this does not include libraries that we need to compile different projects, we'd like
10+
# them in a different layer.
11+
RUN zypper -n install binutils \
12+
cmake \
13+
which \
14+
gcc \
15+
llvm-clang \
16+
tar \
17+
ncurses-utils \
18+
curl \
19+
git \
20+
sudo && \
21+
zypper clean -a
22+
23+
# Dependencies of CoreCLR and CoreFX.
24+
25+
RUN zypper -n install --force-resolution \
26+
libunwind \
27+
libicu \
28+
lttng-ust \
29+
libuuid1 \
30+
libopenssl1_0_0 \
31+
libcurl4 \
32+
krb5 && \
33+
zypper clean -a
34+
35+
# Setup User to match Host User, and give superuser permissions
36+
ARG USER_ID=0
37+
RUN useradd -m code_executor -u ${USER_ID} -g wheel
38+
RUN echo 'code_executor ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
39+
40+
# With the User Change, we need to change permissions on these directories
41+
RUN chmod -R a+rwx /usr/local
42+
RUN chmod -R a+rwx /home
43+
RUN chmod -R 755 /usr/lib/sudo
44+
45+
# Set user to the one we just created
46+
USER ${USER_ID}
47+
48+
# Set working directory
49+
WORKDIR /opt/code
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#
2+
# Copyright (c) .NET Foundation and contributors. All rights reserved.
3+
# Licensed under the MIT license. See LICENSE file in the project root for full license information.
4+
#
5+
6+
# Dockerfile that creates a container suitable to build dotnet-cli
7+
FROM microsoft/dotnet-buildtools-prereqs:ubuntu-18.04-f90bc20-20180320154721
8+
9+
RUN apt-get update && \
10+
apt-get -qqy install \
11+
sudo && \
12+
apt-get clean && \
13+
rm -rf /var/lib/apt/lists/*
14+
15+
# Setup User to match Host User, and give superuser permissions
16+
ARG USER_ID=0
17+
RUN useradd -m code_executor -u ${USER_ID} -g sudo
18+
RUN echo 'code_executor ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
19+
20+
# With the User Change, we need to change permissions on these directories
21+
RUN chmod -R a+rwx /usr/local
22+
RUN chmod -R a+rwx /home
23+
RUN chmod -R 755 /usr/lib/sudo
24+
25+
# Set user to the one we just created
26+
USER ${USER_ID}
27+
28+
# Set working directory
29+
WORKDIR /opt/code

src/Microsoft.DotNet.TestFramework/TestAssets.cs

Lines changed: 1 addition & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,9 @@ public class TestAssets
1717

1818
private FileInfo _dotnetCsprojExe;
1919

20-
private FileInfo _dotnetProjectJsonExe;
21-
22-
private const string ProjectJsonSearchPattern = "project.json";
23-
2420
private const string CsprojSearchPattern = "*.csproj";
2521

26-
public TestAssets(DirectoryInfo assetsRoot, FileInfo dotnetCsprojExe, FileInfo dotnetProjectJsonExe)
22+
public TestAssets(DirectoryInfo assetsRoot, FileInfo dotnetCsprojExe)
2723
{
2824
if (assetsRoot == null)
2925
{
@@ -35,11 +31,6 @@ public TestAssets(DirectoryInfo assetsRoot, FileInfo dotnetCsprojExe, FileInfo d
3531
throw new ArgumentNullException(nameof(dotnetCsprojExe));
3632
}
3733

38-
if (dotnetProjectJsonExe == null)
39-
{
40-
throw new ArgumentNullException(nameof(dotnetProjectJsonExe));
41-
}
42-
4334
if (!assetsRoot.Exists)
4435
{
4536
throw new DirectoryNotFoundException($"Directory not found at '{assetsRoot}'");
@@ -50,16 +41,9 @@ public TestAssets(DirectoryInfo assetsRoot, FileInfo dotnetCsprojExe, FileInfo d
5041
throw new FileNotFoundException("Csproj dotnet executable must exist", dotnetCsprojExe.FullName);
5142
}
5243

53-
if (!dotnetProjectJsonExe.Exists)
54-
{
55-
throw new FileNotFoundException("project.json dotnet executable must exist", dotnetProjectJsonExe.FullName);
56-
}
57-
5844
_root = assetsRoot;
5945

6046
_dotnetCsprojExe = dotnetCsprojExe;
61-
62-
_dotnetProjectJsonExe = dotnetProjectJsonExe;
6347
}
6448

6549
public TestAssetInfo Get(string name)
@@ -78,22 +62,6 @@ public TestAssetInfo Get(string kind, string name)
7862
CsprojSearchPattern);
7963
}
8064

81-
public TestAssetInfo GetProjectJson(string name)
82-
{
83-
return GetProjectJson(TestAssetKinds.TestProjects, name);
84-
}
85-
86-
public TestAssetInfo GetProjectJson(string kind, string name)
87-
{
88-
var assetDirectory = new DirectoryInfo(Path.Combine(_root.FullName, kind, name));
89-
90-
return new TestAssetInfo(
91-
assetDirectory,
92-
name,
93-
_dotnetProjectJsonExe,
94-
ProjectJsonSearchPattern);
95-
}
96-
9765
public DirectoryInfo CreateTestDirectory(string testProjectName = "temp", [CallerMemberName] string callingMethod = "", string identifier = "")
9866
{
9967
var testDestination = GetTestDestinationDirectoryPath(testProjectName, callingMethod, identifier);

test/Microsoft.DotNet.Cli.Utils.Tests/GivenAProjectToolsCommandResolver.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ public void ItAddsFxVersionAsAParamWhenTheToolHasThePrefercliruntimeFile()
303303

304304
result.Should().NotBeNull();
305305

306-
result.Args.Should().Contain("--fx-version 2.0.6");
306+
result.Args.Should().Contain("--fx-version 2.0.7-servicing-26322-01");
307307
}
308308

309309
[Fact]

0 commit comments

Comments
 (0)