Simon Cropp
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with
11 additions and
11 deletions
-
src/Microsoft.Tye.Core/ApplicationFactory.cs
-
src/Microsoft.Tye.Core/ComputedBindings.cs
-
src/Microsoft.Tye.Core/ConfigModel/ConfigApplication.cs
-
src/Microsoft.Tye.Core/ProjectReader.cs
-
src/Microsoft.Tye.Core/StandardOptions.cs
-
src/Microsoft.Tye.Core/ValidateSecretStep.cs
-
src/Microsoft.Tye.Hosting.Diagnostics/DiagnosticsCollector.cs
-
src/Microsoft.Tye.Hosting.Diagnostics/Logging/LogValuesFormatter.cs
-
test/E2ETest/DockerAssert.cs
|
|
|
@ -47,7 +47,7 @@ namespace Microsoft.Tye |
|
|
|
await ProjectReader.ReadProjectDetailsAsync(output, project); |
|
|
|
|
|
|
|
// We don't apply more container defaults here because we might need
|
|
|
|
// to prompty for the registry name.
|
|
|
|
// to promptly for the registry name.
|
|
|
|
project.ContainerInfo = new ContainerInfo() |
|
|
|
{ |
|
|
|
UseMultiphaseDockerfile = false, |
|
|
|
|
|
|
|
@ -41,7 +41,7 @@ namespace Microsoft.Tye |
|
|
|
public string Name { get; } |
|
|
|
public string? Value { get; } |
|
|
|
|
|
|
|
// Used to map the secret to a key that ASP.NET Core understandes
|
|
|
|
// Used to map the secret to a key that ASP.NET Core understands
|
|
|
|
public string Filename { get; } |
|
|
|
|
|
|
|
// Used for informational purposes
|
|
|
|
|
|
|
|
@ -12,7 +12,7 @@ namespace Microsoft.Tye.ConfigModel |
|
|
|
{ |
|
|
|
// General design note re: nullability - we use [Required] to validate for non-null
|
|
|
|
// so we use = default! to reflect that. Code that creates a ConfigApplication should
|
|
|
|
// validate it before deferencing the properties.
|
|
|
|
// validate it before dereferencing the properties.
|
|
|
|
public class ConfigApplication |
|
|
|
{ |
|
|
|
// This gets set by all of the code paths that read the application
|
|
|
|
|
|
|
|
@ -101,7 +101,7 @@ namespace Microsoft.Tye |
|
|
|
// Using the project as the working directory. We're making the assumption that
|
|
|
|
// all of the projects want to use the same SDK version. This library is going
|
|
|
|
// load a single version of the SDK's assemblies into our process, so we can't
|
|
|
|
// use supprt SDKs at once without getting really tricky.
|
|
|
|
// use support SDKs at once without getting really tricky.
|
|
|
|
//
|
|
|
|
// The .NET SDK-based discovery uses `dotnet --info` and returns the SDK
|
|
|
|
// in use for the directory.
|
|
|
|
@ -188,7 +188,7 @@ namespace Microsoft.Tye |
|
|
|
AssemblyLoadContext.Default.Resolving -= ResolveAssembly; |
|
|
|
} |
|
|
|
|
|
|
|
// Reading both InformationalVersion and Version is more resilant in the face of build failures.
|
|
|
|
// Reading both InformationalVersion and Version is more resilient in the face of build failures.
|
|
|
|
var version = projectInstance.GetProperty("InformationalVersion")?.EvaluatedValue ?? projectInstance.GetProperty("Version").EvaluatedValue; |
|
|
|
project.Version = version; |
|
|
|
output.WriteDebugLine($"Found application version: {version}"); |
|
|
|
|
|
|
|
@ -19,7 +19,7 @@ namespace Microsoft.Tye |
|
|
|
{ |
|
|
|
get |
|
|
|
{ |
|
|
|
return new Option(new[] { "-e", "--environment" }, "Environemnt") |
|
|
|
return new Option(new[] { "-e", "--environment" }, "Environment") |
|
|
|
{ |
|
|
|
Argument = new Argument<string>("environment", () => "production") |
|
|
|
{ |
|
|
|
|
|
|
|
@ -92,7 +92,7 @@ namespace Microsoft.Tye |
|
|
|
$"kubectl create secret generic {secretInputBinding.Name} --from-literal=connectionstring=<value>"); |
|
|
|
} |
|
|
|
|
|
|
|
// If we get here then we should create the sceret.
|
|
|
|
// If we get here then we should create the secret.
|
|
|
|
var text = output.Prompt($"Enter the connection string to use for service '{secretInputBinding.Service.Name}'", allowEmpty: true); |
|
|
|
if (string.IsNullOrWhiteSpace(text)) |
|
|
|
{ |
|
|
|
|
|
|
|
@ -252,7 +252,7 @@ namespace Microsoft.Tye.Hosting.Diagnostics |
|
|
|
{ |
|
|
|
var source = new EventPipeEventSource(session.EventStream); |
|
|
|
|
|
|
|
// Distribued Tracing
|
|
|
|
// Distributed Tracing
|
|
|
|
HandleDistributedTracingEvents(source, processor); |
|
|
|
|
|
|
|
// Metrics
|
|
|
|
@ -851,7 +851,7 @@ namespace Microsoft.Tye.Hosting.Diagnostics |
|
|
|
internal sealed class LoggingEventSource |
|
|
|
{ |
|
|
|
/// <summary>
|
|
|
|
/// This is public from an EventSource consumer point of view, but since these defintions
|
|
|
|
/// This is public from an EventSource consumer point of view, but since these definitions
|
|
|
|
/// are not needed outside this class
|
|
|
|
/// </summary>
|
|
|
|
public static class Keywords |
|
|
|
|
|
|
|
@ -15,7 +15,7 @@ using System.Text; |
|
|
|
namespace Microsoft.Tye.Hosting.Diagnostics.Logging |
|
|
|
{ |
|
|
|
/// <summary>
|
|
|
|
/// Formatter to convert the named format items like {NamedformatItem} to <see cref="M:string.Format"/> format.
|
|
|
|
/// Formatter to convert the named format items like {NamedFormatItem} to <see cref="M:string.Format"/> format.
|
|
|
|
/// </summary>
|
|
|
|
internal class LogValuesFormatter |
|
|
|
{ |
|
|
|
|
|
|
|
@ -15,7 +15,7 @@ namespace E2ETest |
|
|
|
public static class DockerAssert |
|
|
|
{ |
|
|
|
// Repository is the "registry/image" format. Yeah Docker uses that term for it, and it's
|
|
|
|
// wierd and confusing.
|
|
|
|
// weird and confusing.
|
|
|
|
public static async Task AssertImageExistsAsync(ITestOutputHelper output, string repository) |
|
|
|
{ |
|
|
|
var builder = new StringBuilder(); |
|
|
|
|