Merge pull request #8416 from yanchenw/master
Adds Microsoft.Docker.Sdk to CLI
This commit is contained in:
commit
fbc76ea5f6
5 changed files with 55 additions and 0 deletions
13
TestAssets/TestProjects/docker-compose/docker-compose.dcproj
Normal file
13
TestAssets/TestProjects/docker-compose/docker-compose.dcproj
Normal file
|
@ -0,0 +1,13 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project Sdk="Microsoft.Docker.Sdk">
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectVersion>2.0</ProjectVersion>
|
||||
<DockerTargetOS>Linux</DockerTargetOS>
|
||||
<DockerLaunchAction>LaunchBrowser</DockerLaunchAction>
|
||||
<DockerServiceUrl>http://localhost:{ServicePort}</DockerServiceUrl>
|
||||
<DockerServiceName>testwebapplication</DockerServiceName>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<None Include="docker-compose.yml" />
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -0,0 +1,8 @@
|
|||
version: '3.0'
|
||||
|
||||
services:
|
||||
testwebapplication:
|
||||
image: testwebapplication
|
||||
build:
|
||||
context: .
|
||||
dockerfile: testwebapplication/Dockerfile
|
|
@ -7,5 +7,6 @@
|
|||
<BundledSdk Include="Microsoft.NET.Sdk.Publish" Version="$(MicrosoftNETSdkPublishPackageVersion)" />
|
||||
<BundledSdk Include="Microsoft.NET.Sdk.Web.ProjectSystem" Version="$(MicrosoftNETSdkWebProjectSystemPackageVersion)" />
|
||||
<BundledSdk Include="FSharp.NET.Sdk" Version="1.0.4-bundled-0100" />
|
||||
<BundledSdk Include="Microsoft.Docker.Sdk" Version="1.1.0" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
<add key="vstest" value="https://dotnet.myget.org/F/vstest/api/v3/index.json" />
|
||||
<add key="nuget-build" value="https://dotnet.myget.org/F/nuget-build/api/v3/index.json" />
|
||||
<add key="dotnet-corefxlab" value="https://dotnet.myget.org/F/dotnet-corefxlab/api/v3/index.json" />
|
||||
<add key="container-tools" value="https://www.myget.org/F/container-tools-for-visual-studio/api/v3/index.json" />
|
||||
]]>
|
||||
</NugetConfigCLIFeeds>
|
||||
|
||||
|
|
32
test/dotnet-build.Tests/GivenDotnetBuildBuildsDcproj.cs
Normal file
32
test/dotnet-build.Tests/GivenDotnetBuildBuildsDcproj.cs
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.
|
||||
|
||||
using FluentAssertions;
|
||||
using Microsoft.DotNet.Tools.Test.Utilities;
|
||||
using Xunit;
|
||||
|
||||
namespace Microsoft.DotNet.Cli.Build.Tests
|
||||
{
|
||||
public class GivenDotnetBuildBuildsDcproj : TestBase
|
||||
{
|
||||
[Fact]
|
||||
public void ItPrintsBuildSummary()
|
||||
{
|
||||
var testAppName = "docker-compose";
|
||||
var testInstance = TestAssets.Get(testAppName)
|
||||
.CreateInstance(testAppName)
|
||||
.WithSourceFiles()
|
||||
.WithRestoreFiles();
|
||||
|
||||
string expectedBuildSummary = @"Build succeeded.
|
||||
0 Warning(s)
|
||||
0 Error(s)";
|
||||
|
||||
var cmd = new BuildCommand()
|
||||
.WithWorkingDirectory(testInstance.Root)
|
||||
.ExecuteWithCapturedOutput();
|
||||
cmd.Should().Pass();
|
||||
cmd.StdOut.Should().ContainVisuallySameFragment(expectedBuildSummary);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue