1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | const command_1 = require("@heroku-cli/command");
|
4 | const pipelines_1 = require("../../utils/pipelines");
|
5 | const test_run_1 = require("../../utils/test-run");
|
6 | class CiInfo extends command_1.Command {
|
7 | async run() {
|
8 | const { args, flags } = this.parse(CiInfo);
|
9 | const pipeline = await pipelines_1.getPipeline(flags, this);
|
10 | const { body: testRun } = await this.heroku.get(`/pipelines/${pipeline.id}/test-runs/${args['test-run']}`);
|
11 | const { body: testNodes } = await this.heroku.get(`/test-runs/${testRun.id}/test-nodes`);
|
12 | await test_run_1.displayTestRunInfo(this, testRun, testNodes, flags.node);
|
13 | }
|
14 | }
|
15 | CiInfo.description = 'show the status of a specific test run';
|
16 | CiInfo.examples = [
|
17 | `$ heroku ci:info 1288 --app murmuring-headland-14719
|
18 | `,
|
19 | ];
|
20 | CiInfo.flags = {
|
21 | app: command_1.flags.app({ required: false }),
|
22 | node: command_1.flags.string({ description: 'the node number to show its setup and output', required: false }),
|
23 | pipeline: command_1.flags.pipeline({ required: false })
|
24 | };
|
25 | CiInfo.args = [{ name: 'test-run', required: true }];
|
26 | exports.default = CiInfo;
|