Custom step file support
parent
0c92fb9b90
commit
3737200c1b
|
|
@ -4457,14 +4457,6 @@ class CloudRunnerCustomSteps {
|
||||||
cloud_runner_logger_1.default.log(`Parsing build steps: ${steps}`);
|
cloud_runner_logger_1.default.log(`Parsing build steps: ${steps}`);
|
||||||
}
|
}
|
||||||
object = yaml_1.default.parse(steps);
|
object = yaml_1.default.parse(steps);
|
||||||
if (object === undefined) {
|
|
||||||
throw new Error(`Failed to parse ${steps}`);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (error) {
|
|
||||||
cloud_runner_logger_1.default.log(`failed to parse a custom job "${steps}"`);
|
|
||||||
throw error;
|
|
||||||
}
|
|
||||||
for (const step of object) {
|
for (const step of object) {
|
||||||
step.secrets = step.secrets.map((x) => {
|
step.secrets = step.secrets.map((x) => {
|
||||||
return {
|
return {
|
||||||
|
|
@ -4474,6 +4466,14 @@ class CloudRunnerCustomSteps {
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
if (object === undefined) {
|
||||||
|
throw new Error(`Failed to parse ${steps}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (error) {
|
||||||
|
cloud_runner_logger_1.default.log(`failed to parse a custom job "${steps} \n ${JSON.stringify(error, undefined, 4)}"`);
|
||||||
|
throw error;
|
||||||
|
}
|
||||||
return object;
|
return object;
|
||||||
}
|
}
|
||||||
static RunPostBuildSteps(cloudRunnerStepState) {
|
static RunPostBuildSteps(cloudRunnerStepState) {
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -41,14 +41,6 @@ export class CloudRunnerCustomSteps {
|
||||||
CloudRunnerLogger.log(`Parsing build steps: ${steps}`);
|
CloudRunnerLogger.log(`Parsing build steps: ${steps}`);
|
||||||
}
|
}
|
||||||
object = YAML.parse(steps);
|
object = YAML.parse(steps);
|
||||||
if (object === undefined) {
|
|
||||||
throw new Error(`Failed to parse ${steps}`);
|
|
||||||
}
|
|
||||||
} catch (error) {
|
|
||||||
CloudRunnerLogger.log(`failed to parse a custom job "${steps}"`);
|
|
||||||
throw error;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (const step of object) {
|
for (const step of object) {
|
||||||
step.secrets = step.secrets.map((x) => {
|
step.secrets = step.secrets.map((x) => {
|
||||||
return {
|
return {
|
||||||
|
|
@ -58,6 +50,13 @@ export class CloudRunnerCustomSteps {
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
if (object === undefined) {
|
||||||
|
throw new Error(`Failed to parse ${steps}`);
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
CloudRunnerLogger.log(`failed to parse a custom job "${steps} \n ${JSON.stringify(error, undefined, 4)}"`);
|
||||||
|
throw error;
|
||||||
|
}
|
||||||
|
|
||||||
return object;
|
return object;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue