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: slack:
image: plugins/slack image: plugins/slack
secrets: [ slack_webhook ]
template: > template: >
{{#success build.status}} {{#success build.status}}
build {{build.number}} succeeded. Good job. build {{build.number}} succeeded. Good job.
{{else}} {{else}}
build {{build.number}} failed. Fix me please. 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>(); var typeNameAttribute = type.GetTypeInfo().GetCustomAttribute<TypeNameAttribute>();
if (typeNameAttribute != null && !string.IsNullOrWhiteSpace(typeNameAttribute.TypeName)) if (!string.IsNullOrWhiteSpace(typeNameAttribute?.TypeName))
{ {
Map(type, typeNameAttribute.TypeName); Map(type, typeNameAttribute.TypeName);
} }

Loading…
Cancel
Save