catch setup resource errors
parent
08e76e950d
commit
f2a84c16fd
|
|
@ -1422,8 +1422,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
||||||
};
|
};
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
const client_node_1 = __webpack_require__(89679);
|
const client_node_1 = __webpack_require__(89679);
|
||||||
const cron_converter_1 = __webpack_require__(89926);
|
|
||||||
const core = __importStar(__webpack_require__(42186));
|
const core = __importStar(__webpack_require__(42186));
|
||||||
|
const Cron = __webpack_require__(89926);
|
||||||
class KubernetesCleanupCronJob {
|
class KubernetesCleanupCronJob {
|
||||||
static cleanup(api, name, namespace) {
|
static cleanup(api, name, namespace) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
|
|
@ -1441,7 +1441,7 @@ class KubernetesCleanupCronJob {
|
||||||
app: 'unity-builder',
|
app: 'unity-builder',
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
const cronInstance = new cron_converter_1.Cron();
|
const cronInstance = new Cron();
|
||||||
const date = Date.now() + 1000 * 60 * 60;
|
const date = Date.now() + 1000 * 60 * 60;
|
||||||
const cronString = cronInstance.schedule(new Date(date)).toString();
|
const cronString = cronInstance.schedule(new Date(date)).toString();
|
||||||
const spec = {
|
const spec = {
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -1,6 +1,6 @@
|
||||||
import { BatchV1beta1Api, V1beta1CronJob } from '@kubernetes/client-node';
|
import { BatchV1beta1Api, V1beta1CronJob } from '@kubernetes/client-node';
|
||||||
import { Cron } from 'cron-converter';
|
|
||||||
import * as core from '@actions/core';
|
import * as core from '@actions/core';
|
||||||
|
const Cron = require('cron-converter');
|
||||||
class KubernetesCleanupCronJob {
|
class KubernetesCleanupCronJob {
|
||||||
static async cleanup(api: BatchV1beta1Api, name: string, namespace: string) {
|
static async cleanup(api: BatchV1beta1Api, name: string, namespace: string) {
|
||||||
await api.deleteNamespacedCronJob('name', namespace);
|
await api.deleteNamespacedCronJob('name', namespace);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue