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* () {
|
||||
const buildParameter = yield __1.BuildParameters.create();
|
||||
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() {
|
||||
|
|
@ -599,20 +601,6 @@ class Cli {
|
|||
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() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
core.info(`Running POST build tasks`);
|
||||
|
|
@ -650,12 +638,6 @@ __decorate([
|
|||
__decorate([
|
||||
cli_functions_repository_1.CliFunction(`watch`, `follows logs of a running workflow`)
|
||||
], 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([
|
||||
cli_functions_repository_1.CliFunction(`remote-cli-post-build`, `runs a cloud runner build`)
|
||||
], Cli, "PostCLIBuild", null);
|
||||
|
|
@ -2379,25 +2361,9 @@ class AWSBuildEnvironment {
|
|||
return [];
|
||||
});
|
||||
}
|
||||
inspectResources() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
yield new Promise((result) => result);
|
||||
return {
|
||||
Name: yield task_service_1.TaskService.awsDescribeJob(``),
|
||||
};
|
||||
});
|
||||
}
|
||||
listWorkflow() {
|
||||
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() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return yield task_service_1.TaskService.watch();
|
||||
|
|
@ -2812,15 +2778,9 @@ class LocalDockerCloudRunner {
|
|||
listResources() {
|
||||
return new Promise((resolve) => resolve([]));
|
||||
}
|
||||
inspectResources() {
|
||||
throw new Error('Method not implemented.');
|
||||
}
|
||||
listWorkflow() {
|
||||
throw new Error('Method not implemented.');
|
||||
}
|
||||
inspectWorkflow() {
|
||||
throw new Error('Method not implemented.');
|
||||
}
|
||||
watchWorkflow() {
|
||||
throw new Error('Method not implemented.');
|
||||
}
|
||||
|
|
@ -3013,15 +2973,9 @@ class Kubernetes {
|
|||
];
|
||||
});
|
||||
}
|
||||
inspectResources() {
|
||||
throw new Error('Method not implemented.');
|
||||
}
|
||||
listWorkflow() {
|
||||
throw new Error('Method not implemented.');
|
||||
}
|
||||
inspectWorkflow() {
|
||||
throw new Error('Method not implemented.');
|
||||
}
|
||||
watchWorkflow() {
|
||||
throw new Error('Method not implemented.');
|
||||
}
|
||||
|
|
@ -3807,15 +3761,9 @@ class LocalCloudRunner {
|
|||
listResources() {
|
||||
throw new Error('Method not implemented.');
|
||||
}
|
||||
inspectResources() {
|
||||
throw new Error('Method not implemented.');
|
||||
}
|
||||
listWorkflow() {
|
||||
throw new Error('Method not implemented.');
|
||||
}
|
||||
inspectWorkflow() {
|
||||
throw new Error('Method not implemented.');
|
||||
}
|
||||
watchWorkflow() {
|
||||
throw new Error('Method not implemented.');
|
||||
}
|
||||
|
|
@ -3895,15 +3843,9 @@ class TestCloudRunner {
|
|||
listResources() {
|
||||
throw new Error('Method not implemented.');
|
||||
}
|
||||
inspectResources() {
|
||||
throw new Error('Method not implemented.');
|
||||
}
|
||||
listWorkflow() {
|
||||
throw new Error('Method not implemented.');
|
||||
}
|
||||
inspectWorkflow() {
|
||||
throw new Error('Method not implemented.');
|
||||
}
|
||||
watchWorkflow() {
|
||||
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();
|
||||
|
||||
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`)
|
||||
|
|
@ -145,24 +147,6 @@ export class Cli {
|
|||
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`)
|
||||
public static async PostCLIBuild(): Promise<string> {
|
||||
core.info(`Running POST build tasks`);
|
||||
|
|
|
|||
|
|
@ -29,23 +29,9 @@ class AWSBuildEnvironment implements ProviderInterface {
|
|||
|
||||
return [];
|
||||
}
|
||||
async inspectResources(): Promise<ProviderResource> {
|
||||
await new Promise((result) => result);
|
||||
|
||||
return {
|
||||
Name: await TaskService.awsDescribeJob(``),
|
||||
};
|
||||
}
|
||||
listWorkflow(): Promise<ProviderWorkflow[]> {
|
||||
throw new Error('Method not implemented.');
|
||||
}
|
||||
async inspectWorkflow(): Promise<ProviderWorkflow> {
|
||||
await new Promise((result) => result);
|
||||
|
||||
return {
|
||||
Name: await TaskService.awsDescribeJob(``),
|
||||
};
|
||||
}
|
||||
async watchWorkflow(): Promise<string> {
|
||||
return await TaskService.watch();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,15 +18,9 @@ class LocalDockerCloudRunner implements ProviderInterface {
|
|||
listResources(): Promise<ProviderResource[]> {
|
||||
return new Promise((resolve) => resolve([]));
|
||||
}
|
||||
inspectResources(): Promise<ProviderResource> {
|
||||
throw new Error('Method not implemented.');
|
||||
}
|
||||
listWorkflow(): Promise<ProviderWorkflow[]> {
|
||||
throw new Error('Method not implemented.');
|
||||
}
|
||||
inspectWorkflow(): Promise<ProviderWorkflow> {
|
||||
throw new Error('Method not implemented.');
|
||||
}
|
||||
watchWorkflow(): Promise<string> {
|
||||
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[]> {
|
||||
throw new Error('Method not implemented.');
|
||||
}
|
||||
inspectWorkflow(): Promise<ProviderWorkflow> {
|
||||
throw new Error('Method not implemented.');
|
||||
}
|
||||
watchWorkflow(): Promise<string> {
|
||||
throw new Error('Method not implemented.');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,15 +11,9 @@ class LocalCloudRunner implements ProviderInterface {
|
|||
listResources(): Promise<ProviderResource[]> {
|
||||
throw new Error('Method not implemented.');
|
||||
}
|
||||
inspectResources(): Promise<ProviderResource> {
|
||||
throw new Error('Method not implemented.');
|
||||
}
|
||||
listWorkflow(): Promise<ProviderWorkflow[]> {
|
||||
throw new Error('Method not implemented.');
|
||||
}
|
||||
inspectWorkflow(): Promise<ProviderWorkflow> {
|
||||
throw new Error('Method not implemented.');
|
||||
}
|
||||
watchWorkflow(): Promise<string> {
|
||||
throw new Error('Method not implemented.');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,8 +54,6 @@ export interface ProviderInterface {
|
|||
baseDependencies: boolean,
|
||||
): Promise<string>;
|
||||
listResources(): Promise<ProviderResource[]>;
|
||||
inspectResources(): Promise<ProviderResource>;
|
||||
listWorkflow(): Promise<ProviderWorkflow[]>;
|
||||
inspectWorkflow(): Promise<ProviderWorkflow>;
|
||||
watchWorkflow(): Promise<string>;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,15 +10,9 @@ class TestCloudRunner implements ProviderInterface {
|
|||
listResources(): Promise<ProviderResource[]> {
|
||||
throw new Error('Method not implemented.');
|
||||
}
|
||||
inspectResources(): Promise<ProviderResource> {
|
||||
throw new Error('Method not implemented.');
|
||||
}
|
||||
listWorkflow(): Promise<ProviderWorkflow[]> {
|
||||
throw new Error('Method not implemented.');
|
||||
}
|
||||
inspectWorkflow(): Promise<ProviderWorkflow> {
|
||||
throw new Error('Method not implemented.');
|
||||
}
|
||||
watchWorkflow(): Promise<string> {
|
||||
throw new Error('Method not implemented.');
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue