From be7637e784bd821c01ea0c6574fb2c03118cc9c5 Mon Sep 17 00:00:00 2001 From: Menno van Lavieren Date: Tue, 17 Oct 2017 13:29:16 +0200 Subject: [PATCH 1/6] RDB-136 Flow tabel wordt niet meer opgeruimd Bij een exceptie in Flow Refactoring om de actie van de Exceptionstrategie door te geven aan de cleanup stack Megre bug geresolved --- Tapeti.Flow/Default/FlowCleanupMiddleware.cs | 5 +- Tapeti.Flow/Default/FlowStarter.cs | 29 ++++++- Tapeti/Config/ICleanupMiddleware.cs | 2 +- Tapeti/Config/IExceptionStrategyContext.cs | 17 +++++ Tapeti/Connection/TapetiConsumer.cs | 38 ++++++++-- Tapeti/Default/ExceptionStrategyContext.cs | 40 ++++++++++ Tapeti/Default/NackExceptionStrategy.cs | 17 +++++ Tapeti/Default/RequeueExceptionStrategy.cs | 5 +- Tapeti/HandlingResult.cs | 79 ++++++++++++++++++++ Tapeti/IExceptionStrategy.cs | 8 +- Tapeti/MessageFutureAction.cs | 15 ++++ Tapeti/Tapeti.csproj | 5 ++ Tapeti/TapetiConfig.cs | 2 +- 13 files changed, 243 insertions(+), 19 deletions(-) create mode 100644 Tapeti/Config/IExceptionStrategyContext.cs create mode 100644 Tapeti/Default/ExceptionStrategyContext.cs create mode 100644 Tapeti/Default/NackExceptionStrategy.cs create mode 100644 Tapeti/HandlingResult.cs create mode 100644 Tapeti/MessageFutureAction.cs diff --git a/Tapeti.Flow/Default/FlowCleanupMiddleware.cs b/Tapeti.Flow/Default/FlowCleanupMiddleware.cs index e0420c8..6ac310b 100644 --- a/Tapeti.Flow/Default/FlowCleanupMiddleware.cs +++ b/Tapeti.Flow/Default/FlowCleanupMiddleware.cs @@ -9,7 +9,7 @@ namespace Tapeti.Flow.Default { public class FlowCleanupMiddleware : ICleanupMiddleware { - public async Task Handle(IMessageContext context, ConsumeResponse response) + public async Task Handle(IMessageContext context, HandlingResult handlingResult) { object flowContextObj; if (!context.Items.TryGetValue(ContextItems.FlowContext, out flowContextObj)) @@ -18,7 +18,8 @@ namespace Tapeti.Flow.Default if (flowContext.FlowStateLock != null) { - if (response == ConsumeResponse.Nack) + if (handlingResult.ConsumeResponse == ConsumeResponse.Nack + || handlingResult.MessageAction == MessageAction.ErrorLog) { await flowContext.FlowStateLock.DeleteFlowState(); } diff --git a/Tapeti.Flow/Default/FlowStarter.cs b/Tapeti.Flow/Default/FlowStarter.cs index 215decb..eedd1e4 100644 --- a/Tapeti.Flow/Default/FlowStarter.cs +++ b/Tapeti.Flow/Default/FlowStarter.cs @@ -52,7 +52,34 @@ namespace Tapeti.Flow.Default }; var flowHandler = config.DependencyResolver.Resolve(); - await flowHandler.Execute(context, yieldPoint); + HandlingResultBuilder handlingResult = new HandlingResultBuilder + { + ConsumeResponse = ConsumeResponse.Nack, + }; + try + { + await flowHandler.Execute(context, yieldPoint); + handlingResult.ConsumeResponse = ConsumeResponse.Ack; + } + finally + { + await RunCleanup(context, handlingResult.ToHandlingResult()); + } + } + + private async Task RunCleanup(MessageContext context, HandlingResult handlingResult) + { + foreach (var handler in config.CleanupMiddleware) + { + try + { + await handler.Handle(context, handlingResult); + } + catch (Exception eCleanup) + { + logger.HandlerException(eCleanup); + } + } } diff --git a/Tapeti/Config/ICleanupMiddleware.cs b/Tapeti/Config/ICleanupMiddleware.cs index e056ad0..290236e 100644 --- a/Tapeti/Config/ICleanupMiddleware.cs +++ b/Tapeti/Config/ICleanupMiddleware.cs @@ -8,6 +8,6 @@ namespace Tapeti.Config { public interface ICleanupMiddleware { - Task Handle(IMessageContext context, ConsumeResponse response); + Task Handle(IMessageContext context, HandlingResult handlingResult); } } diff --git a/Tapeti/Config/IExceptionStrategyContext.cs b/Tapeti/Config/IExceptionStrategyContext.cs new file mode 100644 index 0000000..2a99af9 --- /dev/null +++ b/Tapeti/Config/IExceptionStrategyContext.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tapeti.Config +{ + public interface IExceptionStrategyContext + { + IMessageContext MessageContext { get; } + + Exception Exception { get; } + + HandlingResultBuilder HandlingResult { get; set; } + } +} diff --git a/Tapeti/Connection/TapetiConsumer.cs b/Tapeti/Connection/TapetiConsumer.cs index 3beb9ed..03355f5 100644 --- a/Tapeti/Connection/TapetiConsumer.cs +++ b/Tapeti/Connection/TapetiConsumer.cs @@ -44,7 +44,7 @@ namespace Tapeti.Connection { ExceptionDispatchInfo exception = null; MessageContext context = null; - ConsumeResponse response = ConsumeResponse.Nack; + HandlingResult handlingResult = null; try { try @@ -59,7 +59,11 @@ namespace Tapeti.Connection await DispatchMesage(context, body); - response = ConsumeResponse.Ack; + handlingResult = new HandlingResult + { + ConsumeResponse = ConsumeResponse.Ack, + MessageAction = MessageAction.None + }; } catch (Exception eDispatch) { @@ -67,7 +71,11 @@ namespace Tapeti.Connection logger.HandlerException(eDispatch); try { - response = exceptionStrategy.HandleException(null, exception.SourceException); + var exceptionStrategyContext = new ExceptionStrategyContext(context, exception.SourceException); + + exceptionStrategy.HandleException(exceptionStrategyContext); + + handlingResult = exceptionStrategyContext.HandlingResult.ToHandlingResult(); } catch (Exception eStrategy) { @@ -76,7 +84,15 @@ namespace Tapeti.Connection } try { - await RunCleanup(context, response); + if (handlingResult == null) + { + handlingResult = new HandlingResult + { + ConsumeResponse = ConsumeResponse.Nack, + MessageAction = MessageAction.None + }; + } + await RunCleanup(context, handlingResult); } catch (Exception eCleanup) { @@ -87,7 +103,15 @@ namespace Tapeti.Connection { try { - await worker.Respond(deliveryTag, response); + if (handlingResult == null) + { + handlingResult = new HandlingResult + { + ConsumeResponse = ConsumeResponse.Nack, + MessageAction = MessageAction.None + }; + } + await worker.Respond(deliveryTag, handlingResult.ConsumeResponse); } catch (Exception eRespond) { @@ -108,13 +132,13 @@ namespace Tapeti.Connection }); } - private async Task RunCleanup(MessageContext context, ConsumeResponse response) + private async Task RunCleanup(MessageContext context, HandlingResult handlingResult) { foreach(var handler in cleanupMiddleware) { try { - await handler.Handle(context, response); + await handler.Handle(context, handlingResult); } catch (Exception eCleanup) { diff --git a/Tapeti/Default/ExceptionStrategyContext.cs b/Tapeti/Default/ExceptionStrategyContext.cs new file mode 100644 index 0000000..fc24ab3 --- /dev/null +++ b/Tapeti/Default/ExceptionStrategyContext.cs @@ -0,0 +1,40 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tapeti.Config; + +namespace Tapeti.Default +{ + public class ExceptionStrategyContext : IExceptionStrategyContext + { + internal ExceptionStrategyContext(IMessageContext messageContext, Exception exception) + { + MessageContext = messageContext; + Exception = exception; + } + + public IMessageContext MessageContext { get; } + + public Exception Exception { get; } + + private HandlingResultBuilder handlingResult; + public HandlingResultBuilder HandlingResult + { + get + { + if (handlingResult == null) + { + handlingResult = new HandlingResultBuilder(); + } + return handlingResult; + } + + set + { + handlingResult = value; + } + } + } +} diff --git a/Tapeti/Default/NackExceptionStrategy.cs b/Tapeti/Default/NackExceptionStrategy.cs new file mode 100644 index 0000000..48babe3 --- /dev/null +++ b/Tapeti/Default/NackExceptionStrategy.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tapeti.Config; + +namespace Tapeti.Default +{ + public class NackExceptionStrategy : IExceptionStrategy + { + public void HandleException(IExceptionStrategyContext context) + { + context.HandlingResult.ConsumeResponse = ConsumeResponse.Nack; + } + } +} diff --git a/Tapeti/Default/RequeueExceptionStrategy.cs b/Tapeti/Default/RequeueExceptionStrategy.cs index 6a20ca7..afa3143 100644 --- a/Tapeti/Default/RequeueExceptionStrategy.cs +++ b/Tapeti/Default/RequeueExceptionStrategy.cs @@ -5,10 +5,9 @@ namespace Tapeti.Default { public class RequeueExceptionStrategy : IExceptionStrategy { - public ConsumeResponse HandleException(IMessageContext context, Exception exception) + public void HandleException(IExceptionStrategyContext context) { - // TODO log exception - return ConsumeResponse.Requeue; + context.HandlingResult.ConsumeResponse = ConsumeResponse.Requeue; } } } diff --git a/Tapeti/HandlingResult.cs b/Tapeti/HandlingResult.cs new file mode 100644 index 0000000..e1bb575 --- /dev/null +++ b/Tapeti/HandlingResult.cs @@ -0,0 +1,79 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tapeti +{ + public class HandlingResult + { + public HandlingResult() + { + ConsumeResponse = ConsumeResponse.Nack; + MessageAction = MessageAction.None; + } + + /// + /// Determines which response will be given to the message bus from where the message originates. + /// + public ConsumeResponse ConsumeResponse { get; internal set; } + + /// + /// Registers which action the Exception strategy has taken or will take to handle the error condition + /// on the message. This is important to know for cleanup handlers registered by middleware. + /// + public MessageAction MessageAction { get; internal set; } + + } + + public class HandlingResultBuilder + { + private static readonly HandlingResult Default = new HandlingResult(); + + private HandlingResult data = Default; + + public ConsumeResponse ConsumeResponse { + get + { + return data.ConsumeResponse; + } + set + { + GetWritableData().ConsumeResponse = value; + } + } + + public MessageAction MessageAction + { + get + { + return data.MessageAction; + } + set + { + GetWritableData().MessageAction = value; + } + } + + public HandlingResult ToHandlingResult() + { + if (data == Default) + { + return new HandlingResult(); + } + var result = GetWritableData(); + data = Default; + return result; + } + + private HandlingResult GetWritableData() + { + if (data == Default) + { + data = new HandlingResult(); + } + return data; + } + } +} diff --git a/Tapeti/IExceptionStrategy.cs b/Tapeti/IExceptionStrategy.cs index 7b46af6..7525324 100644 --- a/Tapeti/IExceptionStrategy.cs +++ b/Tapeti/IExceptionStrategy.cs @@ -8,9 +8,9 @@ namespace Tapeti /// /// Called when an exception occurs while handling a message. /// - /// The message context if available. May be null! - /// The exception instance - /// The ConsumeResponse to determine whether to requeue, dead-letter (nack) or simply ack the message. - ConsumeResponse HandleException(IMessageContext context, Exception exception); + /// The exception strategy context containing the necessary data including the message context and the thrown exception. + /// Also the response to the message can be set. + /// If there is any other handling of the message than the expected default than HandlingResult.MessageFutureAction must be set accordingly. + void HandleException(IExceptionStrategyContext context); } } diff --git a/Tapeti/MessageFutureAction.cs b/Tapeti/MessageFutureAction.cs new file mode 100644 index 0000000..7cbd319 --- /dev/null +++ b/Tapeti/MessageFutureAction.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tapeti +{ + public enum MessageAction + { + None = 1, + ErrorLog = 2, + Retry = 3, + } +} diff --git a/Tapeti/Tapeti.csproj b/Tapeti/Tapeti.csproj index f41e903..5ce8b98 100644 --- a/Tapeti/Tapeti.csproj +++ b/Tapeti/Tapeti.csproj @@ -53,6 +53,7 @@ + @@ -64,6 +65,9 @@ + + + @@ -84,6 +88,7 @@ + diff --git a/Tapeti/TapetiConfig.cs b/Tapeti/TapetiConfig.cs index b8ed17b..117c4c9 100644 --- a/Tapeti/TapetiConfig.cs +++ b/Tapeti/TapetiConfig.cs @@ -143,7 +143,7 @@ namespace Tapeti container.RegisterDefault(); container.RegisterDefault(); container.RegisterDefault(); - container.RegisterDefault(); + container.RegisterDefault(); } From 9b0984ec5a2d0b7aef071b2ec5f14040c5f7cd9b Mon Sep 17 00:00:00 2001 From: Menno van Lavieren Date: Tue, 17 Oct 2017 13:46:06 +0200 Subject: [PATCH 2/6] RDB-136 Flow tabel wordt niet meer opgeruimd Bij een exceptie in Flow Refactoring om de actie van de Exceptionstrategie door te geven aan de cleanup stack Deel 2 Megre bug geresolved --- Tapeti.Flow/Default/FlowStarter.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Tapeti.Flow/Default/FlowStarter.cs b/Tapeti.Flow/Default/FlowStarter.cs index eedd1e4..69adc53 100644 --- a/Tapeti.Flow/Default/FlowStarter.cs +++ b/Tapeti.Flow/Default/FlowStarter.cs @@ -10,11 +10,13 @@ namespace Tapeti.Flow.Default public class FlowStarter : IFlowStarter { private readonly IConfig config; + private readonly ILogger logger; - public FlowStarter(IConfig config) + public FlowStarter(IConfig config, ILogger logger) { this.config = config; + this.logger = logger; } From 0924084a0061199a2e83d5bb35c208fa3253ea5f Mon Sep 17 00:00:00 2001 From: Mark van Renswoude Date: Tue, 17 Oct 2017 17:24:53 +0200 Subject: [PATCH 3/6] AppVeyor build implementation --- Publish.ps1 | 55 ------------------- README.md | 11 ++++ Tapeti.Annotations/Tapeti.Annotations.nuspec | 32 +++++------ .../Tapeti.DataAnnotations.nuspec | 38 ++++++------- Tapeti.Flow.SQL/Tapeti.Flow.SQL.nuspec | 40 +++++++------- Tapeti.Flow/Tapeti.Flow.nuspec | 40 +++++++------- .../Tapeti.SimpleInjector.nuspec | 38 ++++++------- Tapeti/Tapeti.nuspec | 38 ++++++------- appveyor.yml | 40 ++++++++++++++ 9 files changed, 164 insertions(+), 168 deletions(-) delete mode 100644 Publish.ps1 create mode 100644 appveyor.yml diff --git a/Publish.ps1 b/Publish.ps1 deleted file mode 100644 index 7646e36..0000000 --- a/Publish.ps1 +++ /dev/null @@ -1,55 +0,0 @@ -param([switch]$nopush) - - -function pack -{ - param([string]$project) - - Write-Host "Packing $($project).csproj" -Foreground Blue - NuGet.exe pack "$($project)\$($project).csproj" -Build -OutputDir publish -Version "$($version.NuGetVersion)" -Properties depversion="$($version.NuGetVersion)" -} - - -function push -{ - param([string]$project) - - Write-Host "Pushing $($project).csproj" -Foreground Blue - NuGet.exe push "publish\X2Software.$($project).$($version.NuGetVersion).nupkg" -apikey "$($nugetkey)" -Source https://www.nuget.org/api/v2/package -} - - -$projects = @( - "Tapeti.Annotations", - "Tapeti", - "Tapeti.DataAnnotations", - "Tapeti.Flow", - "Tapeti.SimpleInjector" -) - - -New-Item -Path publish -Type directory -Force | Out-Null - -$version = GitVersion.exe | Out-String | ConvertFrom-Json -$nugetkey = Get-Content .nuget.apikey - - -Write-Host "Publishing version $($version.NuGetVersion) using API key $($nugetkey)"-Foreground Cyan - -foreach ($project in $projects) -{ - pack($project) -} - - -if ($nopush -eq $false) -{ - foreach ($project in $projects) - { - push($project) - } -} -else -{ - Write-Host "Skipping push" -Foreground Blue -} \ No newline at end of file diff --git a/README.md b/README.md index 4d31212..2b8f6ee 100644 --- a/README.md +++ b/README.md @@ -6,3 +6,14 @@ The documentation for Tapeti is available on Read the Docs: [Master branch](http://tapeti.readthedocs.io/en/stable/)
[![Documentation Status](https://readthedocs.org/projects/tapeti/badge/?version=stable)](http://tapeti.readthedocs.io/en/stable/?badge=stable) + + +## Builds +Builds are automatically run using AppVeyor, with the resulting packages being pushed to NuGet. + + +Latest build +[![Build status](https://ci.appveyor.com/api/projects/status/p5w9yr4xlhvoy02i?svg=true)](https://ci.appveyor.com/project/MvRens/tapeti) + +Master build +[![Build status](https://ci.appveyor.com/api/projects/status/p5w9yr4xlhvoy02i/branch/master?svg=true)](https://ci.appveyor.com/project/MvRens/tapeti/branch/master) diff --git a/Tapeti.Annotations/Tapeti.Annotations.nuspec b/Tapeti.Annotations/Tapeti.Annotations.nuspec index acceaf2..d2684ac 100644 --- a/Tapeti.Annotations/Tapeti.Annotations.nuspec +++ b/Tapeti.Annotations/Tapeti.Annotations.nuspec @@ -1,17 +1,17 @@ - - - - X2Software.Tapeti.Annotations - $version$ - $title$ - Mark van Renswoude - Mark van Renswoude - https://git.x2software.net/pub/tapeti/raw/master/UNLICENSE - https://git.x2software.net/pub/tapeti - https://git.x2software.net/pub/tapeti/raw/master/resources/icons/Tapeti.Annotations.png - false - Annotations for Tapeti - - rabbitmq tapeti - + + + + X2Software.Tapeti.Annotations + $version$ + Tapeti Annotations + Mark van Renswoude + Mark van Renswoude + https://raw.githubusercontent.com/MvRens/Tapeti/master/UNLICENSE + https://github.com/MvRens/Tapeti + https://raw.githubusercontent.com/MvRens/Tapeti/master/resources/icons/Tapeti.Annotations.png + false + Annotations for Tapeti + + rabbitmq tapeti + \ No newline at end of file diff --git a/Tapeti.DataAnnotations/Tapeti.DataAnnotations.nuspec b/Tapeti.DataAnnotations/Tapeti.DataAnnotations.nuspec index a1b9042..571c3a5 100644 --- a/Tapeti.DataAnnotations/Tapeti.DataAnnotations.nuspec +++ b/Tapeti.DataAnnotations/Tapeti.DataAnnotations.nuspec @@ -1,20 +1,20 @@ - - - - X2Software.Tapeti.DataAnnotations - $version$ - $title$ - Mark van Renswoude - Mark van Renswoude - https://git.x2software.net/pub/tapeti/raw/master/UNLICENSE - https://git.x2software.net/pub/tapeti - https://git.x2software.net/pub/tapeti/raw/master/resources/icons/Tapeti.DataAnnotations.png - false - DataAnnotations validation extension for Tapeti - - rabbitmq tapeti dataannotations - - - - + + + + X2Software.Tapeti.DataAnnotations + $version$ + Tapeti DataAnnotations + Mark van Renswoude + Mark van Renswoude + https://raw.githubusercontent.com/MvRens/Tapeti/master/UNLICENSE + https://github.com/MvRens/Tapeti + https://raw.githubusercontent.com/MvRens/Tapeti/master/resources/icons/Tapeti.DataAnnotations.png + false + DataAnnotations validation extension for Tapeti + + rabbitmq tapeti dataannotations + + + + \ No newline at end of file diff --git a/Tapeti.Flow.SQL/Tapeti.Flow.SQL.nuspec b/Tapeti.Flow.SQL/Tapeti.Flow.SQL.nuspec index 686bbf9..0a667c6 100644 --- a/Tapeti.Flow.SQL/Tapeti.Flow.SQL.nuspec +++ b/Tapeti.Flow.SQL/Tapeti.Flow.SQL.nuspec @@ -1,21 +1,21 @@ - - - - X2Software.Tapeti.Flow.SQL - $version$ - $title$ - Mark van Renswoude - Mark van Renswoude - https://git.x2software.net/pub/tapeti/raw/master/UNLICENSE - https://git.x2software.net/pub/tapeti - https://git.x2software.net/pub/tapeti/raw/master/resources/icons/Tapeti.Flow.SQL.png - false - SQL backing repository for the Tapeti Flow package - - rabbitmq tapeti sql - - - - - + + + + X2Software.Tapeti.Flow.SQL + $version$ + Tapeti Flow SQL + Mark van Renswoude + Mark van Renswoude + https://raw.githubusercontent.com/MvRens/Tapeti/master/UNLICENSE + https://github.com/MvRens/Tapeti + https://raw.githubusercontent.com/MvRens/Tapeti/master/resources/icons/Tapeti.Flow.SQL.png + false + SQL backing repository for the Tapeti Flow package + + rabbitmq tapeti sql + + + + + \ No newline at end of file diff --git a/Tapeti.Flow/Tapeti.Flow.nuspec b/Tapeti.Flow/Tapeti.Flow.nuspec index 1df4677..54a7e1f 100644 --- a/Tapeti.Flow/Tapeti.Flow.nuspec +++ b/Tapeti.Flow/Tapeti.Flow.nuspec @@ -1,21 +1,21 @@ - - - - X2Software.Tapeti.Flow - $version$ - $title$ - Menno van Lavieren, Mark van Renswoude - Mark van Renswoude - https://git.x2software.net/pub/tapeti/raw/master/UNLICENSE - https://git.x2software.net/pub/tapeti - https://git.x2software.net/pub/tapeti/raw/master/resources/icons/Tapeti.Flow.png - false - Flow extension for Tapeti - - rabbitmq tapeti flow - - - - - + + + + X2Software.Tapeti.Flow + $version$ + Tapeti Flow + Menno van Lavieren, Mark van Renswoude + Mark van Renswoude + https://raw.githubusercontent.com/MvRens/Tapeti/master/UNLICENSE + https://github.com/MvRens/Tapeti + https://raw.githubusercontent.com/MvRens/Tapeti/master/resources/icons/Tapeti.Flow.png + false + Flow extension for Tapeti + + rabbitmq tapeti flow + + + + + \ No newline at end of file diff --git a/Tapeti.SimpleInjector/Tapeti.SimpleInjector.nuspec b/Tapeti.SimpleInjector/Tapeti.SimpleInjector.nuspec index 6af6063..e53c636 100644 --- a/Tapeti.SimpleInjector/Tapeti.SimpleInjector.nuspec +++ b/Tapeti.SimpleInjector/Tapeti.SimpleInjector.nuspec @@ -1,20 +1,20 @@ - - - - X2Software.Tapeti.SimpleInjector - $version$ - $title$ - Mark van Renswoude - Mark van Renswoude - https://git.x2software.net/pub/tapeti/raw/master/UNLICENSE - https://git.x2software.net/pub/tapeti - https://git.x2software.net/pub/tapeti/raw/master/resources/icons/Tapeti.SimpleInjector.png - false - SimpleInjector integration package for Tapeti - - rabbitmq tapeti simpleinjector - - - - + + + + X2Software.Tapeti.SimpleInjector + $version$ + Tapeti SimpleInjector + Mark van Renswoude + Mark van Renswoude + https://raw.githubusercontent.com/MvRens/Tapeti/master/UNLICENSE + https://github.com/MvRens/Tapeti + https://raw.githubusercontent.com/MvRens/Tapeti/master/resources/icons/Tapeti.SimpleInjector.png + false + SimpleInjector integration package for Tapeti + + rabbitmq tapeti simpleinjector + + + + \ No newline at end of file diff --git a/Tapeti/Tapeti.nuspec b/Tapeti/Tapeti.nuspec index 249c4c2..b1eb7ca 100644 --- a/Tapeti/Tapeti.nuspec +++ b/Tapeti/Tapeti.nuspec @@ -1,20 +1,20 @@ - - - - X2Software.Tapeti - $version$ - $title$ - Mark van Renswoude - Mark van Renswoude - https://git.x2software.net/pub/tapeti/raw/master/UNLICENSE - https://git.x2software.net/pub/tapeti - https://git.x2software.net/pub/tapeti/raw/master/resources/icons/Tapeti.png - false - Controller-based framework for RabbitMQ microservice architectures - - rabbitmq tapeti - - - - + + + + X2Software.Tapeti + $version$ + Tapeti + Mark van Renswoude + Mark van Renswoude + https://raw.githubusercontent.com/MvRens/Tapeti/master/UNLICENSE + https://github.com/MvRens/Tapeti + https://raw.githubusercontent.com/MvRens/Tapeti/master/resources/icons/Tapeti.png + false + Controller-based framework for RabbitMQ microservice architectures + + rabbitmq tapeti + + + + \ No newline at end of file diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 0000000..aa68da9 --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,40 @@ +image: Visual Studio 2015 + +install: + - choco install gitversion.portable -pre -y + +before_build: + - nuget restore + - ps: gitversion /l console /output buildserver /updateAssemblyInfo + +after_build: + - cmd: ECHO nuget pack Tapeti\Tapeti.nuspec -version "%GitVersion_NuGetVersion%" -prop "target=%CONFIGURATION%" + - cmd: nuget pack Tapeti\Tapeti.nuspec -version "%GitVersion_NuGetVersion%" -prop "target=%CONFIGURATION%" + - cmd: appveyor PushArtifact "Tapeti.%GitVersion_NuGetVersion%.nupkg" + - cmd: nuget pack Tapeti.Annotations\Tapeti.Annotations.nuspec -version "%GitVersion_NuGetVersion%" -prop "target=%CONFIGURATION%" + - cmd: appveyor PushArtifact "Tapeti.Annotations.%GitVersion_NuGetVersion%.nupkg" + - cmd: nuget pack Tapeti.DataAnnotations\Tapeti.DataAnnotations.nuspec -version "%GitVersion_NuGetVersion%" -prop "target=%CONFIGURATION%" + - cmd: appveyor PushArtifact "Tapeti.DataAnnotations.%GitVersion_NuGetVersion%.nupkg" + - cmd: nuget pack Tapeti.Flow\Tapeti.Flow.nuspec -version "%GitVersion_NuGetVersion%" -prop "target=%CONFIGURATION%" + - cmd: appveyor PushArtifact "Tapeti.Flow.%GitVersion_NuGetVersion%.nupkg" + - cmd: nuget pack Tapeti.SimpleInjector\Tapeti.SimpleInjector.nuspec -version "%GitVersion_NuGetVersion%" -prop "target=%CONFIGURATION%" + - cmd: appveyor PushArtifact "Tapeti.SimpleInjector.%GitVersion_NuGetVersion%.nupkg" + +assembly_info: + patch: false + +build: + project: Tapeti.sln + +platform: + - Any CPU + +configuration: + - Release + +deploy: + provider: NuGet + api_key: + secure: wEch4shvYGZUNRW0z/Rm8jdKR95lVnzS0QncQg6a0wH4k/Bt6N/B5bs6AidVcyUD + skip_symbols: false + artifact: /.*\.nupkg/ \ No newline at end of file From 931b242fc0c28105168b70fb7508aeb1034e8dfd Mon Sep 17 00:00:00 2001 From: Mark van Renswoude Date: Tue, 17 Oct 2017 17:27:46 +0200 Subject: [PATCH 4/6] Fixed package names for PushArtifact --- appveyor.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index aa68da9..1984f63 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -10,15 +10,15 @@ before_build: after_build: - cmd: ECHO nuget pack Tapeti\Tapeti.nuspec -version "%GitVersion_NuGetVersion%" -prop "target=%CONFIGURATION%" - cmd: nuget pack Tapeti\Tapeti.nuspec -version "%GitVersion_NuGetVersion%" -prop "target=%CONFIGURATION%" - - cmd: appveyor PushArtifact "Tapeti.%GitVersion_NuGetVersion%.nupkg" + - cmd: appveyor PushArtifact "X2Software.Tapeti.%GitVersion_NuGetVersion%.nupkg" - cmd: nuget pack Tapeti.Annotations\Tapeti.Annotations.nuspec -version "%GitVersion_NuGetVersion%" -prop "target=%CONFIGURATION%" - - cmd: appveyor PushArtifact "Tapeti.Annotations.%GitVersion_NuGetVersion%.nupkg" + - cmd: appveyor PushArtifact "X2Software.Tapeti.Annotations.%GitVersion_NuGetVersion%.nupkg" - cmd: nuget pack Tapeti.DataAnnotations\Tapeti.DataAnnotations.nuspec -version "%GitVersion_NuGetVersion%" -prop "target=%CONFIGURATION%" - - cmd: appveyor PushArtifact "Tapeti.DataAnnotations.%GitVersion_NuGetVersion%.nupkg" + - cmd: appveyor PushArtifact "X2Software.Tapeti.DataAnnotations.%GitVersion_NuGetVersion%.nupkg" - cmd: nuget pack Tapeti.Flow\Tapeti.Flow.nuspec -version "%GitVersion_NuGetVersion%" -prop "target=%CONFIGURATION%" - - cmd: appveyor PushArtifact "Tapeti.Flow.%GitVersion_NuGetVersion%.nupkg" + - cmd: appveyor PushArtifact "X2Software.Tapeti.Flow.%GitVersion_NuGetVersion%.nupkg" - cmd: nuget pack Tapeti.SimpleInjector\Tapeti.SimpleInjector.nuspec -version "%GitVersion_NuGetVersion%" -prop "target=%CONFIGURATION%" - - cmd: appveyor PushArtifact "Tapeti.SimpleInjector.%GitVersion_NuGetVersion%.nupkg" + - cmd: appveyor PushArtifact "X2Software.Tapeti.SimpleInjector.%GitVersion_NuGetVersion%.nupkg" assembly_info: patch: false From b9864df675b3135bfe8fd291cdf6f5b8bdfce12e Mon Sep 17 00:00:00 2001 From: Mark van Renswoude Date: Tue, 17 Oct 2017 17:35:36 +0200 Subject: [PATCH 5/6] Updated NuGet API key --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 1984f63..374feac 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -35,6 +35,6 @@ configuration: deploy: provider: NuGet api_key: - secure: wEch4shvYGZUNRW0z/Rm8jdKR95lVnzS0QncQg6a0wH4k/Bt6N/B5bs6AidVcyUD + secure: pkaN6R8ocu0Q93uCK3DOCifgr1Q4tuH4ZJ4eiV9U5NmwE5qRM2xjUy4B9SkZCsWx skip_symbols: false artifact: /.*\.nupkg/ \ No newline at end of file From 75b14738f470519871e9e6ead7db4d23c6958b9f Mon Sep 17 00:00:00 2001 From: Mark van Renswoude Date: Tue, 17 Oct 2017 17:44:22 +0200 Subject: [PATCH 6/6] Updated build badges --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2b8f6ee..c35e158 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ Builds are automatically run using AppVeyor, with the resulting packages being p Latest build -[![Build status](https://ci.appveyor.com/api/projects/status/p5w9yr4xlhvoy02i?svg=true)](https://ci.appveyor.com/project/MvRens/tapeti) +[![Build status](https://ci.appveyor.com/api/projects/status/cyuo0vm7admy0d9x?svg=true)](https://ci.appveyor.com/project/MvRens/tapeti) Master build -[![Build status](https://ci.appveyor.com/api/projects/status/p5w9yr4xlhvoy02i/branch/master?svg=true)](https://ci.appveyor.com/project/MvRens/tapeti/branch/master) +[![Build status](https://ci.appveyor.com/api/projects/status/cyuo0vm7admy0d9x/branch/master?svg=true)](https://ci.appveyor.com/project/MvRens/tapeti/branch/master)