Browse Source

Auto cleanup on failure.

pull/95/head
Sebastian Stehle 9 years ago
parent
commit
6482f31348
  1. 13
      .drone.yml
  2. 2
      src/Squidex.Infrastructure/TypeNameRegistry.cs

13
.drone.yml

@ -40,10 +40,19 @@ pipeline:
slack:
image: plugins/slack
secrets: [ slack_webhook ]
template: >
{{#success build.status}}
build {{build.number}} succeeded. Good job.
{{else}}
build {{build.number}} failed. Fix me please.
{{/success}}
{{/success}}
secrets: [ slack_webhook ]
when:
status: [ failure, success ]
cleanup:
commands:
- docker system prune -f
when:
status: failure

2
src/Squidex.Infrastructure/TypeNameRegistry.cs

@ -78,7 +78,7 @@ namespace Squidex.Infrastructure
{
var typeNameAttribute = type.GetTypeInfo().GetCustomAttribute<TypeNameAttribute>();
if (typeNameAttribute != null && !string.IsNullOrWhiteSpace(typeNameAttribute.TypeName))
if (!string.IsNullOrWhiteSpace(typeNameAttribute?.TypeName))
{
Map(type, typeNameAttribute.TypeName);
}

Loading…
Cancel
Save