Skip to content

ci: handle node-test-commit-custom-suites-freestyle #269

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 12, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions bin/ncu-ci
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const {

const {
PRBuild, BenchmarkRun, CommitBuild, listBuilds
, jobCache
// , jobCache
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was previously accidentally committed and should be reverted

} = require('../lib/ci/ci_result_parser');
const clipboardy = require('clipboardy');
const { writeJson } = require('../lib/file');
Expand All @@ -31,7 +31,7 @@ const chalk = require('chalk');

// This is used for testing
// Default cache dir is ${ncu-source-dir}/.ncu/cache
jobCache.enable();
// jobCache.enable();

// eslint-disable-next-line no-unused-vars
const argv = yargs
Expand Down
6 changes: 4 additions & 2 deletions lib/ci/ci_result_parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -358,11 +358,13 @@ class CommitBuild extends TestBuild {
}

cli.startSpinner(`Querying failures of ${path}`);
const promises = builds.failed.map(({jobName, buildNumber}) => {
const promises = builds.failed.map(({jobName, buildNumber, url}) => {
if (jobName.includes('fanned')) {
return new FannedBuild(cli, request, jobName, buildNumber).getResults();
} else if (jobName.includes('linter')) {
return new LinterBuild(cli, request, jobName, buildNumber).getResults();
} else if (jobName.includes('freestyle')) {
return new TestRun(cli, request, url).getResults();
}
return new NormalBuild(cli, request, jobName, buildNumber).getResults();
});
Expand Down Expand Up @@ -563,7 +565,7 @@ class NormalBuild extends Job {
return this.failures;
}

if (result === FAILURE && !runs.length) {
if (result === FAILURE && !(runs.length)) {
this.failures = [
new BuildFailure(
{ url: this.jobUrl, builtOn }, 'Failed to trigger runs'
Expand Down