stubbing inspection api
parent
0b538311f0
commit
4ece330bec
|
|
@ -571,6 +571,48 @@ class Cli {
|
||||||
return yield __1.CloudRunner.run(buildParameter, baseImage.toString());
|
return yield __1.CloudRunner.run(buildParameter, baseImage.toString());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
static GarbageCollect() {
|
||||||
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
|
const buildParameter = yield __1.BuildParameters.create();
|
||||||
|
yield __1.CloudRunner.setup(buildParameter);
|
||||||
|
return yield __1.CloudRunner.Provider.garbageCollect(``, false, 0, false, false);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
static ListResources() {
|
||||||
|
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();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
static ListWorfklow() {
|
||||||
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
|
const buildParameter = yield __1.BuildParameters.create();
|
||||||
|
yield __1.CloudRunner.setup(buildParameter);
|
||||||
|
return yield __1.CloudRunner.Provider.listWorkflow();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
static Watch() {
|
||||||
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
|
const buildParameter = yield __1.BuildParameters.create();
|
||||||
|
yield __1.CloudRunner.setup(buildParameter);
|
||||||
|
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();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
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();
|
||||||
|
});
|
||||||
|
}
|
||||||
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`);
|
||||||
|
|
@ -590,6 +632,24 @@ __decorate([
|
||||||
__decorate([
|
__decorate([
|
||||||
cli_functions_repository_1.CliFunction(`cli`, `runs a cloud runner build`)
|
cli_functions_repository_1.CliFunction(`cli`, `runs a cloud runner build`)
|
||||||
], Cli, "CLIBuild", null);
|
], Cli, "CLIBuild", null);
|
||||||
|
__decorate([
|
||||||
|
cli_functions_repository_1.CliFunction(`garbage-collect`, `runs garbage collection`)
|
||||||
|
], Cli, "GarbageCollect", null);
|
||||||
|
__decorate([
|
||||||
|
cli_functions_repository_1.CliFunction(`list-resources`, `lists active resources`)
|
||||||
|
], Cli, "ListResources", null);
|
||||||
|
__decorate([
|
||||||
|
cli_functions_repository_1.CliFunction(`list-worfklow`, `lists running workflows`)
|
||||||
|
], Cli, "ListWorfklow", null);
|
||||||
|
__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([
|
__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);
|
||||||
|
|
@ -2403,6 +2463,12 @@ class AWSBuildEnvironment {
|
||||||
constructor(buildParameters) {
|
constructor(buildParameters) {
|
||||||
this.baseStackName = buildParameters.awsBaseStackName;
|
this.baseStackName = buildParameters.awsBaseStackName;
|
||||||
}
|
}
|
||||||
|
listWorkflow() {
|
||||||
|
throw new Error('Method not implemented.');
|
||||||
|
}
|
||||||
|
inspectWorkflow() {
|
||||||
|
throw new Error('Method not implemented.');
|
||||||
|
}
|
||||||
inspectResources() {
|
inspectResources() {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
return yield task_service_1.TaskService.awsDescribeJob('');
|
return yield task_service_1.TaskService.awsDescribeJob('');
|
||||||
|
|
@ -2438,7 +2504,7 @@ class AWSBuildEnvironment {
|
||||||
yield aws_cli_commands_1.AwsCliCommands.awsListStacks();
|
yield aws_cli_commands_1.AwsCliCommands.awsListStacks();
|
||||||
yield aws_cli_commands_1.AwsCliCommands.awsListTasks();
|
yield aws_cli_commands_1.AwsCliCommands.awsListTasks();
|
||||||
yield aws_cli_commands_1.AwsCliCommands.awsListLogGroups();
|
yield aws_cli_commands_1.AwsCliCommands.awsListLogGroups();
|
||||||
return '';
|
return [];
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
cleanupWorkflow(
|
cleanupWorkflow(
|
||||||
|
|
@ -2836,6 +2902,12 @@ const __1 = __nccwpck_require__(41359);
|
||||||
const fs_1 = __nccwpck_require__(57147);
|
const fs_1 = __nccwpck_require__(57147);
|
||||||
const cloud_runner_1 = __importDefault(__nccwpck_require__(79144));
|
const cloud_runner_1 = __importDefault(__nccwpck_require__(79144));
|
||||||
class LocalDockerCloudRunner {
|
class LocalDockerCloudRunner {
|
||||||
|
listWorkflow() {
|
||||||
|
throw new Error('Method not implemented.');
|
||||||
|
}
|
||||||
|
inspectWorkflow() {
|
||||||
|
throw new Error('Method not implemented.');
|
||||||
|
}
|
||||||
inspectResources() {
|
inspectResources() {
|
||||||
throw new Error('Method not implemented.');
|
throw new Error('Method not implemented.');
|
||||||
}
|
}
|
||||||
|
|
@ -3000,6 +3072,12 @@ class Kubernetes {
|
||||||
this.namespace = 'default';
|
this.namespace = 'default';
|
||||||
this.buildParameters = buildParameters;
|
this.buildParameters = buildParameters;
|
||||||
}
|
}
|
||||||
|
listWorkflow() {
|
||||||
|
throw new Error('Method not implemented.');
|
||||||
|
}
|
||||||
|
inspectWorkflow() {
|
||||||
|
throw new Error('Method not implemented.');
|
||||||
|
}
|
||||||
inspectResources() {
|
inspectResources() {
|
||||||
throw new Error('Method not implemented.');
|
throw new Error('Method not implemented.');
|
||||||
}
|
}
|
||||||
|
|
@ -3726,6 +3804,12 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
const cloud_runner_system_1 = __nccwpck_require__(99393);
|
const cloud_runner_system_1 = __nccwpck_require__(99393);
|
||||||
const cloud_runner_logger_1 = __importDefault(__nccwpck_require__(22855));
|
const cloud_runner_logger_1 = __importDefault(__nccwpck_require__(22855));
|
||||||
class LocalCloudRunner {
|
class LocalCloudRunner {
|
||||||
|
listWorkflow() {
|
||||||
|
throw new Error('Method not implemented.');
|
||||||
|
}
|
||||||
|
inspectWorkflow() {
|
||||||
|
throw new Error('Method not implemented.');
|
||||||
|
}
|
||||||
inspectResources() {
|
inspectResources() {
|
||||||
throw new Error('Method not implemented.');
|
throw new Error('Method not implemented.');
|
||||||
}
|
}
|
||||||
|
|
@ -3808,6 +3892,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
const cloud_runner_logger_1 = __importDefault(__nccwpck_require__(22855));
|
const cloud_runner_logger_1 = __importDefault(__nccwpck_require__(22855));
|
||||||
class TestCloudRunner {
|
class TestCloudRunner {
|
||||||
|
listWorkflow() {
|
||||||
|
throw new Error('Method not implemented.');
|
||||||
|
}
|
||||||
|
inspectWorkflow() {
|
||||||
|
throw new Error('Method not implemented.');
|
||||||
|
}
|
||||||
inspectResources() {
|
inspectResources() {
|
||||||
throw new Error('Method not implemented.');
|
throw new Error('Method not implemented.');
|
||||||
}
|
}
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -111,7 +111,7 @@ export class Cli {
|
||||||
return await CloudRunner.run(buildParameter, baseImage.toString());
|
return await CloudRunner.run(buildParameter, baseImage.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
@CliFunction(`gc`, `runs garbage collection`)
|
@CliFunction(`garbage-collect`, `runs garbage collection`)
|
||||||
public static async GarbageCollect(): Promise<string> {
|
public static async GarbageCollect(): Promise<string> {
|
||||||
const buildParameter = await BuildParameters.create();
|
const buildParameter = await BuildParameters.create();
|
||||||
|
|
||||||
|
|
@ -120,7 +120,7 @@ export class Cli {
|
||||||
return await CloudRunner.Provider.garbageCollect(``, false, 0, false, false);
|
return await CloudRunner.Provider.garbageCollect(``, false, 0, false, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@CliFunction(`list-resources`, `runs garbage collection`)
|
@CliFunction(`list-resources`, `lists active resources`)
|
||||||
public static async ListResources(): Promise<string[]> {
|
public static async ListResources(): Promise<string[]> {
|
||||||
const buildParameter = await BuildParameters.create();
|
const buildParameter = await BuildParameters.create();
|
||||||
|
|
||||||
|
|
@ -129,7 +129,7 @@ export class Cli {
|
||||||
return await CloudRunner.Provider.listResources();
|
return await CloudRunner.Provider.listResources();
|
||||||
}
|
}
|
||||||
|
|
||||||
@CliFunction(`list-worfklow`, `runs garbage collection`)
|
@CliFunction(`list-worfklow`, `lists running workflows`)
|
||||||
public static async ListWorfklow(): Promise<string[]> {
|
public static async ListWorfklow(): Promise<string[]> {
|
||||||
const buildParameter = await BuildParameters.create();
|
const buildParameter = await BuildParameters.create();
|
||||||
|
|
||||||
|
|
@ -138,7 +138,7 @@ export class Cli {
|
||||||
return await CloudRunner.Provider.listWorkflow();
|
return await CloudRunner.Provider.listWorkflow();
|
||||||
}
|
}
|
||||||
|
|
||||||
@CliFunction(`watch`, `runs garbage collection`)
|
@CliFunction(`watch`, `follows logs of a running workflow`)
|
||||||
public static async Watch(): Promise<string> {
|
public static async Watch(): Promise<string> {
|
||||||
const buildParameter = await BuildParameters.create();
|
const buildParameter = await BuildParameters.create();
|
||||||
|
|
||||||
|
|
@ -147,7 +147,7 @@ export class Cli {
|
||||||
return await CloudRunner.Provider.watchWorkflow();
|
return await CloudRunner.Provider.watchWorkflow();
|
||||||
}
|
}
|
||||||
|
|
||||||
@CliFunction(`inspect-resource`, `runs garbage collection`)
|
@CliFunction(`inspect-resource`, `inspects details of an active resource`)
|
||||||
public static async InspectResource(): Promise<string> {
|
public static async InspectResource(): Promise<string> {
|
||||||
const buildParameter = await BuildParameters.create();
|
const buildParameter = await BuildParameters.create();
|
||||||
|
|
||||||
|
|
@ -156,7 +156,7 @@ export class Cli {
|
||||||
return await CloudRunner.Provider.inspectResources();
|
return await CloudRunner.Provider.inspectResources();
|
||||||
}
|
}
|
||||||
|
|
||||||
@CliFunction(`inspect-workflow`, `runs garbage collection`)
|
@CliFunction(`inspect-workflow`, `inspects details of a running workflow`)
|
||||||
public static async InspectWorkflow(): Promise<string> {
|
public static async InspectWorkflow(): Promise<string> {
|
||||||
const buildParameter = await BuildParameters.create();
|
const buildParameter = await BuildParameters.create();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue