UNPKG

1.19 kBJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3const command_1 = require("@heroku-cli/command");
4const pipelines_1 = require("../../utils/pipelines");
5const test_run_1 = require("../../utils/test-run");
6class 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}
15CiInfo.description = 'show the status of a specific test run';
16CiInfo.examples = [
17 `$ heroku ci:info 1288 --app murmuring-headland-14719
18`,
19];
20CiInfo.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};
25CiInfo.args = [{ name: 'test-run', required: true }];
26exports.default = CiInfo;