Browse Source
Removing color from deployed app console logs (#577 )
* Removing color from deployed app console logs
* Updating generated testassets for E2E test fixes wrt Type Serialization.
* Removing color for ApplyContainerDefaults with DockerFileServiceBuilder, fixing test files to include new env variables
* Removing color dependent code in DockerfileGenerator.cs for DockerFileServiceBuilder
pull/579/head
Matt Smith
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with
37 additions and
0 deletions
src/Microsoft.Tye.Core/DockerfileGenerator.cs
test/E2ETest/testassets/generate/apps-with-ingress.yaml
test/E2ETest/testassets/generate/dapr.yaml
test/E2ETest/testassets/generate/dockerfile.yaml
test/E2ETest/testassets/generate/frontend-backend.yaml
test/E2ETest/testassets/generate/generate-connectionstring-dependency.yaml
test/E2ETest/testassets/generate/generate-named-binding.yaml
test/E2ETest/testassets/generate/generate-uri-dependency.yaml
test/E2ETest/testassets/generate/health-checks.yaml
test/E2ETest/testassets/generate/multi-project.yaml
test/E2ETest/testassets/generate/multirepo.yaml
test/E2ETest/testassets/generate/single-project-noregistry.yaml
test/E2ETest/testassets/generate/single-project.yaml
@ -124,6 +124,9 @@ namespace Microsoft.Tye
}
container . ImageTag ? ? = project . Version ? . Replace ( "+" , "-" ) ? ? "latest" ;
// Disable color in the logs
project . EnvironmentVariables . Add ( new EnvironmentVariableBuilder ( "DOTNET_LOGGING__CONSOLE__DISABLECOLORS" ) { Value = "true" } ) ;
}
public static void ApplyContainerDefaults ( ApplicationBuilder application , DockerFileServiceBuilder project , ContainerInfo container )
@ -21,6 +21,8 @@ spec:
image : appa:1.0.0
imagePullPolicy : Always
env:
- name : DOTNET_LOGGING__CONSOLE__DISABLECOLORS
value : 'true'
- name : ASPNETCORE_URLS
value : 'http://*'
- name : PORT
@ -82,6 +84,8 @@ spec:
image : appb:1.0.0
imagePullPolicy : Always
env:
- name : DOTNET_LOGGING__CONSOLE__DISABLECOLORS
value : 'true'
- name : ASPNETCORE_URLS
value : 'http://*'
- name : PORT
@ -33,6 +33,8 @@ spec:
image : dapr-test-project:1.0.0
imagePullPolicy : Always
env:
- name : DOTNET_LOGGING__CONSOLE__DISABLECOLORS
value : 'true'
- name : ASPNETCORE_URLS
value : 'http://*'
- name : PORT
@ -82,6 +82,8 @@ spec:
image : frontend:1.0.0
imagePullPolicy : Always
env:
- name : DOTNET_LOGGING__CONSOLE__DISABLECOLORS
value : 'true'
- name : ASPNETCORE_URLS
value : 'http://*'
- name : PORT
@ -21,6 +21,8 @@ spec:
image : test/backend:1.0.0
imagePullPolicy : Always
env:
- name : DOTNET_LOGGING__CONSOLE__DISABLECOLORS
value : 'true'
- name : ASPNETCORE_URLS
value : 'http://*'
- name : PORT
@ -82,6 +84,8 @@ spec:
image : test/frontend:1.0.0
imagePullPolicy : Always
env:
- name : DOTNET_LOGGING__CONSOLE__DISABLECOLORS
value : 'true'
- name : ASPNETCORE_URLS
value : 'http://*'
- name : PORT
@ -21,6 +21,8 @@ spec:
image : frontend:1.0.0
imagePullPolicy : Always
env:
- name : DOTNET_LOGGING__CONSOLE__DISABLECOLORS
value : 'true'
- name : ASPNETCORE_URLS
value : 'http://*'
- name : PORT
@ -21,6 +21,8 @@ spec:
image : frontend:1.0.0
imagePullPolicy : Always
env:
- name : DOTNET_LOGGING__CONSOLE__DISABLECOLORS
value : 'true'
- name : ASPNETCORE_URLS
value : 'http://*'
- name : PORT
@ -21,6 +21,8 @@ spec:
image : frontend:1.0.0
imagePullPolicy : Always
env:
- name : DOTNET_LOGGING__CONSOLE__DISABLECOLORS
value : 'true'
- name : ASPNETCORE_URLS
value : 'http://*'
- name : PORT
@ -21,6 +21,8 @@ spec:
image : health-all:1.0.0
imagePullPolicy : Always
env:
- name : DOTNET_LOGGING__CONSOLE__DISABLECOLORS
value : 'true'
- name : ASPNETCORE_URLS
value : 'http://*:8004'
- name : PORT
@ -21,6 +21,8 @@ spec:
image : test/backend:1.0.0
imagePullPolicy : Always
env:
- name : DOTNET_LOGGING__CONSOLE__DISABLECOLORS
value : 'true'
- name : ASPNETCORE_URLS
value : 'http://*:7000'
- name : PORT
@ -97,6 +99,8 @@ spec:
image : test/frontend:1.0.0
imagePullPolicy : Always
env:
- name : DOTNET_LOGGING__CONSOLE__DISABLECOLORS
value : 'true'
- name : ASPNETCORE_URLS
value : 'http://*:8000'
- name : PORT
@ -173,6 +177,8 @@ spec:
image : test/worker:1.0.0
imagePullPolicy : Always
env:
- name : DOTNET_LOGGING__CONSOLE__DISABLECOLORS
value : 'true'
- name : SERVICE__BACKEND__PROTOCOL
value : 'http'
- name : SERVICE__BACKEND__PORT
@ -21,6 +21,8 @@ spec:
image : results:1.0.0
imagePullPolicy : Always
env:
- name : DOTNET_LOGGING__CONSOLE__DISABLECOLORS
value : 'true'
- name : ASPNETCORE_URLS
value : 'http://*'
- name : PORT
@ -82,6 +84,8 @@ spec:
image : worker:1.0.0
imagePullPolicy : Always
env:
- name : DOTNET_LOGGING__CONSOLE__DISABLECOLORS
value : 'true'
- name : ASPNETCORE_URLS
value : 'http://*'
- name : PORT
@ -21,6 +21,8 @@ spec:
image : test-project:1.0.0
imagePullPolicy : Always
env:
- name : DOTNET_LOGGING__CONSOLE__DISABLECOLORS
value : 'true'
- name : ASPNETCORE_URLS
value : 'http://*'
- name : PORT
@ -21,6 +21,8 @@ spec:
image : test/test-project:1.0.0
imagePullPolicy : Always
env:
- name : DOTNET_LOGGING__CONSOLE__DISABLECOLORS
value : 'true'
- name : ASPNETCORE_URLS
value : 'http://*'
- name : PORT