Custom step file support
parent
9bc4650b83
commit
d3a9369f32
|
|
@ -4441,16 +4441,16 @@ 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 = CloudRunnerCustomSteps.ParseSteps(fileContents.toString())[0];
|
const fileContentsObject = CloudRunnerCustomSteps.ParseSteps(fileContents)[0];
|
||||||
if (fileContentsObject.hook === hookLifecycle) {
|
if (fileContentsObject.hook === hookLifecycle) {
|
||||||
remote_client_logger_1.RemoteClientLogger.log(`Active Step File ${file} contents: ${fileContents}`);
|
results.push(fileContentsObject);
|
||||||
results.push(...CloudRunnerCustomSteps.ParseSteps(fileContents));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
remote_client_logger_1.RemoteClientLogger.log(`Failed Getting: ${hookLifecycle} \n ${JSON.stringify(error, undefined, 4)}`);
|
remote_client_logger_1.RemoteClientLogger.log(`Failed Getting: ${hookLifecycle} \n ${JSON.stringify(error, undefined, 4)}`);
|
||||||
}
|
}
|
||||||
|
remote_client_logger_1.RemoteClientLogger.log(`Active Steps From Files: \n ${JSON.stringify(results, undefined, 4)}`);
|
||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
static ConvertYamlSecrets(object) {
|
static ConvertYamlSecrets(object) {
|
||||||
|
|
@ -5386,7 +5386,7 @@ class CustomWorkflow {
|
||||||
if ((_a = cloud_runner_1.default.buildParameters) === null || _a === void 0 ? void 0 : _a.cloudRunnerIntegrationTests) {
|
if ((_a = cloud_runner_1.default.buildParameters) === null || _a === void 0 ? void 0 : _a.cloudRunnerIntegrationTests) {
|
||||||
cloud_runner_logger_1.default.log(`Custom Job Description \n ${JSON.stringify(step, undefined, 4)}`);
|
cloud_runner_logger_1.default.log(`Custom Job Description \n ${JSON.stringify(step, undefined, 4)}`);
|
||||||
}
|
}
|
||||||
output += yield cloud_runner_1.default.Provider.runTask(cloud_runner_1.default.buildParameters.buildGuid, step['image'], step['commands'], `/${cloud_runner_folders_1.CloudRunnerFolders.buildVolumeFolder}`, `/${cloud_runner_folders_1.CloudRunnerFolders.projectPathAbsolute}/`, environmentVariables, [...secrets, ...step.secrets]);
|
output += yield cloud_runner_1.default.Provider.runTask(cloud_runner_1.default.buildParameters.buildGuid, step.image, step.commands, `/${cloud_runner_folders_1.CloudRunnerFolders.buildVolumeFolder}`, `/${cloud_runner_folders_1.CloudRunnerFolders.projectPathAbsolute}/`, environmentVariables, [...secrets, ...step.secrets]);
|
||||||
}
|
}
|
||||||
return output;
|
return output;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -18,15 +18,15 @@ 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 = CloudRunnerCustomSteps.ParseSteps(fileContents.toString())[0];
|
const fileContentsObject = CloudRunnerCustomSteps.ParseSteps(fileContents)[0];
|
||||||
if (fileContentsObject.hook === hookLifecycle) {
|
if (fileContentsObject.hook === hookLifecycle) {
|
||||||
RemoteClientLogger.log(`Active Step File ${file} contents: ${fileContents}`);
|
results.push(fileContentsObject);
|
||||||
results.push(...CloudRunnerCustomSteps.ParseSteps(fileContents));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
RemoteClientLogger.log(`Failed Getting: ${hookLifecycle} \n ${JSON.stringify(error, undefined, 4)}`);
|
RemoteClientLogger.log(`Failed Getting: ${hookLifecycle} \n ${JSON.stringify(error, undefined, 4)}`);
|
||||||
}
|
}
|
||||||
|
RemoteClientLogger.log(`Active Steps From Files: \n ${JSON.stringify(results, undefined, 4)}`);
|
||||||
|
|
||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -33,8 +33,8 @@ export class CustomWorkflow {
|
||||||
|
|
||||||
output += await CloudRunner.Provider.runTask(
|
output += await CloudRunner.Provider.runTask(
|
||||||
CloudRunner.buildParameters.buildGuid,
|
CloudRunner.buildParameters.buildGuid,
|
||||||
step['image'],
|
step.image,
|
||||||
step['commands'],
|
step.commands,
|
||||||
`/${CloudRunnerFolders.buildVolumeFolder}`,
|
`/${CloudRunnerFolders.buildVolumeFolder}`,
|
||||||
`/${CloudRunnerFolders.projectPathAbsolute}/`,
|
`/${CloudRunnerFolders.projectPathAbsolute}/`,
|
||||||
environmentVariables,
|
environmentVariables,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue