command start and end injector
parent
d2c92576f0
commit
178956ad5d
|
|
@ -2418,10 +2418,11 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|||
exports.CloudRunnerBuildCommandProcessor = void 0;
|
||||
class CloudRunnerBuildCommandProcessor {
|
||||
static ProcessCommands(commands) {
|
||||
return `
|
||||
echo "start"
|
||||
${commands}
|
||||
echo "end"`;
|
||||
return `echo "---"
|
||||
echo "start"
|
||||
${commands}
|
||||
echo "end"
|
||||
`;
|
||||
}
|
||||
}
|
||||
exports.CloudRunnerBuildCommandProcessor = CloudRunnerBuildCommandProcessor;
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -30,7 +30,9 @@ describe('Cloud Runner', () => {
|
|||
buildParameter.logToFile = true;
|
||||
const baseImage = new ImageTag(buildParameter);
|
||||
await CloudRunner.run(buildParameter, baseImage.toString());
|
||||
const file = fs.readFileSync(`${CloudRunnerState.buildGuid}-outputfile.txt`, 'utf-8').toString();
|
||||
const testOutput = `${CloudRunnerState.buildGuid}-outputfile.txt`;
|
||||
expect(fs.existsSync(testOutput)).toBeTruthy();
|
||||
const file = fs.readFileSync(testOutput, 'utf-8').toString();
|
||||
expect(file).toContain(JSON.stringify(buildParameter));
|
||||
expect(file).toContain(`${testSecretName}=${testSecretValue}`);
|
||||
const inputKeys = Object.getOwnPropertyNames(Input);
|
||||
|
|
|
|||
|
|
@ -1,8 +1,9 @@
|
|||
export class CloudRunnerBuildCommandProcessor {
|
||||
public static ProcessCommands(commands: string): string {
|
||||
return `
|
||||
echo "start"
|
||||
${commands}
|
||||
echo "end"`;
|
||||
return `echo "---"
|
||||
echo "start"
|
||||
${commands}
|
||||
echo "end"
|
||||
`;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue