diff --git a/src/job/jobHandler.ts b/src/job/jobHandler.ts index e8bde8906..db0bd4e69 100644 --- a/src/job/jobHandler.ts +++ b/src/job/jobHandler.ts @@ -473,14 +473,19 @@ export abstract class JobHandler { this.cleanup(); await this.cloneRepo(this._config.get('repo_dir')); this._logger.info(this._currJob._id, 'Cloned Repo'); + this._logger.save(this._currJob._id, 'Cloned Repo'); await this.commitCheck(); this._logger.info(this._currJob._id, 'Checked Commit'); + this._logger.save(this._currJob._id, 'Checked Commit'); await this.pullRepo(); this._logger.info(this._currJob._id, 'Pulled Repo'); + this._logger.save(this._currJob._id, 'Pulled Repo'); this.prepBuildCommands(); this._logger.info(this._currJob._id, 'Prepared Build commands'); + this._logger.save(this._currJob._id, 'Prepared Build commands'); await this.prepNextGenBuild(); this._logger.info(this._currJob._id, 'Prepared Next Gen build'); + this._logger.save(this._currJob._id, 'Prepared Next Gen build'); await this._repoConnector.applyPatch(this.currJob); this._logger.info(this._currJob._id, 'Patch Applied'); await this.downloadMakeFile(); diff --git a/src/services/repo.ts b/src/services/repo.ts index 77f177a03..eb302f89e 100644 --- a/src/services/repo.ts +++ b/src/services/repo.ts @@ -56,12 +56,18 @@ export class GitHubConnector implements IRepoConnector { async cloneRepo(job: Job, targetPath: string): Promise { try { + await this._jobRepoLogger.save( + job._id, + 'IN CLONE REPO ' + this.getBasePath(job) + '/' + job.payload.repoOwner + '/' + job.payload.repoName + ); + await this._jobRepoLogger.save(job._id, 'NOW local ' + `${targetPath}/${job.payload.repoName}`); await git.clone( this.getBasePath(job) + '/' + job.payload.repoOwner + '/' + job.payload.repoName, `${targetPath}/${job.payload.repoName}` ); await this._jobRepoLogger.save(job._id, `${'(GIT)'.padEnd(15)}Finished git clone`); } catch (errResult) { + await this._jobRepoLogger.save(job._id, `Git clone fail, ${JSON.stringify(errResult)}`); await this._jobRepoLogger.save(job._id, `${'(GIT)'.padEnd(15)}stdErr: ${errResult.stderr}`); throw errResult; }