Custom step file support
parent
d0aa17b382
commit
21fc93696c
|
|
@ -4435,7 +4435,7 @@ class CloudRunnerCustomSteps {
|
||||||
const files = fs.readdirSync(gameCiCustomStepsPath);
|
const files = fs.readdirSync(gameCiCustomStepsPath);
|
||||||
for (const file of files) {
|
for (const file of files) {
|
||||||
const fileContents = fs.readFileSync(path_1.default.join(gameCiCustomStepsPath, file), `utf8`);
|
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) {
|
if (fileContentsObject.hook === hookLifecycle) {
|
||||||
remote_client_logger_1.RemoteClientLogger.log(`Active Step File ${file} contents: ${fileContents}`);
|
remote_client_logger_1.RemoteClientLogger.log(`Active Step File ${file} contents: ${fileContents}`);
|
||||||
results.push(...CloudRunnerCustomSteps.ParseSteps(fileContents));
|
results.push(...CloudRunnerCustomSteps.ParseSteps(fileContents));
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -18,7 +18,7 @@ export class CloudRunnerCustomSteps {
|
||||||
const files = fs.readdirSync(gameCiCustomStepsPath);
|
const files = fs.readdirSync(gameCiCustomStepsPath);
|
||||||
for (const file of files) {
|
for (const file of files) {
|
||||||
const fileContents = fs.readFileSync(path.join(gameCiCustomStepsPath, file), `utf8`);
|
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) {
|
if (fileContentsObject.hook === hookLifecycle) {
|
||||||
RemoteClientLogger.log(`Active Step File ${file} contents: ${fileContents}`);
|
RemoteClientLogger.log(`Active Step File ${file} contents: ${fileContents}`);
|
||||||
results.push(...CloudRunnerCustomSteps.ParseSteps(fileContents));
|
results.push(...CloudRunnerCustomSteps.ParseSteps(fileContents));
|
||||||
|
|
@ -113,5 +113,5 @@ export class CustomStep {
|
||||||
public secrets: CloudRunnerSecret[] = new Array<CloudRunnerSecret>();
|
public secrets: CloudRunnerSecret[] = new Array<CloudRunnerSecret>();
|
||||||
public name;
|
public name;
|
||||||
public image: string = `ubuntu`;
|
public image: string = `ubuntu`;
|
||||||
public hook!: string[];
|
public hook!: string;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue