Custom step file support
parent
088e2036de
commit
0c92fb9b90
|
|
@ -4448,6 +4448,9 @@ class CloudRunnerCustomSteps {
|
|||
return results;
|
||||
}
|
||||
static ParseSteps(steps) {
|
||||
if (steps === '') {
|
||||
return [];
|
||||
}
|
||||
let object;
|
||||
try {
|
||||
if (cloud_runner_1.default.buildParameters.cloudRunnerIntegrationTests) {
|
||||
|
|
@ -4457,20 +4460,20 @@ class CloudRunnerCustomSteps {
|
|||
if (object === undefined) {
|
||||
throw new Error(`Failed to parse ${steps}`);
|
||||
}
|
||||
for (const step of object) {
|
||||
step.secrets = step.secrets.map((x) => {
|
||||
return {
|
||||
ParameterKey: x.name,
|
||||
EnvironmentVariable: input_1.default.ToEnvVarFormat(x.name),
|
||||
ParameterValue: x.value,
|
||||
};
|
||||
});
|
||||
}
|
||||
}
|
||||
catch (error) {
|
||||
cloud_runner_logger_1.default.log(`failed to parse a custom job "${steps}"`);
|
||||
throw error;
|
||||
}
|
||||
for (const step of object) {
|
||||
step.secrets = step.secrets.map((x) => {
|
||||
return {
|
||||
ParameterKey: x.name,
|
||||
EnvironmentVariable: input_1.default.ToEnvVarFormat(x.name),
|
||||
ParameterValue: x.value,
|
||||
};
|
||||
});
|
||||
}
|
||||
return object;
|
||||
}
|
||||
static RunPostBuildSteps(cloudRunnerStepState) {
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -32,6 +32,9 @@ export class CloudRunnerCustomSteps {
|
|||
}
|
||||
|
||||
public static ParseSteps(steps: string): CustomStep[] {
|
||||
if (steps === '') {
|
||||
return [];
|
||||
}
|
||||
let object: any;
|
||||
try {
|
||||
if (CloudRunner.buildParameters.cloudRunnerIntegrationTests) {
|
||||
|
|
@ -41,20 +44,21 @@ export class CloudRunnerCustomSteps {
|
|||
if (object === undefined) {
|
||||
throw new Error(`Failed to parse ${steps}`);
|
||||
}
|
||||
for (const step of object) {
|
||||
step.secrets = step.secrets.map((x) => {
|
||||
return {
|
||||
ParameterKey: x.name,
|
||||
EnvironmentVariable: Input.ToEnvVarFormat(x.name),
|
||||
ParameterValue: x.value,
|
||||
};
|
||||
});
|
||||
}
|
||||
} catch (error) {
|
||||
CloudRunnerLogger.log(`failed to parse a custom job "${steps}"`);
|
||||
throw error;
|
||||
}
|
||||
|
||||
for (const step of object) {
|
||||
step.secrets = step.secrets.map((x) => {
|
||||
return {
|
||||
ParameterKey: x.name,
|
||||
EnvironmentVariable: Input.ToEnvVarFormat(x.name),
|
||||
ParameterValue: x.value,
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
return object;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue