From 73d84c2cd6dd1526219df5d28544e2822b2228fe Mon Sep 17 00:00:00 2001
From: stijnmoreels <9039753+stijnmoreels@users.noreply.github.com>
Date: Mon, 1 Aug 2022 06:34:45 +0200
Subject: [PATCH 1/9] chore: minimum serilog log level = information
---
.../Startup.cs | 2 +-
src/Arcus.Templates.AzureFunctions.Http/Startup.cs | 2 +-
src/Arcus.Templates.AzureFunctions.ServiceBus.Queue/Startup.cs | 2 +-
src/Arcus.Templates.AzureFunctions.ServiceBus.Topic/Startup.cs | 2 +-
src/Arcus.Templates.ServiceBus.Queue/Program.cs | 2 +-
src/Arcus.Templates.ServiceBus.Topic/Program.cs | 2 +-
6 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/Arcus.Templates.AzureFunctions.Databricks.JobMetrics/Startup.cs b/src/Arcus.Templates.AzureFunctions.Databricks.JobMetrics/Startup.cs
index 311dfe4d..7135dc88 100644
--- a/src/Arcus.Templates.AzureFunctions.Databricks.JobMetrics/Startup.cs
+++ b/src/Arcus.Templates.AzureFunctions.Databricks.JobMetrics/Startup.cs
@@ -50,7 +50,7 @@ public override void Configure(IFunctionsHostBuilder builder)
private static LoggerConfiguration CreateLoggerConfiguration(IFunctionsHostBuilder builder)
{
var configuration = new LoggerConfiguration()
- .MinimumLevel.Debug()
+ .MinimumLevel.Information()
.MinimumLevel.Override("Microsoft", LogEventLevel.Information)
.Enrich.FromLogContext()
.Enrich.WithComponentName("Azure Databricks Metrics Scraper")
diff --git a/src/Arcus.Templates.AzureFunctions.Http/Startup.cs b/src/Arcus.Templates.AzureFunctions.Http/Startup.cs
index d6002451..faca3269 100644
--- a/src/Arcus.Templates.AzureFunctions.Http/Startup.cs
+++ b/src/Arcus.Templates.AzureFunctions.Http/Startup.cs
@@ -61,7 +61,7 @@ public override void Configure(IFunctionsHostBuilder builder)
private static LoggerConfiguration CreateLoggerConfiguration(IFunctionsHostBuilder builder)
{
var configuration = new LoggerConfiguration()
- .MinimumLevel.Debug()
+ .MinimumLevel.Information()
.MinimumLevel.Override("Microsoft", LogEventLevel.Information)
.Enrich.FromLogContext()
.Enrich.WithComponentName("Azure HTTP Trigger")
diff --git a/src/Arcus.Templates.AzureFunctions.ServiceBus.Queue/Startup.cs b/src/Arcus.Templates.AzureFunctions.ServiceBus.Queue/Startup.cs
index 35162a35..17962b0d 100644
--- a/src/Arcus.Templates.AzureFunctions.ServiceBus.Queue/Startup.cs
+++ b/src/Arcus.Templates.AzureFunctions.ServiceBus.Queue/Startup.cs
@@ -57,7 +57,7 @@ public override void Configure(IFunctionsHostBuilder builder)
private static LoggerConfiguration CreateLoggerConfiguration(IFunctionsHostBuilder builder)
{
var logConfig = new LoggerConfiguration()
- .MinimumLevel.Debug()
+ .MinimumLevel.Information()
.MinimumLevel.Override("Microsoft", LogEventLevel.Information)
.Enrich.FromLogContext()
.Enrich.WithComponentName("Service Bus Queue Trigger")
diff --git a/src/Arcus.Templates.AzureFunctions.ServiceBus.Topic/Startup.cs b/src/Arcus.Templates.AzureFunctions.ServiceBus.Topic/Startup.cs
index ac432f72..2c23079b 100644
--- a/src/Arcus.Templates.AzureFunctions.ServiceBus.Topic/Startup.cs
+++ b/src/Arcus.Templates.AzureFunctions.ServiceBus.Topic/Startup.cs
@@ -57,7 +57,7 @@ public override void Configure(IFunctionsHostBuilder builder)
private static LoggerConfiguration CreateLoggerConfiguration(IFunctionsHostBuilder builder)
{
var logConfig = new LoggerConfiguration()
- .MinimumLevel.Debug()
+ .MinimumLevel.Information()
.MinimumLevel.Override("Microsoft", LogEventLevel.Information)
.Enrich.FromLogContext()
.Enrich.WithComponentName("Service Bus Topic Trigger")
diff --git a/src/Arcus.Templates.ServiceBus.Queue/Program.cs b/src/Arcus.Templates.ServiceBus.Queue/Program.cs
index 71dbbb28..6a0b276c 100644
--- a/src/Arcus.Templates.ServiceBus.Queue/Program.cs
+++ b/src/Arcus.Templates.ServiceBus.Queue/Program.cs
@@ -93,7 +93,7 @@ private static async Task ConfigureSerilogAsync(IHost host)
var reloadLogger = (ReloadableLogger) Log.Logger;
reloadLogger.Reload(config =>
{
- config.MinimumLevel.Debug()
+ config.MinimumLevel.Information()
.MinimumLevel.Override("Microsoft", LogEventLevel.Information)
.Enrich.FromLogContext()
.Enrich.WithVersion()
diff --git a/src/Arcus.Templates.ServiceBus.Topic/Program.cs b/src/Arcus.Templates.ServiceBus.Topic/Program.cs
index a8f9c4c8..84d82315 100644
--- a/src/Arcus.Templates.ServiceBus.Topic/Program.cs
+++ b/src/Arcus.Templates.ServiceBus.Topic/Program.cs
@@ -92,7 +92,7 @@ private static async Task ConfigureSerilogAsync(IHost host)
var reloadLogger = (ReloadableLogger) Log.Logger;
reloadLogger.Reload(config =>
{
- config.MinimumLevel.Debug()
+ config.MinimumLevel.Information()
.MinimumLevel.Override("Microsoft", LogEventLevel.Information)
.Enrich.FromLogContext()
.Enrich.WithVersion()
From 8d52612f2e5f94a0e38b5ea072d54889b6baa945 Mon Sep 17 00:00:00 2001
From: stijnmoreels <9039753+stijnmoreels@users.noreply.github.com>
Date: Mon, 1 Aug 2022 06:50:26 +0200
Subject: [PATCH 2/9] chore: upgrate to observability v2.5
---
build/templates/docker-integration-tests.yml | 6 +++---
...Templates.AzureFunctions.Databricks.JobMetrics.csproj | 7 ++++---
.../Startup.cs | 9 +++++----
.../Arcus.Templates.AzureFunctions.Http.csproj | 1 +
src/Arcus.Templates.AzureFunctions.Http/Startup.cs | 3 ++-
...rcus.Templates.AzureFunctions.ServiceBus.Queue.csproj | 9 +++++----
.../Startup.cs | 9 +++++----
...rcus.Templates.AzureFunctions.ServiceBus.Topic.csproj | 9 +++++----
.../Startup.cs | 9 +++++----
.../Arcus.Templates.ServiceBus.Queue.csproj | 3 ++-
src/Arcus.Templates.ServiceBus.Queue/Program.cs | 4 +++-
.../Arcus.Templates.ServiceBus.Topic.csproj | 3 ++-
src/Arcus.Templates.ServiceBus.Topic/Program.cs | 5 ++++-
.../AzureFunctions/AzureFunctionsProject.cs | 5 +----
14 files changed, 47 insertions(+), 35 deletions(-)
diff --git a/build/templates/docker-integration-tests.yml b/build/templates/docker-integration-tests.yml
index 6d648c47..3f74bb54 100644
--- a/build/templates/docker-integration-tests.yml
+++ b/build/templates/docker-integration-tests.yml
@@ -81,7 +81,7 @@ stages:
envVars: |
Arcus__Databricks__Url=$(Arcus.Databricks.Url)
Arcus__ApplicationInsights__MetricName=$(Arcus.ApplicationInsights.MetricName)
- APPLICATIONINSIGHTS_INSTRUMENTATIONKEY=$(Arcus.ApplicationInsights.InstrumentationKey)
+ APPLICATIONINSIGHTS_CONNECTION_STRING=InstrumentationKey=$(Arcus.ApplicationInsights.InstrumentationKey)
- template: 'run-new-project-from-template.yml'
parameters:
projectName: 'Arcus.Demo.AzureFunctions.Http'
@@ -104,7 +104,7 @@ stages:
Set-Content './Arcus.Demo.AzureFunctions.ServiceBus.Queue/Startup.cs'
envVars: |
ServiceBusConnectionString=$(Arcus.Worker.ServiceBus.Queue.ConnectionString)
- APPINSIGHTS_INSTRUMENTATIONKEY=$(Arcus.ApplicationInsights.InstrumentationKey)
+ APPLICATIONINSIGHTS_CONNECTION_STRING=InstrumentationKey=$(Arcus.ApplicationInsights.InstrumentationKey)
- template: 'run-new-project-from-template.yml'
parameters:
projectName: 'Arcus.Demo.AzureFunctions.ServiceBus.Topic'
@@ -116,7 +116,7 @@ stages:
Set-Content './Arcus.Demo.AzureFunctions.ServiceBus.Topic/Startup.cs'
envVars: |
ServiceBusConnectionString=$(Arcus.Worker.ServiceBus.Topic.ConnectionString)
- APPINSIGHTS_INSTRUMENTATIONKEY=$(Arcus.ApplicationInsights.InstrumentationKey)
+ APPLICATIONINSIGHTS_CONNECTION_STRING=InstrumentationKey=$(Arcus.ApplicationInsights.InstrumentationKey)
- task: UseDotNet@2
displayName: 'Import .NET Core SDK ($(DotNet.Sdk.PreviousVersion))'
inputs:
diff --git a/src/Arcus.Templates.AzureFunctions.Databricks.JobMetrics/Arcus.Templates.AzureFunctions.Databricks.JobMetrics.csproj b/src/Arcus.Templates.AzureFunctions.Databricks.JobMetrics/Arcus.Templates.AzureFunctions.Databricks.JobMetrics.csproj
index 7ea5a9cb..5f7032f2 100644
--- a/src/Arcus.Templates.AzureFunctions.Databricks.JobMetrics/Arcus.Templates.AzureFunctions.Databricks.JobMetrics.csproj
+++ b/src/Arcus.Templates.AzureFunctions.Databricks.JobMetrics/Arcus.Templates.AzureFunctions.Databricks.JobMetrics.csproj
@@ -57,15 +57,16 @@
-
+
-
-
+
+
+
diff --git a/src/Arcus.Templates.AzureFunctions.Databricks.JobMetrics/Startup.cs b/src/Arcus.Templates.AzureFunctions.Databricks.JobMetrics/Startup.cs
index 7135dc88..d142dd11 100644
--- a/src/Arcus.Templates.AzureFunctions.Databricks.JobMetrics/Startup.cs
+++ b/src/Arcus.Templates.AzureFunctions.Databricks.JobMetrics/Startup.cs
@@ -49,7 +49,9 @@ public override void Configure(IFunctionsHostBuilder builder)
private static LoggerConfiguration CreateLoggerConfiguration(IFunctionsHostBuilder builder)
{
+ IConfiguration appConfig = builder.GetContext().Configuration;
var configuration = new LoggerConfiguration()
+ .ReadFrom.Configuration(appConfig)
.MinimumLevel.Information()
.MinimumLevel.Override("Microsoft", LogEventLevel.Information)
.Enrich.FromLogContext()
@@ -57,11 +59,10 @@ private static LoggerConfiguration CreateLoggerConfiguration(IFunctionsHostBuild
.Enrich.WithVersion()
.WriteTo.Console();
- IConfiguration appConfig = builder.GetContext().Configuration;
- var instrumentationKey = appConfig.GetValue("APPINSIGHTS_INSTRUMENTATIONKEY");
- if (!string.IsNullOrWhiteSpace(instrumentationKey))
+ var connectionString = appConfig.GetValue("APPLICATIONINSIGHTS_CONNECTION_STRING");
+ if (!string.IsNullOrWhiteSpace(connectionString))
{
- configuration.WriteTo.AzureApplicationInsights(instrumentationKey);
+ configuration.WriteTo.AzureApplicationInsightsWithConnectionString(connectionString);
}
return configuration;
diff --git a/src/Arcus.Templates.AzureFunctions.Http/Arcus.Templates.AzureFunctions.Http.csproj b/src/Arcus.Templates.AzureFunctions.Http/Arcus.Templates.AzureFunctions.Http.csproj
index a1f53fc1..502d9a67 100644
--- a/src/Arcus.Templates.AzureFunctions.Http/Arcus.Templates.AzureFunctions.Http.csproj
+++ b/src/Arcus.Templates.AzureFunctions.Http/Arcus.Templates.AzureFunctions.Http.csproj
@@ -71,6 +71,7 @@
+
diff --git a/src/Arcus.Templates.AzureFunctions.Http/Startup.cs b/src/Arcus.Templates.AzureFunctions.Http/Startup.cs
index faca3269..b965bcf5 100644
--- a/src/Arcus.Templates.AzureFunctions.Http/Startup.cs
+++ b/src/Arcus.Templates.AzureFunctions.Http/Startup.cs
@@ -60,7 +60,9 @@ public override void Configure(IFunctionsHostBuilder builder)
private static LoggerConfiguration CreateLoggerConfiguration(IFunctionsHostBuilder builder)
{
+ IConfiguration appConfig = builder.GetContext().Configuration;
var configuration = new LoggerConfiguration()
+ .ReadFrom.Configuration(appConfig)
.MinimumLevel.Information()
.MinimumLevel.Override("Microsoft", LogEventLevel.Information)
.Enrich.FromLogContext()
@@ -68,7 +70,6 @@ private static LoggerConfiguration CreateLoggerConfiguration(IFunctionsHostBuild
.Enrich.WithVersion()
.WriteTo.Console();
- IConfiguration appConfig = builder.GetContext().Configuration;
var connectionString = appConfig.GetValue("APPLICATIONINSIGHTS_CONNECTION_STRING");
if (!string.IsNullOrWhiteSpace(connectionString))
{
diff --git a/src/Arcus.Templates.AzureFunctions.ServiceBus.Queue/Arcus.Templates.AzureFunctions.ServiceBus.Queue.csproj b/src/Arcus.Templates.AzureFunctions.ServiceBus.Queue/Arcus.Templates.AzureFunctions.ServiceBus.Queue.csproj
index 4635e617..3103a0a1 100644
--- a/src/Arcus.Templates.AzureFunctions.ServiceBus.Queue/Arcus.Templates.AzureFunctions.ServiceBus.Queue.csproj
+++ b/src/Arcus.Templates.AzureFunctions.ServiceBus.Queue/Arcus.Templates.AzureFunctions.ServiceBus.Queue.csproj
@@ -47,11 +47,11 @@
-
+
-
-
-
+
+
+
@@ -59,6 +59,7 @@
+
diff --git a/src/Arcus.Templates.AzureFunctions.ServiceBus.Queue/Startup.cs b/src/Arcus.Templates.AzureFunctions.ServiceBus.Queue/Startup.cs
index 17962b0d..d72de0bd 100644
--- a/src/Arcus.Templates.AzureFunctions.ServiceBus.Queue/Startup.cs
+++ b/src/Arcus.Templates.AzureFunctions.ServiceBus.Queue/Startup.cs
@@ -56,7 +56,9 @@ public override void Configure(IFunctionsHostBuilder builder)
private static LoggerConfiguration CreateLoggerConfiguration(IFunctionsHostBuilder builder)
{
+ IConfiguration appConfig = builder.GetContext().Configuration;
var logConfig = new LoggerConfiguration()
+ .ReadFrom.Configuration(appConfig)
.MinimumLevel.Information()
.MinimumLevel.Override("Microsoft", LogEventLevel.Information)
.Enrich.FromLogContext()
@@ -64,11 +66,10 @@ private static LoggerConfiguration CreateLoggerConfiguration(IFunctionsHostBuild
.Enrich.WithVersion()
.WriteTo.Console();
- IConfiguration appConfig = builder.GetContext().Configuration;
- var instrumentationKey = appConfig.GetValue("APPINSIGHTS_INSTRUMENTATIONKEY");
- if (!string.IsNullOrWhiteSpace(instrumentationKey))
+ var connectionString = appConfig.GetValue("APPLICATIONINSIGHTS_CONNECTION_STRING");
+ if (!string.IsNullOrWhiteSpace(connectionString))
{
- logConfig.WriteTo.AzureApplicationInsights(instrumentationKey);
+ logConfig.WriteTo.AzureApplicationInsightsWithConnectionString(connectionString);
}
return logConfig;
diff --git a/src/Arcus.Templates.AzureFunctions.ServiceBus.Topic/Arcus.Templates.AzureFunctions.ServiceBus.Topic.csproj b/src/Arcus.Templates.AzureFunctions.ServiceBus.Topic/Arcus.Templates.AzureFunctions.ServiceBus.Topic.csproj
index 79cdf994..5fc0dc9d 100644
--- a/src/Arcus.Templates.AzureFunctions.ServiceBus.Topic/Arcus.Templates.AzureFunctions.ServiceBus.Topic.csproj
+++ b/src/Arcus.Templates.AzureFunctions.ServiceBus.Topic/Arcus.Templates.AzureFunctions.ServiceBus.Topic.csproj
@@ -46,11 +46,11 @@
-
+
-
-
-
+
+
+
@@ -58,6 +58,7 @@
+
diff --git a/src/Arcus.Templates.AzureFunctions.ServiceBus.Topic/Startup.cs b/src/Arcus.Templates.AzureFunctions.ServiceBus.Topic/Startup.cs
index 2c23079b..bbbfbc7d 100644
--- a/src/Arcus.Templates.AzureFunctions.ServiceBus.Topic/Startup.cs
+++ b/src/Arcus.Templates.AzureFunctions.ServiceBus.Topic/Startup.cs
@@ -56,7 +56,9 @@ public override void Configure(IFunctionsHostBuilder builder)
private static LoggerConfiguration CreateLoggerConfiguration(IFunctionsHostBuilder builder)
{
+ IConfiguration appConfig = builder.GetContext().Configuration;
var logConfig = new LoggerConfiguration()
+ .ReadFrom.Configuration(appConfig)
.MinimumLevel.Information()
.MinimumLevel.Override("Microsoft", LogEventLevel.Information)
.Enrich.FromLogContext()
@@ -64,11 +66,10 @@ private static LoggerConfiguration CreateLoggerConfiguration(IFunctionsHostBuild
.Enrich.WithVersion()
.WriteTo.Console();
- IConfiguration appConfig = builder.GetContext().Configuration;
- var instrumentationKey = appConfig.GetValue("APPINSIGHTS_INSTRUMENTATIONKEY");
- if (!string.IsNullOrWhiteSpace(instrumentationKey))
+ var connectionString = appConfig.GetValue("APPLICATIONINSIGHTS_CONNECTION_STRING");
+ if (!string.IsNullOrWhiteSpace(connectionString))
{
- logConfig.WriteTo.AzureApplicationInsights(instrumentationKey);
+ logConfig.WriteTo.AzureApplicationInsightsWithConnectionString(connectionString);
}
return logConfig;
diff --git a/src/Arcus.Templates.ServiceBus.Queue/Arcus.Templates.ServiceBus.Queue.csproj b/src/Arcus.Templates.ServiceBus.Queue/Arcus.Templates.ServiceBus.Queue.csproj
index 69a6f67d..cb81dfa2 100644
--- a/src/Arcus.Templates.ServiceBus.Queue/Arcus.Templates.ServiceBus.Queue.csproj
+++ b/src/Arcus.Templates.ServiceBus.Queue/Arcus.Templates.ServiceBus.Queue.csproj
@@ -62,7 +62,8 @@
-
+
+
diff --git a/src/Arcus.Templates.ServiceBus.Queue/Program.cs b/src/Arcus.Templates.ServiceBus.Queue/Program.cs
index 6a0b276c..5ff85934 100644
--- a/src/Arcus.Templates.ServiceBus.Queue/Program.cs
+++ b/src/Arcus.Templates.ServiceBus.Queue/Program.cs
@@ -87,13 +87,15 @@ public static IHostBuilder CreateHostBuilder(string[] args)
private static async Task ConfigureSerilogAsync(IHost host)
{
+ var appConfiguration = host.Services.GetRequiredService();
var secretProvider = host.Services.GetRequiredService();
string connectionString = await secretProvider.GetRawSecretAsync(ApplicationInsightsConnectionStringKeyName);
var reloadLogger = (ReloadableLogger) Log.Logger;
reloadLogger.Reload(config =>
{
- config.MinimumLevel.Information()
+ config.ReadFrom.Configuration(appConfiguration)
+ .MinimumLevel.Information()
.MinimumLevel.Override("Microsoft", LogEventLevel.Information)
.Enrich.FromLogContext()
.Enrich.WithVersion()
diff --git a/src/Arcus.Templates.ServiceBus.Topic/Arcus.Templates.ServiceBus.Topic.csproj b/src/Arcus.Templates.ServiceBus.Topic/Arcus.Templates.ServiceBus.Topic.csproj
index 2026e52a..97b8003d 100644
--- a/src/Arcus.Templates.ServiceBus.Topic/Arcus.Templates.ServiceBus.Topic.csproj
+++ b/src/Arcus.Templates.ServiceBus.Topic/Arcus.Templates.ServiceBus.Topic.csproj
@@ -62,7 +62,8 @@
-
+
+
diff --git a/src/Arcus.Templates.ServiceBus.Topic/Program.cs b/src/Arcus.Templates.ServiceBus.Topic/Program.cs
index 84d82315..bcb1e847 100644
--- a/src/Arcus.Templates.ServiceBus.Topic/Program.cs
+++ b/src/Arcus.Templates.ServiceBus.Topic/Program.cs
@@ -86,13 +86,16 @@ public static IHostBuilder CreateHostBuilder(string[] args)
private static async Task ConfigureSerilogAsync(IHost host)
{
+ var appConfiguration = host.Services.GetRequiredService();
var secretProvider = host.Services.GetRequiredService();
string connectionString = await secretProvider.GetRawSecretAsync(ApplicationInsightsConnectionStringKeyName);
+
var reloadLogger = (ReloadableLogger) Log.Logger;
reloadLogger.Reload(config =>
{
- config.MinimumLevel.Information()
+ config.ReadFrom.Configuration(appConfiguration)
+ .MinimumLevel.Information()
.MinimumLevel.Override("Microsoft", LogEventLevel.Information)
.Enrich.FromLogContext()
.Enrich.WithVersion()
diff --git a/src/Arcus.Templates.Tests.Integration/AzureFunctions/AzureFunctionsProject.cs b/src/Arcus.Templates.Tests.Integration/AzureFunctions/AzureFunctionsProject.cs
index bbf3e550..7c8415ba 100644
--- a/src/Arcus.Templates.Tests.Integration/AzureFunctions/AzureFunctionsProject.cs
+++ b/src/Arcus.Templates.Tests.Integration/AzureFunctions/AzureFunctionsProject.cs
@@ -19,8 +19,7 @@ namespace Arcus.Templates.Tests.Integration.AzureFunctions
///
public abstract class AzureFunctionsProject : TemplateProject
{
- protected const string ApplicationInsightsInstrumentationKeyVariable = "APPINSIGHTS_INSTRUMENTATIONKEY",
- ApplicationInsightsConnectionStringKeyVariable = "APPLICATIONINSIGHTS_CONNECTION_STRING";
+ protected const string ApplicationInsightsConnectionStringKeyVariable = "APPLICATIONINSIGHTS_CONNECTION_STRING";
private static readonly HttpClient HttpClient = new HttpClient();
@@ -109,7 +108,6 @@ protected override ProcessStartInfo PrepareProjectRun(
};
Logger.WriteLine("> {0} {1}", processInfo.FileName, processInfo.Arguments);
- Environment.SetEnvironmentVariable(ApplicationInsightsInstrumentationKeyVariable, ApplicationInsightsConfig.InstrumentationKey);
Environment.SetEnvironmentVariable(ApplicationInsightsConnectionStringKeyVariable, $"InstrumentationKey={ApplicationInsightsConfig.InstrumentationKey}");
return processInfo;
}
@@ -164,7 +162,6 @@ await Policy.TimeoutAsync(TimeSpan.FromSeconds(30))
/// The flag indicating whether or not the additional tasks should be disposed.
protected override void Disposing(bool disposing)
{
- Environment.SetEnvironmentVariable(ApplicationInsightsInstrumentationKeyVariable, null);
Environment.SetEnvironmentVariable(ApplicationInsightsConnectionStringKeyVariable, null);
}
}
From ecb82b54d4332fbc202ac4369196a283fbd5c233 Mon Sep 17 00:00:00 2001
From: stijnmoreels <9039753+stijnmoreels@users.noreply.github.com>
Date: Mon, 1 Aug 2022 06:58:20 +0200
Subject: [PATCH 3/9] pr-fix: update with 'raw' getting content
---
build/templates/docker-integration-tests.yml | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/build/templates/docker-integration-tests.yml b/build/templates/docker-integration-tests.yml
index 3f74bb54..3c6823c1 100644
--- a/build/templates/docker-integration-tests.yml
+++ b/build/templates/docker-integration-tests.yml
@@ -43,7 +43,7 @@ stages:
projectAlias: 'arcus-servicebus-queue'
ports: '$(Arcus.ServiceBus.Queue.Worker.HealthPort):$(Arcus.ServiceBus.Queue.Worker.HealthPort)'
script: |
- Get-Content './Arcus.Demo.ServiceBus.Queue/Program.cs' |
+ Get-Content './Arcus.Demo.ServiceBus.Queue/Program.cs' -Raw |
Where-Object { $_ -notmatch '#error' -and $_ -notmatch 'secretProvider: null' -and $_ -notmatch 'EmptyMessageHandler' -and $_ -notmatch 'AddServiceBusQueueMessagePump' } |
Where-Object { $_ -notmatch 'AddAzureKeyVaultWithManagedIdentity' -and $_ -notmatch '#if DEBUG' -and $_ -notmatch '#endif' } |
Set-Content './Arcus.Demo.ServiceBus.Queue/Program.cs'
@@ -59,7 +59,7 @@ stages:
projectAlias: 'arcus-servicebus-topic'
ports: '$(Arcus.ServiceBus.Topic.Worker.HealthPort):$(Arcus.ServiceBus.Topic.Worker.HealthPort)'
script: |
- Get-Content './Arcus.Demo.ServiceBus.Topic/Program.cs' |
+ Get-Content './Arcus.Demo.ServiceBus.Topic/Program.cs' -Raw |
Where-Object { $_ -notmatch '#error' -and $_ -notmatch 'secretProvider: null' -and $_ -notmatch 'EmptyMessageHandler' -and $_ -notmatch 'AddServiceBusTopicMessagePump' } |
Where-Object { $_ -notmatch 'AddAzureKeyVaultWithManagedIdentity' -and $_ -notmatch '#if DEBUG' -and $_ -notmatch '#endif' } |
Set-Content './Arcus.Demo.ServiceBus.Topic/Program.cs'
@@ -75,7 +75,7 @@ stages:
projectAlias: 'arcus-az-databricks-jobmetrics'
ports: '$(Arcus.AzureFunctions.Databricks.HttpPort):80'
script: |
- Get-Content './Arcus.Demo.AzureFunctions.Databricks.JobMetrics/Startup.cs' |
+ Get-Content './Arcus.Demo.AzureFunctions.Databricks.JobMetrics/Startup.cs' -Raw |
Where-Object { $_ -notmatch '#error' } |
Set-Content './Arcus.Demo.AzureFunctions.Databricks.JobMetrics/Startup.cs'
envVars: |
@@ -88,7 +88,7 @@ stages:
projectAlias: 'arcus-az-func-http'
ports: '$(Arcus.AzureFunctions.Http.HttpPort):80'
script: |
- Get-Content './Arcus.Demo.AzureFunctions.Http/Startup.cs' |
+ Get-Content './Arcus.Demo.AzureFunctions.Http/Startup.cs' -Raw |
Where-Object { $_ -notmatch '#error' } |
Set-Content './Arcus.Demo.AzureFunctions.Http/Startup.cs'
envVars: |
@@ -99,7 +99,7 @@ stages:
projectAlias: 'arcus-az-func-servicebus-queue'
ports: '$(Arcus.AzureFunctions.ServiceBus.Queue.Port):$(Arcus.AzureFunctions.ServiceBus.Queue.Port)'
script: |
- Get-Content './Arcus.Demo.AzureFunctions.ServiceBus.Queue/Startup.cs' |
+ Get-Content './Arcus.Demo.AzureFunctions.ServiceBus.Queue/Startup.cs' -Raw |
Where-Object { $_ -notmatch '#error' } |
Set-Content './Arcus.Demo.AzureFunctions.ServiceBus.Queue/Startup.cs'
envVars: |
@@ -111,7 +111,7 @@ stages:
projectAlias: 'arcus-az-func-servicebus-topic'
ports: '$(Arcus.AzureFunctions.ServiceBus.Topic.Port):$(Arcus.AzureFunctions.ServiceBus.Topic.Port)'
script: |
- Get-Content './Arcus.Demo.AzureFunctions.ServiceBus.Topic/Startup.cs' |
+ Get-Content './Arcus.Demo.AzureFunctions.ServiceBus.Topic/Startup.cs' -Raw |
Where-Object { $_ -notmatch '#error' } |
Set-Content './Arcus.Demo.AzureFunctions.ServiceBus.Topic/Startup.cs'
envVars: |
From 8b129fccc3ad585549a0b835dadd010a53bfbbc4 Mon Sep 17 00:00:00 2001
From: stijnmoreels <9039753+stijnmoreels@users.noreply.github.com>
Date: Mon, 1 Aug 2022 06:59:24 +0200
Subject: [PATCH 4/9] pr-fix: treat warnings as errors in http trigger template
---
.../Arcus.Templates.AzureFunctions.Http.csproj | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/Arcus.Templates.AzureFunctions.Http/Arcus.Templates.AzureFunctions.Http.csproj b/src/Arcus.Templates.AzureFunctions.Http/Arcus.Templates.AzureFunctions.Http.csproj
index 502d9a67..a9a91006 100644
--- a/src/Arcus.Templates.AzureFunctions.Http/Arcus.Templates.AzureFunctions.Http.csproj
+++ b/src/Arcus.Templates.AzureFunctions.Http/Arcus.Templates.AzureFunctions.Http.csproj
@@ -26,7 +26,7 @@
false
..\Arcus.Templates.Orchestrator.dcproj
true
- NU5048;NU5125;NU5119;NU5128
+ NU5048;NU5125;NU5119
From 6b656902523c937dccf36306395acb15c19ddada Mon Sep 17 00:00:00 2001
From: stijnmoreels <9039753+stijnmoreels@users.noreply.github.com>
Date: Mon, 1 Aug 2022 07:00:58 +0200
Subject: [PATCH 5/9] pr-style: remove trailing spaces in docker integration
test yaml file
---
build/templates/docker-integration-tests.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/build/templates/docker-integration-tests.yml b/build/templates/docker-integration-tests.yml
index 3c6823c1..38a0dc73 100644
--- a/build/templates/docker-integration-tests.yml
+++ b/build/templates/docker-integration-tests.yml
@@ -43,7 +43,7 @@ stages:
projectAlias: 'arcus-servicebus-queue'
ports: '$(Arcus.ServiceBus.Queue.Worker.HealthPort):$(Arcus.ServiceBus.Queue.Worker.HealthPort)'
script: |
- Get-Content './Arcus.Demo.ServiceBus.Queue/Program.cs' -Raw |
+ Get-Content './Arcus.Demo.ServiceBus.Queue/Program.cs' -Raw |
Where-Object { $_ -notmatch '#error' -and $_ -notmatch 'secretProvider: null' -and $_ -notmatch 'EmptyMessageHandler' -and $_ -notmatch 'AddServiceBusQueueMessagePump' } |
Where-Object { $_ -notmatch 'AddAzureKeyVaultWithManagedIdentity' -and $_ -notmatch '#if DEBUG' -and $_ -notmatch '#endif' } |
Set-Content './Arcus.Demo.ServiceBus.Queue/Program.cs'
@@ -59,7 +59,7 @@ stages:
projectAlias: 'arcus-servicebus-topic'
ports: '$(Arcus.ServiceBus.Topic.Worker.HealthPort):$(Arcus.ServiceBus.Topic.Worker.HealthPort)'
script: |
- Get-Content './Arcus.Demo.ServiceBus.Topic/Program.cs' -Raw |
+ Get-Content './Arcus.Demo.ServiceBus.Topic/Program.cs' -Raw |
Where-Object { $_ -notmatch '#error' -and $_ -notmatch 'secretProvider: null' -and $_ -notmatch 'EmptyMessageHandler' -and $_ -notmatch 'AddServiceBusTopicMessagePump' } |
Where-Object { $_ -notmatch 'AddAzureKeyVaultWithManagedIdentity' -and $_ -notmatch '#if DEBUG' -and $_ -notmatch '#endif' } |
Set-Content './Arcus.Demo.ServiceBus.Topic/Program.cs'
From eb58240dde6d424fd09fd8ee0fe0cf7793c0de65 Mon Sep 17 00:00:00 2001
From: stijnmoreels <9039753+stijnmoreels@users.noreply.github.com>
Date: Mon, 1 Aug 2022 09:46:55 +0200
Subject: [PATCH 6/9] pr-fix: re-add no-warn requirement for az func
---
.../Arcus.Templates.AzureFunctions.Http.csproj | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/Arcus.Templates.AzureFunctions.Http/Arcus.Templates.AzureFunctions.Http.csproj b/src/Arcus.Templates.AzureFunctions.Http/Arcus.Templates.AzureFunctions.Http.csproj
index a9a91006..502d9a67 100644
--- a/src/Arcus.Templates.AzureFunctions.Http/Arcus.Templates.AzureFunctions.Http.csproj
+++ b/src/Arcus.Templates.AzureFunctions.Http/Arcus.Templates.AzureFunctions.Http.csproj
@@ -26,7 +26,7 @@
false
..\Arcus.Templates.Orchestrator.dcproj
true
- NU5048;NU5125;NU5119
+ NU5048;NU5125;NU5119;NU5128
From e7ca8a72f96749eafe49dfff5e795bedabf8173c Mon Sep 17 00:00:00 2001
From: stijnmoreels <9039753+stijnmoreels@users.noreply.github.com>
Date: Mon, 1 Aug 2022 11:42:40 +0200
Subject: [PATCH 7/9] pr-fix: update with simpler replacements
---
build/templates/docker-integration-tests.yml | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/build/templates/docker-integration-tests.yml b/build/templates/docker-integration-tests.yml
index 38a0dc73..de770a98 100644
--- a/build/templates/docker-integration-tests.yml
+++ b/build/templates/docker-integration-tests.yml
@@ -44,8 +44,7 @@ stages:
ports: '$(Arcus.ServiceBus.Queue.Worker.HealthPort):$(Arcus.ServiceBus.Queue.Worker.HealthPort)'
script: |
Get-Content './Arcus.Demo.ServiceBus.Queue/Program.cs' -Raw |
- Where-Object { $_ -notmatch '#error' -and $_ -notmatch 'secretProvider: null' -and $_ -notmatch 'EmptyMessageHandler' -and $_ -notmatch 'AddServiceBusQueueMessagePump' } |
- Where-Object { $_ -notmatch 'AddAzureKeyVaultWithManagedIdentity' -and $_ -notmatch '#if DEBUG' -and $_ -notmatch '#endif' } |
+ % { $_ -replace '#error', '#warning' -replace '#if DEBUG', '#if RELEASE' } |
Set-Content './Arcus.Demo.ServiceBus.Queue/Program.cs'
envVars: |
ARCUS_HEALTH_PORT=$(Arcus.ServiceBus.Queue.Worker.HealthPort)
@@ -60,8 +59,7 @@ stages:
ports: '$(Arcus.ServiceBus.Topic.Worker.HealthPort):$(Arcus.ServiceBus.Topic.Worker.HealthPort)'
script: |
Get-Content './Arcus.Demo.ServiceBus.Topic/Program.cs' -Raw |
- Where-Object { $_ -notmatch '#error' -and $_ -notmatch 'secretProvider: null' -and $_ -notmatch 'EmptyMessageHandler' -and $_ -notmatch 'AddServiceBusTopicMessagePump' } |
- Where-Object { $_ -notmatch 'AddAzureKeyVaultWithManagedIdentity' -and $_ -notmatch '#if DEBUG' -and $_ -notmatch '#endif' } |
+ % { $_ -replace '#error', '#warning' -replace '#if DEBUG', '#if RELEASE' } |
Set-Content './Arcus.Demo.ServiceBus.Topic/Program.cs'
envVars: |
ARCUS_HEALTH_PORT=$(Arcus.ServiceBus.Topic.Worker.HealthPort)
From 5f1e7665b85f805c910aa26a10fcbca4c3d93095 Mon Sep 17 00:00:00 2001
From: stijnmoreels <9039753+stijnmoreels@users.noreply.github.com>
Date: Mon, 1 Aug 2022 11:57:52 +0200
Subject: [PATCH 8/9] pr-fix: revert adding serilog load configuration
---
...cus.Templates.AzureFunctions.Databricks.JobMetrics.csproj | 1 -
.../Startup.cs | 1 -
.../Arcus.Templates.AzureFunctions.Http.csproj | 1 -
src/Arcus.Templates.AzureFunctions.Http/Startup.cs | 1 -
.../Arcus.Templates.AzureFunctions.ServiceBus.Queue.csproj | 1 -
.../Startup.cs | 1 -
.../Arcus.Templates.AzureFunctions.ServiceBus.Topic.csproj | 1 -
.../Startup.cs | 1 -
.../Arcus.Templates.ServiceBus.Queue.csproj | 1 -
src/Arcus.Templates.ServiceBus.Queue/Program.cs | 3 +--
.../Arcus.Templates.ServiceBus.Topic.csproj | 1 -
src/Arcus.Templates.ServiceBus.Topic/Program.cs | 5 +----
12 files changed, 2 insertions(+), 16 deletions(-)
diff --git a/src/Arcus.Templates.AzureFunctions.Databricks.JobMetrics/Arcus.Templates.AzureFunctions.Databricks.JobMetrics.csproj b/src/Arcus.Templates.AzureFunctions.Databricks.JobMetrics/Arcus.Templates.AzureFunctions.Databricks.JobMetrics.csproj
index 5f7032f2..20a58636 100644
--- a/src/Arcus.Templates.AzureFunctions.Databricks.JobMetrics/Arcus.Templates.AzureFunctions.Databricks.JobMetrics.csproj
+++ b/src/Arcus.Templates.AzureFunctions.Databricks.JobMetrics/Arcus.Templates.AzureFunctions.Databricks.JobMetrics.csproj
@@ -66,7 +66,6 @@
-
diff --git a/src/Arcus.Templates.AzureFunctions.Databricks.JobMetrics/Startup.cs b/src/Arcus.Templates.AzureFunctions.Databricks.JobMetrics/Startup.cs
index d142dd11..3e1fe865 100644
--- a/src/Arcus.Templates.AzureFunctions.Databricks.JobMetrics/Startup.cs
+++ b/src/Arcus.Templates.AzureFunctions.Databricks.JobMetrics/Startup.cs
@@ -51,7 +51,6 @@ private static LoggerConfiguration CreateLoggerConfiguration(IFunctionsHostBuild
{
IConfiguration appConfig = builder.GetContext().Configuration;
var configuration = new LoggerConfiguration()
- .ReadFrom.Configuration(appConfig)
.MinimumLevel.Information()
.MinimumLevel.Override("Microsoft", LogEventLevel.Information)
.Enrich.FromLogContext()
diff --git a/src/Arcus.Templates.AzureFunctions.Http/Arcus.Templates.AzureFunctions.Http.csproj b/src/Arcus.Templates.AzureFunctions.Http/Arcus.Templates.AzureFunctions.Http.csproj
index 502d9a67..a1f53fc1 100644
--- a/src/Arcus.Templates.AzureFunctions.Http/Arcus.Templates.AzureFunctions.Http.csproj
+++ b/src/Arcus.Templates.AzureFunctions.Http/Arcus.Templates.AzureFunctions.Http.csproj
@@ -71,7 +71,6 @@
-
diff --git a/src/Arcus.Templates.AzureFunctions.Http/Startup.cs b/src/Arcus.Templates.AzureFunctions.Http/Startup.cs
index b965bcf5..935a2296 100644
--- a/src/Arcus.Templates.AzureFunctions.Http/Startup.cs
+++ b/src/Arcus.Templates.AzureFunctions.Http/Startup.cs
@@ -62,7 +62,6 @@ private static LoggerConfiguration CreateLoggerConfiguration(IFunctionsHostBuild
{
IConfiguration appConfig = builder.GetContext().Configuration;
var configuration = new LoggerConfiguration()
- .ReadFrom.Configuration(appConfig)
.MinimumLevel.Information()
.MinimumLevel.Override("Microsoft", LogEventLevel.Information)
.Enrich.FromLogContext()
diff --git a/src/Arcus.Templates.AzureFunctions.ServiceBus.Queue/Arcus.Templates.AzureFunctions.ServiceBus.Queue.csproj b/src/Arcus.Templates.AzureFunctions.ServiceBus.Queue/Arcus.Templates.AzureFunctions.ServiceBus.Queue.csproj
index 99816050..4977c211 100644
--- a/src/Arcus.Templates.AzureFunctions.ServiceBus.Queue/Arcus.Templates.AzureFunctions.ServiceBus.Queue.csproj
+++ b/src/Arcus.Templates.AzureFunctions.ServiceBus.Queue/Arcus.Templates.AzureFunctions.ServiceBus.Queue.csproj
@@ -59,7 +59,6 @@
-
diff --git a/src/Arcus.Templates.AzureFunctions.ServiceBus.Queue/Startup.cs b/src/Arcus.Templates.AzureFunctions.ServiceBus.Queue/Startup.cs
index d72de0bd..58b59579 100644
--- a/src/Arcus.Templates.AzureFunctions.ServiceBus.Queue/Startup.cs
+++ b/src/Arcus.Templates.AzureFunctions.ServiceBus.Queue/Startup.cs
@@ -58,7 +58,6 @@ private static LoggerConfiguration CreateLoggerConfiguration(IFunctionsHostBuild
{
IConfiguration appConfig = builder.GetContext().Configuration;
var logConfig = new LoggerConfiguration()
- .ReadFrom.Configuration(appConfig)
.MinimumLevel.Information()
.MinimumLevel.Override("Microsoft", LogEventLevel.Information)
.Enrich.FromLogContext()
diff --git a/src/Arcus.Templates.AzureFunctions.ServiceBus.Topic/Arcus.Templates.AzureFunctions.ServiceBus.Topic.csproj b/src/Arcus.Templates.AzureFunctions.ServiceBus.Topic/Arcus.Templates.AzureFunctions.ServiceBus.Topic.csproj
index 75e41028..90a726cf 100644
--- a/src/Arcus.Templates.AzureFunctions.ServiceBus.Topic/Arcus.Templates.AzureFunctions.ServiceBus.Topic.csproj
+++ b/src/Arcus.Templates.AzureFunctions.ServiceBus.Topic/Arcus.Templates.AzureFunctions.ServiceBus.Topic.csproj
@@ -58,7 +58,6 @@
-
diff --git a/src/Arcus.Templates.AzureFunctions.ServiceBus.Topic/Startup.cs b/src/Arcus.Templates.AzureFunctions.ServiceBus.Topic/Startup.cs
index bbbfbc7d..ed36cdef 100644
--- a/src/Arcus.Templates.AzureFunctions.ServiceBus.Topic/Startup.cs
+++ b/src/Arcus.Templates.AzureFunctions.ServiceBus.Topic/Startup.cs
@@ -58,7 +58,6 @@ private static LoggerConfiguration CreateLoggerConfiguration(IFunctionsHostBuild
{
IConfiguration appConfig = builder.GetContext().Configuration;
var logConfig = new LoggerConfiguration()
- .ReadFrom.Configuration(appConfig)
.MinimumLevel.Information()
.MinimumLevel.Override("Microsoft", LogEventLevel.Information)
.Enrich.FromLogContext()
diff --git a/src/Arcus.Templates.ServiceBus.Queue/Arcus.Templates.ServiceBus.Queue.csproj b/src/Arcus.Templates.ServiceBus.Queue/Arcus.Templates.ServiceBus.Queue.csproj
index cb81dfa2..683ab461 100644
--- a/src/Arcus.Templates.ServiceBus.Queue/Arcus.Templates.ServiceBus.Queue.csproj
+++ b/src/Arcus.Templates.ServiceBus.Queue/Arcus.Templates.ServiceBus.Queue.csproj
@@ -62,7 +62,6 @@
-
diff --git a/src/Arcus.Templates.ServiceBus.Queue/Program.cs b/src/Arcus.Templates.ServiceBus.Queue/Program.cs
index 5ff85934..658054db 100644
--- a/src/Arcus.Templates.ServiceBus.Queue/Program.cs
+++ b/src/Arcus.Templates.ServiceBus.Queue/Program.cs
@@ -94,8 +94,7 @@ private static async Task ConfigureSerilogAsync(IHost host)
var reloadLogger = (ReloadableLogger) Log.Logger;
reloadLogger.Reload(config =>
{
- config.ReadFrom.Configuration(appConfiguration)
- .MinimumLevel.Information()
+ config.MinimumLevel.Information()
.MinimumLevel.Override("Microsoft", LogEventLevel.Information)
.Enrich.FromLogContext()
.Enrich.WithVersion()
diff --git a/src/Arcus.Templates.ServiceBus.Topic/Arcus.Templates.ServiceBus.Topic.csproj b/src/Arcus.Templates.ServiceBus.Topic/Arcus.Templates.ServiceBus.Topic.csproj
index 97b8003d..d036a595 100644
--- a/src/Arcus.Templates.ServiceBus.Topic/Arcus.Templates.ServiceBus.Topic.csproj
+++ b/src/Arcus.Templates.ServiceBus.Topic/Arcus.Templates.ServiceBus.Topic.csproj
@@ -62,7 +62,6 @@
-
diff --git a/src/Arcus.Templates.ServiceBus.Topic/Program.cs b/src/Arcus.Templates.ServiceBus.Topic/Program.cs
index bcb1e847..84d82315 100644
--- a/src/Arcus.Templates.ServiceBus.Topic/Program.cs
+++ b/src/Arcus.Templates.ServiceBus.Topic/Program.cs
@@ -86,16 +86,13 @@ public static IHostBuilder CreateHostBuilder(string[] args)
private static async Task ConfigureSerilogAsync(IHost host)
{
- var appConfiguration = host.Services.GetRequiredService();
var secretProvider = host.Services.GetRequiredService();
string connectionString = await secretProvider.GetRawSecretAsync(ApplicationInsightsConnectionStringKeyName);
-
var reloadLogger = (ReloadableLogger) Log.Logger;
reloadLogger.Reload(config =>
{
- config.ReadFrom.Configuration(appConfiguration)
- .MinimumLevel.Information()
+ config.MinimumLevel.Information()
.MinimumLevel.Override("Microsoft", LogEventLevel.Information)
.Enrich.FromLogContext()
.Enrich.WithVersion()
From 15bb4a3c0ea6e07cd3b8e0d1a75e31a6a7e993fd Mon Sep 17 00:00:00 2001
From: stijnmoreels <9039753+stijnmoreels@users.noreply.github.com>
Date: Mon, 1 Aug 2022 12:23:03 +0200
Subject: [PATCH 9/9] pr-fix: use safer replacement for az func project
templates
---
build/templates/docker-integration-tests.yml | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/build/templates/docker-integration-tests.yml b/build/templates/docker-integration-tests.yml
index de770a98..810d85fb 100644
--- a/build/templates/docker-integration-tests.yml
+++ b/build/templates/docker-integration-tests.yml
@@ -74,7 +74,7 @@ stages:
ports: '$(Arcus.AzureFunctions.Databricks.HttpPort):80'
script: |
Get-Content './Arcus.Demo.AzureFunctions.Databricks.JobMetrics/Startup.cs' -Raw |
- Where-Object { $_ -notmatch '#error' } |
+ % { $_ -replace '#error', '#warning' -replace '#if DEBUG', '#if RELEASE' } |
Set-Content './Arcus.Demo.AzureFunctions.Databricks.JobMetrics/Startup.cs'
envVars: |
Arcus__Databricks__Url=$(Arcus.Databricks.Url)
@@ -87,7 +87,7 @@ stages:
ports: '$(Arcus.AzureFunctions.Http.HttpPort):80'
script: |
Get-Content './Arcus.Demo.AzureFunctions.Http/Startup.cs' -Raw |
- Where-Object { $_ -notmatch '#error' } |
+ % { $_ -replace '#error', '#warning' -replace '#if DEBUG', '#if RELEASE' } |
Set-Content './Arcus.Demo.AzureFunctions.Http/Startup.cs'
envVars: |
APPLICATIONINSIGHTS_CONNECTION_STRING=InstrumentationKey=$(Arcus.ApplicationInsights.InstrumentationKey)
@@ -98,7 +98,7 @@ stages:
ports: '$(Arcus.AzureFunctions.ServiceBus.Queue.Port):$(Arcus.AzureFunctions.ServiceBus.Queue.Port)'
script: |
Get-Content './Arcus.Demo.AzureFunctions.ServiceBus.Queue/Startup.cs' -Raw |
- Where-Object { $_ -notmatch '#error' } |
+ % { $_ -replace '#error', '#warning' -replace '#if DEBUG', '#if RELEASE' } |
Set-Content './Arcus.Demo.AzureFunctions.ServiceBus.Queue/Startup.cs'
envVars: |
ServiceBusConnectionString=$(Arcus.Worker.ServiceBus.Queue.ConnectionString)
@@ -110,7 +110,7 @@ stages:
ports: '$(Arcus.AzureFunctions.ServiceBus.Topic.Port):$(Arcus.AzureFunctions.ServiceBus.Topic.Port)'
script: |
Get-Content './Arcus.Demo.AzureFunctions.ServiceBus.Topic/Startup.cs' -Raw |
- Where-Object { $_ -notmatch '#error' } |
+ % { $_ -replace '#error', '#warning' -replace '#if DEBUG', '#if RELEASE' } |
Set-Content './Arcus.Demo.AzureFunctions.ServiceBus.Topic/Startup.cs'
envVars: |
ServiceBusConnectionString=$(Arcus.Worker.ServiceBus.Topic.ConnectionString)