Expect build params in remote client as json
parent
d57e2a67f7
commit
d6d79a3bf9
|
|
@ -652,7 +652,7 @@ class AWSBuildRunner {
|
|||
const json = JSON.parse(zlib.gunzipSync(Buffer.from(records.Records[index].Data, 'base64')).toString('utf8'));
|
||||
if (json.messageType === 'DATA_MESSAGE') {
|
||||
for (let logEventsIndex = 0; logEventsIndex < json.logEvents.length; logEventsIndex++) {
|
||||
const message = json.logEvents[logEventsIndex].message;
|
||||
let message = json.logEvents[logEventsIndex].message;
|
||||
if (json.logEvents[logEventsIndex].message.includes(taskDef.logid)) {
|
||||
cloud_runner_logger_1.default.log('End of cloud runner job logs');
|
||||
readingLogs = false;
|
||||
|
|
@ -660,6 +660,7 @@ class AWSBuildRunner {
|
|||
else if (message.includes('Rebuilding Library because the asset database could not be found!')) {
|
||||
core.warning('LIBRARY NOT FOUND!');
|
||||
}
|
||||
message = `[AWS][${taskDef.taskDefStackName}] ${message}`;
|
||||
if (cloud_runner_state_1.CloudRunnerState.buildParams.logToFile) {
|
||||
fs_1.default.appendFileSync(`${cloud_runner_state_1.CloudRunnerState.buildGuid}-outputfile.txt`, `${message}\r\n`);
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -171,13 +171,14 @@ class AWSBuildRunner {
|
|||
);
|
||||
if (json.messageType === 'DATA_MESSAGE') {
|
||||
for (let logEventsIndex = 0; logEventsIndex < json.logEvents.length; logEventsIndex++) {
|
||||
const message = json.logEvents[logEventsIndex].message;
|
||||
let message = json.logEvents[logEventsIndex].message;
|
||||
if (json.logEvents[logEventsIndex].message.includes(taskDef.logid)) {
|
||||
CloudRunnerLogger.log('End of cloud runner job logs');
|
||||
readingLogs = false;
|
||||
} else if (message.includes('Rebuilding Library because the asset database could not be found!')) {
|
||||
core.warning('LIBRARY NOT FOUND!');
|
||||
}
|
||||
message = `[AWS][${taskDef.taskDefStackName}] ${message}`;
|
||||
if (CloudRunnerState.buildParams.logToFile) {
|
||||
fs.appendFileSync(`${CloudRunnerState.buildGuid}-outputfile.txt`, `${message}\r\n`);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,8 +28,6 @@ describe('Cloud Runner', () => {
|
|||
const baseImage = new ImageTag(buildParameter);
|
||||
await CloudRunner.run(buildParameter, baseImage.toString());
|
||||
const file = fs.readFileSync(`${CloudRunnerState.buildGuid}-outputfile.txt`, 'utf-8').toString();
|
||||
// eslint-disable-next-line no-console
|
||||
console.log(file);
|
||||
const buildParameterKeys = Object.keys(buildParameter);
|
||||
for (const element of buildParameterKeys) {
|
||||
if (buildParameter[element] !== undefined) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue