Custom step file support
parent
088e2036de
commit
0c92fb9b90
|
|
@ -4448,6 +4448,9 @@ class CloudRunnerCustomSteps {
|
||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
static ParseSteps(steps) {
|
static ParseSteps(steps) {
|
||||||
|
if (steps === '') {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
let object;
|
let object;
|
||||||
try {
|
try {
|
||||||
if (cloud_runner_1.default.buildParameters.cloudRunnerIntegrationTests) {
|
if (cloud_runner_1.default.buildParameters.cloudRunnerIntegrationTests) {
|
||||||
|
|
@ -4457,20 +4460,20 @@ class CloudRunnerCustomSteps {
|
||||||
if (object === undefined) {
|
if (object === undefined) {
|
||||||
throw new Error(`Failed to parse ${steps}`);
|
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) {
|
catch (error) {
|
||||||
cloud_runner_logger_1.default.log(`failed to parse a custom job "${steps}"`);
|
cloud_runner_logger_1.default.log(`failed to parse a custom job "${steps}"`);
|
||||||
throw error;
|
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;
|
return object;
|
||||||
}
|
}
|
||||||
static RunPostBuildSteps(cloudRunnerStepState) {
|
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[] {
|
public static ParseSteps(steps: string): CustomStep[] {
|
||||||
|
if (steps === '') {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
let object: any;
|
let object: any;
|
||||||
try {
|
try {
|
||||||
if (CloudRunner.buildParameters.cloudRunnerIntegrationTests) {
|
if (CloudRunner.buildParameters.cloudRunnerIntegrationTests) {
|
||||||
|
|
@ -41,20 +44,21 @@ export class CloudRunnerCustomSteps {
|
||||||
if (object === undefined) {
|
if (object === undefined) {
|
||||||
throw new Error(`Failed to parse ${steps}`);
|
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) {
|
} catch (error) {
|
||||||
CloudRunnerLogger.log(`failed to parse a custom job "${steps}"`);
|
CloudRunnerLogger.log(`failed to parse a custom job "${steps}"`);
|
||||||
throw error;
|
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;
|
return object;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue