jx: github.com/jenkins-x/jx/pkg/cmd/step/report Index | Files

package report

import "github.com/jenkins-x/jx/pkg/cmd/step/report"

Index

Package Files

step_report.go step_report_chart.go step_report_image_version.go step_report_junit.go step_report_version.go

func NewCmdStepReport Uses

func NewCmdStepReport(commonOpts *opts.CommonOptions) *cobra.Command

NewCmdStepReport Creates a new Command object

func NewCmdStepReportChart Uses

func NewCmdStepReportChart(commonOpts *opts.CommonOptions) *cobra.Command

NewCmdStepReportChart Creates a new Command object

func NewCmdStepReportImageVersion Uses

func NewCmdStepReportImageVersion(commonOpts *opts.CommonOptions) *cobra.Command

NewCmdStepReportImageVersion Creates a new Command object

func NewCmdStepReportJUnit Uses

func NewCmdStepReportJUnit(commonOpts *opts.CommonOptions) *cobra.Command

NewCmdStepReportJUnit Creates a new Command object

func NewCmdStepReportVersion Uses

func NewCmdStepReportVersion(commonOpts *opts.CommonOptions) *cobra.Command

NewCmdStepReportVersion Creates a new Command object

func SortChartData Uses

func SortChartData(items []*ChartData)

SortChartData sorts the charts in order

type ChartData Uses

type ChartData struct {
    Prefix  string   `json:"prefix,omitempty"`
    Name    string   `json:"name,omitempty"`
    RepoURL string   `json:"url,omitempty"`
    Version string   `json:"version,omitempty"`
    Images  []string `json:"images,omitempty"`
}

ChartData the image information

type ChartReport Uses

type ChartReport struct {
    Charts          []*ChartData             `json:"charts,omitempty"`
    DuplicateImages []*DuplicateImageVersion `json:"duplicateImages,omitempty"`
}

ChartReport the report

func (*ChartReport) CalculateDuplicates Uses

func (r *ChartReport) CalculateDuplicates(imagesDir string) error

CalculateDuplicates figures out if there are any duplicate image versions

type DuplicateImageVersion Uses

type DuplicateImageVersion struct {
    Image    string
    Versions map[string]string
}

DuplicateImageVersion the duplicate images

type Failure Uses

type Failure struct {
    Text string `xml:",chardata"`
    Type string `xml:"type,attr"`
}

Failure is the representation of a Failure that can be present in a TestCase within a TestSuite in a *.junit.xml xml file

type ImageMap Uses

type ImageMap struct {
    Images map[string]map[string]string
}

ImageMap used to map images to their versions

func LoadImageMap Uses

func LoadImageMap(imagesDir string) (ImageMap, error)

LoadImageMap loads the images from the given image stream dir

func (*ImageMap) AddImage Uses

func (m *ImageMap) AddImage(name string, version string, from string)

AddImage adds a new image to the map

func (*ImageMap) DuplicateImages Uses

func (m *ImageMap) DuplicateImages() []*DuplicateImageVersion

DuplicateImages returns the duplicate images

type ImageVersionReport Uses

type ImageVersionReport struct {
    Versions []Pair `json:"versions,omitempty"`
    Failures []Pair `json:"failures,omitempty"`
}

ImageVersionReport the report

type Pair Uses

type Pair struct {
    Name  string `json:"name,omitempty"`
    Value string `json:"value,omitempty"`
}

Pair represents a name and value

type StepReportChartOptions Uses

type StepReportChartOptions struct {
    StepReportOptions
    VersionsDir     string
    ReportName      string
    FailOnDuplicate bool

    Report ChartReport
}

StepReportChartOptions contains the command line flags and other helper objects

func (*StepReportChartOptions) Run Uses

func (o *StepReportChartOptions) Run() error

Run generates the report

type StepReportImageVersionOptions Uses

type StepReportImageVersionOptions struct {
    StepReportOptions
    FileName              string
    VersionsDir           string
    GitURL                string
    GitBranch             string
    ServiceAccount        string
    UserName              string
    Email                 string
    Folder                string
    Includes              []string
    Excludes              []string
    BackoffLimit          int32
    ActiveDeadlineSeconds int64
    TestImage             string
    StashImage            string
    ContainerDir          string
    BatchSize             int
    NoWait                bool
    NoDeleteJob           bool
    JobWaitTimeout        time.Duration

    Report ImageVersionReport
}

StepReportImageVersionOptions contains the command line flags and other helper objects

func (*StepReportImageVersionOptions) Run Uses

func (o *StepReportImageVersionOptions) Run() error

Run generates the report

type StepReportJUnitOptions Uses

type StepReportJUnitOptions struct {
    StepReportOptions
    reportingtools.XUnitClient
    MergeReports     bool
    ReportsDir       string
    TargetReport     string
    SuiteName        string
    OutputReportName string
    DeleteReportFn   func(reportName string) error
}

StepReportJUnitOptions contains the command line flags and other helper objects

func (*StepReportJUnitOptions) Run Uses

func (o *StepReportJUnitOptions) Run() error

Run generates the report

type StepReportOptions Uses

type StepReportOptions struct {
    step.StepOptions
    OutputDir string
}

StepReportOptions contains the command line flags and other helper objects

func (*StepReportOptions) AddReportFlags Uses

func (o *StepReportOptions) AddReportFlags(cmd *cobra.Command)

AddReportFlags adds common report flags

func (*StepReportOptions) OutputReport Uses

func (o *StepReportOptions) OutputReport(report interface{}, fileName string, outputDir string) error

OutputReport outputs the report to the terminal or a file

func (*StepReportOptions) Run Uses

func (o *StepReportOptions) Run() error

Run implements this command

type StepReportVersionOptions Uses

type StepReportVersionOptions struct {
    StepReportOptions
    FileName string
    Packages []string

    Report VersionReport
}

StepReportVersionOptions contains the command line flags and other helper objects

func (*StepReportVersionOptions) Run Uses

func (o *StepReportVersionOptions) Run() error

Run generates the report

type TestCase Uses

type TestCase struct {
    XMLName   xml.Name `xml:"testcase"`
    Text      string   `xml:",chardata"`
    Name      string   `xml:"name,attr"`
    Classname string   `xml:"classname,attr"`
    Time      string   `xml:"time,attr"`
    Failure   *Failure `xml:"failure,omitempty"`
    SystemOut string   `xml:"system-out"`
}

TestCase is the representation of an individual test case within a TestSuite in a *.junit.xml xml file

type TestSuite Uses

type TestSuite struct {
    XMLName  xml.Name   `xml:"testsuite"`
    Text     string     `xml:",chardata"`
    Name     string     `xml:"name,attr"`
    Tests    string     `xml:"tests,attr"`
    Failures string     `xml:"failures,attr"`
    Errors   string     `xml:"errors,attr"`
    Time     string     `xml:"time,attr"`
    TestCase []TestCase `xml:"testcase"`
}

TestSuite is the representation of a <testsuite> of a *.junit.xml xml file

type TestSuites Uses

type TestSuites struct {
    XMLName    xml.Name    `xml:"testsuites"`
    Text       string      `xml:",chardata"`
    TestSuites []TestSuite `xml:"testsuite"`
}

TestSuites is the representation of the root of a *.junit.xml xml file

type VersionReport Uses

type VersionReport struct {
    Versions []Pair `json:"versions,omitempty"`
    Failures []Pair `json:"failures,omitempty"`
}

VersionReport the report

Package report imports 29 packages (graph) and is imported by 1 packages. Updated 2019-11-14. Refresh now. Tools for package owners.