Skip to content

Commit 533fa83

Browse files
Revert
1 parent abd11d0 commit 533fa83

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed
Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
11
import dev.vml.es.acm.core.code.ExecutionContext
22
import dev.vml.es.acm.core.code.Execution
3-
import java.util.Calendar
43

54
void prepareRun(ExecutionContext context) {
6-
def minute = Calendar.getInstance().get(Calendar.MINUTE)
7-
if (minute % 2 == 0) {
8-
context.skipped = true
9-
}
5+
context.variable("acme", new AcmeFacade())
106
}
117

128
void completeRun(Execution execution) {
13-
log.info "I am not skipped on even minutes!"
9+
if (execution.status.name() == 'FAILED') {
10+
log.error "Something nasty happened with '${execution.executable.id}'!"
11+
// TODO send notification using built-in 'notifier' for Slack and MS Teams or use custom HTTP client / WebAPI
12+
}
13+
}
14+
15+
class AcmeFacade {
16+
def now() {
17+
return new Date()
18+
}
1419
}

0 commit comments

Comments
 (0)