rmv inspect cli, implement k8s list logging
parent
2df26620bb
commit
cc3f984a4c
|
|
@ -582,7 +582,9 @@ class Cli {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
const buildParameter = yield __1.BuildParameters.create();
|
const buildParameter = yield __1.BuildParameters.create();
|
||||||
yield __1.CloudRunner.setup(buildParameter);
|
yield __1.CloudRunner.setup(buildParameter);
|
||||||
return (yield __1.CloudRunner.Provider.listResources()).map((x) => x.Name);
|
const result = yield __1.CloudRunner.Provider.listResources();
|
||||||
|
cloud_runner_logger_1.default.log(JSON.stringify(result, undefined, 4));
|
||||||
|
return result.map((x) => x.Name);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
static ListWorfklow() {
|
static ListWorfklow() {
|
||||||
|
|
@ -599,20 +601,6 @@ class Cli {
|
||||||
return yield __1.CloudRunner.Provider.watchWorkflow();
|
return yield __1.CloudRunner.Provider.watchWorkflow();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
static InspectResource() {
|
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
|
||||||
const buildParameter = yield __1.BuildParameters.create();
|
|
||||||
yield __1.CloudRunner.setup(buildParameter);
|
|
||||||
return (yield __1.CloudRunner.Provider.inspectResources()).Name;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
static InspectWorkflow() {
|
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
|
||||||
const buildParameter = yield __1.BuildParameters.create();
|
|
||||||
yield __1.CloudRunner.setup(buildParameter);
|
|
||||||
return (yield __1.CloudRunner.Provider.inspectWorkflow()).Name;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
static PostCLIBuild() {
|
static PostCLIBuild() {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
core.info(`Running POST build tasks`);
|
core.info(`Running POST build tasks`);
|
||||||
|
|
@ -650,12 +638,6 @@ __decorate([
|
||||||
__decorate([
|
__decorate([
|
||||||
cli_functions_repository_1.CliFunction(`watch`, `follows logs of a running workflow`)
|
cli_functions_repository_1.CliFunction(`watch`, `follows logs of a running workflow`)
|
||||||
], Cli, "Watch", null);
|
], Cli, "Watch", null);
|
||||||
__decorate([
|
|
||||||
cli_functions_repository_1.CliFunction(`inspect-resource`, `inspects details of an active resource`)
|
|
||||||
], Cli, "InspectResource", null);
|
|
||||||
__decorate([
|
|
||||||
cli_functions_repository_1.CliFunction(`inspect-workflow`, `inspects details of a running workflow`)
|
|
||||||
], Cli, "InspectWorkflow", null);
|
|
||||||
__decorate([
|
__decorate([
|
||||||
cli_functions_repository_1.CliFunction(`remote-cli-post-build`, `runs a cloud runner build`)
|
cli_functions_repository_1.CliFunction(`remote-cli-post-build`, `runs a cloud runner build`)
|
||||||
], Cli, "PostCLIBuild", null);
|
], Cli, "PostCLIBuild", null);
|
||||||
|
|
@ -2379,25 +2361,9 @@ class AWSBuildEnvironment {
|
||||||
return [];
|
return [];
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
inspectResources() {
|
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
|
||||||
yield new Promise((result) => result);
|
|
||||||
return {
|
|
||||||
Name: yield task_service_1.TaskService.awsDescribeJob(``),
|
|
||||||
};
|
|
||||||
});
|
|
||||||
}
|
|
||||||
listWorkflow() {
|
listWorkflow() {
|
||||||
throw new Error('Method not implemented.');
|
throw new Error('Method not implemented.');
|
||||||
}
|
}
|
||||||
inspectWorkflow() {
|
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
|
||||||
yield new Promise((result) => result);
|
|
||||||
return {
|
|
||||||
Name: yield task_service_1.TaskService.awsDescribeJob(``),
|
|
||||||
};
|
|
||||||
});
|
|
||||||
}
|
|
||||||
watchWorkflow() {
|
watchWorkflow() {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
return yield task_service_1.TaskService.watch();
|
return yield task_service_1.TaskService.watch();
|
||||||
|
|
@ -2812,15 +2778,9 @@ class LocalDockerCloudRunner {
|
||||||
listResources() {
|
listResources() {
|
||||||
return new Promise((resolve) => resolve([]));
|
return new Promise((resolve) => resolve([]));
|
||||||
}
|
}
|
||||||
inspectResources() {
|
|
||||||
throw new Error('Method not implemented.');
|
|
||||||
}
|
|
||||||
listWorkflow() {
|
listWorkflow() {
|
||||||
throw new Error('Method not implemented.');
|
throw new Error('Method not implemented.');
|
||||||
}
|
}
|
||||||
inspectWorkflow() {
|
|
||||||
throw new Error('Method not implemented.');
|
|
||||||
}
|
|
||||||
watchWorkflow() {
|
watchWorkflow() {
|
||||||
throw new Error('Method not implemented.');
|
throw new Error('Method not implemented.');
|
||||||
}
|
}
|
||||||
|
|
@ -3013,15 +2973,9 @@ class Kubernetes {
|
||||||
];
|
];
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
inspectResources() {
|
|
||||||
throw new Error('Method not implemented.');
|
|
||||||
}
|
|
||||||
listWorkflow() {
|
listWorkflow() {
|
||||||
throw new Error('Method not implemented.');
|
throw new Error('Method not implemented.');
|
||||||
}
|
}
|
||||||
inspectWorkflow() {
|
|
||||||
throw new Error('Method not implemented.');
|
|
||||||
}
|
|
||||||
watchWorkflow() {
|
watchWorkflow() {
|
||||||
throw new Error('Method not implemented.');
|
throw new Error('Method not implemented.');
|
||||||
}
|
}
|
||||||
|
|
@ -3807,15 +3761,9 @@ class LocalCloudRunner {
|
||||||
listResources() {
|
listResources() {
|
||||||
throw new Error('Method not implemented.');
|
throw new Error('Method not implemented.');
|
||||||
}
|
}
|
||||||
inspectResources() {
|
|
||||||
throw new Error('Method not implemented.');
|
|
||||||
}
|
|
||||||
listWorkflow() {
|
listWorkflow() {
|
||||||
throw new Error('Method not implemented.');
|
throw new Error('Method not implemented.');
|
||||||
}
|
}
|
||||||
inspectWorkflow() {
|
|
||||||
throw new Error('Method not implemented.');
|
|
||||||
}
|
|
||||||
watchWorkflow() {
|
watchWorkflow() {
|
||||||
throw new Error('Method not implemented.');
|
throw new Error('Method not implemented.');
|
||||||
}
|
}
|
||||||
|
|
@ -3895,15 +3843,9 @@ class TestCloudRunner {
|
||||||
listResources() {
|
listResources() {
|
||||||
throw new Error('Method not implemented.');
|
throw new Error('Method not implemented.');
|
||||||
}
|
}
|
||||||
inspectResources() {
|
|
||||||
throw new Error('Method not implemented.');
|
|
||||||
}
|
|
||||||
listWorkflow() {
|
listWorkflow() {
|
||||||
throw new Error('Method not implemented.');
|
throw new Error('Method not implemented.');
|
||||||
}
|
}
|
||||||
inspectWorkflow() {
|
|
||||||
throw new Error('Method not implemented.');
|
|
||||||
}
|
|
||||||
watchWorkflow() {
|
watchWorkflow() {
|
||||||
throw new Error('Method not implemented.');
|
throw new Error('Method not implemented.');
|
||||||
}
|
}
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -123,8 +123,10 @@ export class Cli {
|
||||||
const buildParameter = await BuildParameters.create();
|
const buildParameter = await BuildParameters.create();
|
||||||
|
|
||||||
await CloudRunner.setup(buildParameter);
|
await CloudRunner.setup(buildParameter);
|
||||||
|
const result = await CloudRunner.Provider.listResources();
|
||||||
|
CloudRunnerLogger.log(JSON.stringify(result, undefined, 4));
|
||||||
|
|
||||||
return (await CloudRunner.Provider.listResources()).map((x) => x.Name);
|
return result.map((x) => x.Name);
|
||||||
}
|
}
|
||||||
|
|
||||||
@CliFunction(`list-worfklow`, `lists running workflows`)
|
@CliFunction(`list-worfklow`, `lists running workflows`)
|
||||||
|
|
@ -145,24 +147,6 @@ export class Cli {
|
||||||
return await CloudRunner.Provider.watchWorkflow();
|
return await CloudRunner.Provider.watchWorkflow();
|
||||||
}
|
}
|
||||||
|
|
||||||
@CliFunction(`inspect-resource`, `inspects details of an active resource`)
|
|
||||||
public static async InspectResource(): Promise<string> {
|
|
||||||
const buildParameter = await BuildParameters.create();
|
|
||||||
|
|
||||||
await CloudRunner.setup(buildParameter);
|
|
||||||
|
|
||||||
return (await CloudRunner.Provider.inspectResources()).Name;
|
|
||||||
}
|
|
||||||
|
|
||||||
@CliFunction(`inspect-workflow`, `inspects details of a running workflow`)
|
|
||||||
public static async InspectWorkflow(): Promise<string> {
|
|
||||||
const buildParameter = await BuildParameters.create();
|
|
||||||
|
|
||||||
await CloudRunner.setup(buildParameter);
|
|
||||||
|
|
||||||
return (await CloudRunner.Provider.inspectWorkflow()).Name;
|
|
||||||
}
|
|
||||||
|
|
||||||
@CliFunction(`remote-cli-post-build`, `runs a cloud runner build`)
|
@CliFunction(`remote-cli-post-build`, `runs a cloud runner build`)
|
||||||
public static async PostCLIBuild(): Promise<string> {
|
public static async PostCLIBuild(): Promise<string> {
|
||||||
core.info(`Running POST build tasks`);
|
core.info(`Running POST build tasks`);
|
||||||
|
|
|
||||||
|
|
@ -29,23 +29,9 @@ class AWSBuildEnvironment implements ProviderInterface {
|
||||||
|
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
async inspectResources(): Promise<ProviderResource> {
|
|
||||||
await new Promise((result) => result);
|
|
||||||
|
|
||||||
return {
|
|
||||||
Name: await TaskService.awsDescribeJob(``),
|
|
||||||
};
|
|
||||||
}
|
|
||||||
listWorkflow(): Promise<ProviderWorkflow[]> {
|
listWorkflow(): Promise<ProviderWorkflow[]> {
|
||||||
throw new Error('Method not implemented.');
|
throw new Error('Method not implemented.');
|
||||||
}
|
}
|
||||||
async inspectWorkflow(): Promise<ProviderWorkflow> {
|
|
||||||
await new Promise((result) => result);
|
|
||||||
|
|
||||||
return {
|
|
||||||
Name: await TaskService.awsDescribeJob(``),
|
|
||||||
};
|
|
||||||
}
|
|
||||||
async watchWorkflow(): Promise<string> {
|
async watchWorkflow(): Promise<string> {
|
||||||
return await TaskService.watch();
|
return await TaskService.watch();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -18,15 +18,9 @@ class LocalDockerCloudRunner implements ProviderInterface {
|
||||||
listResources(): Promise<ProviderResource[]> {
|
listResources(): Promise<ProviderResource[]> {
|
||||||
return new Promise((resolve) => resolve([]));
|
return new Promise((resolve) => resolve([]));
|
||||||
}
|
}
|
||||||
inspectResources(): Promise<ProviderResource> {
|
|
||||||
throw new Error('Method not implemented.');
|
|
||||||
}
|
|
||||||
listWorkflow(): Promise<ProviderWorkflow[]> {
|
listWorkflow(): Promise<ProviderWorkflow[]> {
|
||||||
throw new Error('Method not implemented.');
|
throw new Error('Method not implemented.');
|
||||||
}
|
}
|
||||||
inspectWorkflow(): Promise<ProviderWorkflow> {
|
|
||||||
throw new Error('Method not implemented.');
|
|
||||||
}
|
|
||||||
watchWorkflow(): Promise<string> {
|
watchWorkflow(): Promise<string> {
|
||||||
throw new Error('Method not implemented.');
|
throw new Error('Method not implemented.');
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -64,15 +64,9 @@ class Kubernetes implements ProviderInterface {
|
||||||
}),
|
}),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
inspectResources(): Promise<ProviderResource> {
|
|
||||||
throw new Error('Method not implemented.');
|
|
||||||
}
|
|
||||||
listWorkflow(): Promise<ProviderWorkflow[]> {
|
listWorkflow(): Promise<ProviderWorkflow[]> {
|
||||||
throw new Error('Method not implemented.');
|
throw new Error('Method not implemented.');
|
||||||
}
|
}
|
||||||
inspectWorkflow(): Promise<ProviderWorkflow> {
|
|
||||||
throw new Error('Method not implemented.');
|
|
||||||
}
|
|
||||||
watchWorkflow(): Promise<string> {
|
watchWorkflow(): Promise<string> {
|
||||||
throw new Error('Method not implemented.');
|
throw new Error('Method not implemented.');
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -11,15 +11,9 @@ class LocalCloudRunner implements ProviderInterface {
|
||||||
listResources(): Promise<ProviderResource[]> {
|
listResources(): Promise<ProviderResource[]> {
|
||||||
throw new Error('Method not implemented.');
|
throw new Error('Method not implemented.');
|
||||||
}
|
}
|
||||||
inspectResources(): Promise<ProviderResource> {
|
|
||||||
throw new Error('Method not implemented.');
|
|
||||||
}
|
|
||||||
listWorkflow(): Promise<ProviderWorkflow[]> {
|
listWorkflow(): Promise<ProviderWorkflow[]> {
|
||||||
throw new Error('Method not implemented.');
|
throw new Error('Method not implemented.');
|
||||||
}
|
}
|
||||||
inspectWorkflow(): Promise<ProviderWorkflow> {
|
|
||||||
throw new Error('Method not implemented.');
|
|
||||||
}
|
|
||||||
watchWorkflow(): Promise<string> {
|
watchWorkflow(): Promise<string> {
|
||||||
throw new Error('Method not implemented.');
|
throw new Error('Method not implemented.');
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -54,8 +54,6 @@ export interface ProviderInterface {
|
||||||
baseDependencies: boolean,
|
baseDependencies: boolean,
|
||||||
): Promise<string>;
|
): Promise<string>;
|
||||||
listResources(): Promise<ProviderResource[]>;
|
listResources(): Promise<ProviderResource[]>;
|
||||||
inspectResources(): Promise<ProviderResource>;
|
|
||||||
listWorkflow(): Promise<ProviderWorkflow[]>;
|
listWorkflow(): Promise<ProviderWorkflow[]>;
|
||||||
inspectWorkflow(): Promise<ProviderWorkflow>;
|
|
||||||
watchWorkflow(): Promise<string>;
|
watchWorkflow(): Promise<string>;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,15 +10,9 @@ class TestCloudRunner implements ProviderInterface {
|
||||||
listResources(): Promise<ProviderResource[]> {
|
listResources(): Promise<ProviderResource[]> {
|
||||||
throw new Error('Method not implemented.');
|
throw new Error('Method not implemented.');
|
||||||
}
|
}
|
||||||
inspectResources(): Promise<ProviderResource> {
|
|
||||||
throw new Error('Method not implemented.');
|
|
||||||
}
|
|
||||||
listWorkflow(): Promise<ProviderWorkflow[]> {
|
listWorkflow(): Promise<ProviderWorkflow[]> {
|
||||||
throw new Error('Method not implemented.');
|
throw new Error('Method not implemented.');
|
||||||
}
|
}
|
||||||
inspectWorkflow(): Promise<ProviderWorkflow> {
|
|
||||||
throw new Error('Method not implemented.');
|
|
||||||
}
|
|
||||||
watchWorkflow(): Promise<string> {
|
watchWorkflow(): Promise<string> {
|
||||||
throw new Error('Method not implemented.');
|
throw new Error('Method not implemented.');
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue