Custom step file support

pull/437/head
Frostebite 2022-10-08 03:11:56 +01:00
parent d0aa17b382
commit 21fc93696c
3 changed files with 4 additions and 4 deletions

2
dist/index.js vendored
View File

@ -4435,7 +4435,7 @@ class CloudRunnerCustomSteps {
const files = fs.readdirSync(gameCiCustomStepsPath);
for (const file of files) {
const fileContents = fs.readFileSync(path_1.default.join(gameCiCustomStepsPath, file), `utf8`);
const fileContentsObject = yaml_1.default.parse(fileContents.toString());
const fileContentsObject = CloudRunnerCustomSteps.ParseSteps(fileContents.toString())[0];
if (fileContentsObject.hook === hookLifecycle) {
remote_client_logger_1.RemoteClientLogger.log(`Active Step File ${file} contents: ${fileContents}`);
results.push(...CloudRunnerCustomSteps.ParseSteps(fileContents));

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -18,7 +18,7 @@ export class CloudRunnerCustomSteps {
const files = fs.readdirSync(gameCiCustomStepsPath);
for (const file of files) {
const fileContents = fs.readFileSync(path.join(gameCiCustomStepsPath, file), `utf8`);
const fileContentsObject = YAML.parse(fileContents.toString());
const fileContentsObject = CloudRunnerCustomSteps.ParseSteps(fileContents.toString())[0];
if (fileContentsObject.hook === hookLifecycle) {
RemoteClientLogger.log(`Active Step File ${file} contents: ${fileContents}`);
results.push(...CloudRunnerCustomSteps.ParseSteps(fileContents));
@ -113,5 +113,5 @@ export class CustomStep {
public secrets: CloudRunnerSecret[] = new Array<CloudRunnerSecret>();
public name;
public image: string = `ubuntu`;
public hook!: string[];
public hook!: string;
}