diff --git a/source/Calamari.Tests/Calamari.Tests.csproj b/source/Calamari.Tests/Calamari.Tests.csproj index 53a3962..0c33bd7 100644 --- a/source/Calamari.Tests/Calamari.Tests.csproj +++ b/source/Calamari.Tests/Calamari.Tests.csproj @@ -7,7 +7,7 @@ - + diff --git a/source/Calamari/Calamari.csproj b/source/Calamari/Calamari.csproj index e65d0f6..6f36b19 100644 --- a/source/Calamari/Calamari.csproj +++ b/source/Calamari/Calamari.csproj @@ -8,9 +8,9 @@ net452 - - - + + + diff --git a/source/Sashimi.Tests/AzureWebAppServiceMessageHandlerFixture.cs b/source/Sashimi.Tests/AzureWebAppServiceMessageHandlerFixture.cs index 576da23..6ea22ea 100644 --- a/source/Sashimi.Tests/AzureWebAppServiceMessageHandlerFixture.cs +++ b/source/Sashimi.Tests/AzureWebAppServiceMessageHandlerFixture.cs @@ -10,7 +10,6 @@ using Sashimi.Server.Contracts; using Sashimi.Server.Contracts.Endpoints; using Sashimi.Server.Contracts.ServiceMessages; -using YamlDotNet.Core; using AzureWebAppServiceMessageNames = Sashimi.AzureWebApp.AzureWebAppServiceMessageHandler.AzureWebAppServiceMessageNames; namespace Sashimi.AzureWebApp.Tests @@ -18,12 +17,12 @@ namespace Sashimi.AzureWebApp.Tests public class AzureWebAppServiceMessageHandlerFixture { ICreateTargetServiceMessageHandler serviceMessageHandler; - ILog logger; + ISystemLog logger; [SetUp] public void SetUp() { - logger = Substitute.For(); + logger = Substitute.For(); serviceMessageHandler = new AzureWebAppServiceMessageHandler(logger); } diff --git a/source/Sashimi.Tests/Sashimi.Tests.csproj b/source/Sashimi.Tests/Sashimi.Tests.csproj index 749c3b6..b4ae209 100644 --- a/source/Sashimi.Tests/Sashimi.Tests.csproj +++ b/source/Sashimi.Tests/Sashimi.Tests.csproj @@ -17,9 +17,9 @@ - - - + + + \ No newline at end of file diff --git a/source/Sashimi/AzureActionHandlerExtensions.cs b/source/Sashimi/AzureActionHandlerExtensions.cs index 65dd23f..a8dc6fd 100644 --- a/source/Sashimi/AzureActionHandlerExtensions.cs +++ b/source/Sashimi/AzureActionHandlerExtensions.cs @@ -1,4 +1,5 @@ using System; +using Octopus.Server.Extensibility.HostServices.Diagnostics; using Sashimi.Azure.Accounts; using Sashimi.Server.Contracts.ActionHandlers; using Sashimi.Server.Contracts.CommandBuilders; @@ -7,12 +8,12 @@ namespace Sashimi.AzureWebApp { static class AzureActionHandlerExtensions { - - public static ICalamariCommandBuilder WithCheckAccountIsNotManagementCertificate(this ICalamariCommandBuilder builder, IActionHandlerContext context) + + public static ICalamariCommandBuilder WithCheckAccountIsNotManagementCertificate(this ICalamariCommandBuilder builder, IActionHandlerContext context, ITaskLog taskLog) { if (context.Variables.Get(SpecialVariables.AccountType) != AccountTypes.AzureServicePrincipalAccountType.ToString()) { - context.Log.Warn("Azure have announced they will be retiring Service Management API support on June 30th 2018. Please switch to using Service Principals for your Octopus Azure accounts https://g.octopushq.com/AzureServicePrincipalAccount"); + taskLog.Warn("Azure have announced they will be retiring Service Management API support on June 30th 2018. Please switch to using Service Principals for your Octopus Azure accounts https://g.octopushq.com/AzureServicePrincipalAccount"); } return builder; diff --git a/source/Sashimi/AzureWebAppActionHandler.cs b/source/Sashimi/AzureWebAppActionHandler.cs index 12ff10f..4fb568f 100644 --- a/source/Sashimi/AzureWebAppActionHandler.cs +++ b/source/Sashimi/AzureWebAppActionHandler.cs @@ -1,5 +1,6 @@ using System; using Octopus.CoreUtilities; +using Octopus.Server.Extensibility.HostServices.Diagnostics; using Sashimi.AzureScripting; using Sashimi.AzureWebApp.Endpoints; using Sashimi.Server.Contracts.ActionHandlers; @@ -18,7 +19,7 @@ class AzureWebAppActionHandler : IActionHandlerWithAccount public ActionHandlerCategory[] Categories => new[] { ActionHandlerCategory.BuiltInStep, AzureConstants.AzureActionHandlerCategory, ActionHandlerCategory.Package }; public string[] StepBasedVariableNameForAccountIds { get; } = {SpecialVariables.Action.Azure.AccountId}; - public IActionHandlerResult Execute(IActionHandlerContext context) + public IActionHandlerResult Execute(IActionHandlerContext context, ITaskLog taskLog) { var isLegacyAction = !string.IsNullOrWhiteSpace(context.Variables.Get(SpecialVariables.Action.Azure.AccountId)); @@ -29,10 +30,10 @@ public IActionHandlerResult Execute(IActionHandlerContext context) } return context.CalamariCommand(AzureConstants.CalamariAzure, "deploy-azure-web") - .WithCheckAccountIsNotManagementCertificate(context) - .WithAzureTools(context) + .WithCheckAccountIsNotManagementCertificate(context, taskLog) + .WithAzureTools(context, taskLog) .WithStagedPackageArgument() - .Execute(); + .Execute(taskLog); } } } \ No newline at end of file diff --git a/source/Sashimi/AzureWebAppHealthCheckActionHandler.cs b/source/Sashimi/AzureWebAppHealthCheckActionHandler.cs index 4a93453..7b62e87 100644 --- a/source/Sashimi/AzureWebAppHealthCheckActionHandler.cs +++ b/source/Sashimi/AzureWebAppHealthCheckActionHandler.cs @@ -1,4 +1,5 @@ -using Sashimi.Server.Contracts.ActionHandlers; +using Octopus.Server.Extensibility.HostServices.Diagnostics; +using Sashimi.Server.Contracts.ActionHandlers; using Sashimi.Server.Contracts.Calamari; namespace Sashimi.AzureWebApp @@ -17,11 +18,11 @@ class AzureWebAppHealthCheckActionHandler : IActionHandlerWithAccount public ActionHandlerCategory[] Categories => new[] { ActionHandlerCategory.BuiltInStep, ActionHandlerCategory.Azure }; public string[] StepBasedVariableNameForAccountIds { get; } = {SpecialVariables.Action.Azure.AccountId}; - public IActionHandlerResult Execute(IActionHandlerContext context) + public IActionHandlerResult Execute(IActionHandlerContext context, ITaskLog taskLog) { return context.CalamariCommand(CalamariAzure, "health-check") - .WithCheckAccountIsNotManagementCertificate(context) - .Execute(); + .WithCheckAccountIsNotManagementCertificate(context, taskLog) + .Execute(taskLog); } } } \ No newline at end of file diff --git a/source/Sashimi/AzureWebAppPackageContributor.cs b/source/Sashimi/AzureWebAppPackageContributor.cs index ece738f..a975e71 100644 --- a/source/Sashimi/AzureWebAppPackageContributor.cs +++ b/source/Sashimi/AzureWebAppPackageContributor.cs @@ -1,4 +1,5 @@ using System; +using Octopus.Server.Extensibility.HostServices.Diagnostics; using Sashimi.AzureWebApp.Endpoints; using Sashimi.Server.Contracts; using Sashimi.Server.Contracts.ActionHandlers; @@ -7,7 +8,7 @@ namespace Sashimi.AzureWebApp { class AzureWebAppPackageContributor : IContributeToPackageDeployment { - public PackageContributionResult Contribute(DeploymentTargetType deploymentTargetType, IActionHandlerContext context) + public PackageContributionResult Contribute(DeploymentTargetType deploymentTargetType, IActionHandlerContext context, ITaskLog taskLog) { return deploymentTargetType == AzureWebAppEndpoint.AzureWebAppDeploymentTargetType ? PackageContributionResult.RedirectToHandler() diff --git a/source/Sashimi/AzureWebAppServiceMessageHandler.cs b/source/Sashimi/AzureWebAppServiceMessageHandler.cs index b3df42d..33b2f18 100644 --- a/source/Sashimi/AzureWebAppServiceMessageHandler.cs +++ b/source/Sashimi/AzureWebAppServiceMessageHandler.cs @@ -13,9 +13,9 @@ namespace Sashimi.AzureWebApp { class AzureWebAppServiceMessageHandler : ICreateTargetServiceMessageHandler { - readonly ILog logger; + readonly ISystemLog logger; - public AzureWebAppServiceMessageHandler(ILog logger) + public AzureWebAppServiceMessageHandler(ISystemLog logger) { this.logger = logger; } diff --git a/source/Sashimi/Sashimi.csproj b/source/Sashimi/Sashimi.csproj index d1fb252..e92eb25 100644 --- a/source/Sashimi/Sashimi.csproj +++ b/source/Sashimi/Sashimi.csproj @@ -22,9 +22,10 @@ - - - - + + + + +