1 | "use strict";
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 | Object.defineProperty(exports, "__esModule", { value: true });
|
18 | const sdm_1 = require("@atomist/sdm");
|
19 | const KubernetesGoalScheduler_1 = require("./KubernetesGoalScheduler");
|
20 | const KubernetesJobDeletingGoalCompletionListener_1 = require("./KubernetesJobDeletingGoalCompletionListener");
|
21 |
|
22 |
|
23 |
|
24 | function goalScheduling() {
|
25 | return Object.assign({}, sdm_1.metadata("k8s-goal-scheduling"), { configure: sdm => {
|
26 | if (!process.env.ATOMIST_ISOLATED_GOAL && KubernetesGoalScheduler_1.isConfiguredInEnv("kubernetes", "kubernetes-all")) {
|
27 | sdm.configuration.sdm.goalScheduler = [new KubernetesGoalScheduler_1.KubernetesGoalScheduler()];
|
28 | sdm.addGoalCompletionListener(new KubernetesJobDeletingGoalCompletionListener_1.KubernetesJobDeletingGoalCompletionListenerFactory(sdm).create());
|
29 | }
|
30 | } });
|
31 | }
|
32 | exports.goalScheduling = goalScheduling;
|
33 |
|
\ | No newline at end of file |