Documentation
¶
Index ¶
- func ApplyJQ(data interface{}, expression string, w io.Writer, pretty bool) error
- func ApplyTemplate(data interface{}, tmpl string, w io.Writer) error
- func CollectLogSnapshot(ctx context.Context, client *jenkins.Client, jobPath string, buildNumber int, ...) (bool, error)
- func DurationString(ms int64) string
- func GetJQExpression(cmd *cobra.Command) string
- func GetOutputFormat(cmd *cobra.Command) string
- func GetTemplate(cmd *cobra.Command) string
- func JenkinsClient(cmd *cobra.Command, f *cmdutil.Factory) (*jenkins.Client, error)
- func NewExitError(code int, msg string) error
- func PrintOutput(cmd *cobra.Command, data interface{}, human func() error) error
- func ResolveContextName(cmd *cobra.Command, cfg *config.Config) (string, error)
- func StreamProgressiveLog(ctx context.Context, client *jenkins.Client, jobPath string, buildNumber int, ...) error
- func ValidateOutputFlags(cmd *cobra.Command) error
- func WantsJQ(cmd *cobra.Command) bool
- func WantsJSON(cmd *cobra.Command) bool
- func WantsQuiet(cmd *cobra.Command) bool
- func WantsTemplate(cmd *cobra.Command) bool
- func WantsYAML(cmd *cobra.Command) bool
- type TestCase
- type TestReport
- type TestSuite
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyJQ ¶ added in v0.0.12
ApplyJQ executes a jq expression on data and writes results to w. Strings are output without quotes (gh-ux pattern).
func ApplyTemplate ¶ added in v0.0.12
ApplyTemplate executes a Go template on data and writes results to w.
func CollectLogSnapshot ¶
func DurationString ¶
func GetJQExpression ¶ added in v0.0.12
GetJQExpression retrieves the --jq flag value from the root command.
func GetOutputFormat ¶ added in v0.0.12
GetOutputFormat returns the requested output format from --format flag. Returns empty string for default human-readable output. Note: Using --format instead of --output to avoid conflict with artifact --output/-o flag.
func GetTemplate ¶ added in v0.0.12
GetTemplate retrieves the --template flag value from the root command.
func JenkinsClient ¶
func NewExitError ¶
func ResolveContextName ¶
func StreamProgressiveLog ¶
func ValidateOutputFlags ¶ added in v0.0.13
ValidateOutputFlags enforces output flag combinations and supported formats.
func WantsJQ ¶ added in v0.0.12
WantsJQ returns true if --jq flag is set with a non-empty expression.
func WantsQuiet ¶ added in v0.0.12
WantsQuiet returns true if --quiet/-q flag is set or JK_QUIET env var is present. Currently supported by: run start, run rerun. Other commands (view, cancel, ls) do not implement quiet mode as they primarily output structured data where --json is more appropriate.
func WantsTemplate ¶ added in v0.0.12
WantsTemplate returns true if --template flag is set.
Types ¶
type TestReport ¶
type TestReport struct {
TotalCount int `json:"totalCount"`
FailCount int `json:"failCount"`
SkipCount int `json:"skipCount"`
Suites []TestSuite `json:"suites"`
}