jenkinstool

package module
v0.0.0-...-6005204 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 9, 2023 License: BSD-2-Clause Imports: 15 Imported by: 0

README

jenkinstool

CLI tool for interacting with Jenkins repositories

Documentation

Index

Constants

View Source
const (
	Esc       = "\u001B["
	EraseLine = Esc + "2K"
	SOL       = "\r"
)
View Source
const (
	LatestBuild = "latest"
)

Variables

This section is empty.

Functions

func Download

func Download(serverURL *url.URL, build string, artifact *Artifact, dstdir string, replace bool, quiet bool) error

func GetRawBuildMetadata

func GetRawBuildMetadata(src *url.URL, build string) ([]byte, error)

func String

func String(v interface{}) string

Types

type Artifact

type Artifact struct {
	DisplayPath  string `json:"displayPath"`
	Filename     string `json:"fileName"`
	RelativePath string `json:"relativePath"`
}

type BuildInfo

type BuildInfo struct {
	Number *float64 `json:"number"`
	URL    *string  `json:"url"`
}

type BuildMetadata

type BuildMetadata struct {
	ID            *string      `json:"id"`
	Result        *string      `json:"result"`
	Artifacts     []*Artifact  `json:"artifacts"`
	ChangeSets    []*ChangeSet `json:"changeSets"`
	InProgress    bool         `json:"inProgress"`
	NextBuild     *BuildInfo   `json:"nextBuild"`
	PreviousBuild *BuildInfo   `json:"previousBuild"`
}

func GetBuildMetadata

func GetBuildMetadata(src *url.URL, build string) (*BuildMetadata, error)

func GetBuildMetadataFromBytes

func GetBuildMetadataFromBytes(raw []byte) (*BuildMetadata, error)

type ChangeSet

type ChangeSet struct {
	Class *string          `json:"_class"`
	Items []*ChangeSetItem `json:"items"`
}

type ChangeSetAuthor

type ChangeSetAuthor struct {
	AbsoluteURL *string `json:"absoluteUrl"`
	FullName    *string `json:"fullName"`
}

type ChangeSetItem

type ChangeSetItem struct {
	Class         *string          `json:"_class"`
	AffectedPaths []string         `json:"affectedPaths"`
	CommitId      *string          `json:"commitId"`
	Timestamp     *JsonTime        `json:"timestamp"`
	Author        *ChangeSetAuthor `json:"author"`
	AuthorEmail   *string          `json:"authorEmail"`
	Comment       *string          `json:"comment"`
	Date          *string          `json:"date"`
	Id            *string          `json:"id"`
	Msg           *string          `json:"msg"`
	Paths         []*ChangeSetPath `json:"paths"`
}

type ChangeSetPath

type ChangeSetPath struct {
	EditType *string `json:"editType"`
	File     *string `json:"file"`
}

type JsonTime

type JsonTime time.Time

func (JsonTime) MarshalJSON

func (t JsonTime) MarshalJSON() ([]byte, error)

func (JsonTime) String

func (t JsonTime) String() string

func (*JsonTime) UnmarshalJSON

func (t *JsonTime) UnmarshalJSON(s []byte) (err error)

type MetadataSyntaxError

type MetadataSyntaxError struct {
	Raw string

	Offset int64
	// contains filtered or unexported fields
}

func (*MetadataSyntaxError) Error

func (e *MetadataSyntaxError) Error() string

type StatusWriter

type StatusWriter struct {
	// contains filtered or unexported fields
}

func (*StatusWriter) Write

func (sw *StatusWriter) Write(data []byte) (int, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL