Skip to content

Commit

Permalink
fix: ensure node-test-commit job id in daily-master (#460)
Browse files Browse the repository at this point in the history
* fix: get node-test-commit job id

* chore: remove unused setDailyBuildData
  • Loading branch information
Alicia Lopez committed Jul 21, 2020
1 parent 379317d commit 056cc8e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
11 changes: 9 additions & 2 deletions bin/ncu-ci
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,15 @@ class CICommand {
case DAILY_MASTER: {
const daily = new DailyBuild(cli, request, job.jobid);
const data = await daily.getBuildData();
build = new CommitBuild(cli, request, data.subBuilds[0].buildNumber);
break;
const testCommitBuild = data.subBuilds.filter(subBuild => {
return subBuild.jobName === 'node-test-commit';
})[0];
if (testCommitBuild) {
build = new CommitBuild(cli, request, testCommitBuild.buildNumber);
break;
} else {
throw new Error('Could not find \'node-test-commit\' job');
}
}
default:
throw new Error(`Unknown job type ${job.type}`);
Expand Down
7 changes: 0 additions & 7 deletions lib/ci/ci_result_parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,13 +225,6 @@ class TestBuild extends Job {
this.builtOn = builtOn;
}

setDailyBuildData({ result, changeSet, actions, timestamp, builtOn }) {
this.change = changeSet.items[0] || {};
this.date = new Date(timestamp);
this.result = result;
this.builtOn = builtOn;
}

get sourceURL() {
const { params } = this;

Expand Down

0 comments on commit 056cc8e

Please sign in to comment.