utils

package
v0.0.0-...-bf835f9 Latest Latest
Warning

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

Go to latest
Published: May 9, 2016 License: Apache-2.0, Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// GoogleBucketURL is an url go GCS bucket with results of Google-run tests.
	GoogleBucketURL = "https://storage.googleapis.com/kubernetes-jenkins/logs"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type FinishedFile

type FinishedFile struct {
	Result    string `json:"result"`
	Timestamp uint64 `json:"timestamp"`
}

FinishedFile is a type in which we store test result in GCS as finished.json

type Utils

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

Utils is a struct handling all communication with a given bucket

func NewUtils

func NewUtils(bucketURL string) *Utils

NewUtils returnes new Utils struct for a given bucket url

func (*Utils) CheckFinishedStatus

func (u *Utils) CheckFinishedStatus(job string, buildNumber int) (bool, error)

CheckFinishedStatus reads the finished.json file for a given job and build number. It returns true if the result stored there is success, and false otherwise.

func (*Utils) GetFileFromJenkinsGoogleBucket

func (u *Utils) GetFileFromJenkinsGoogleBucket(job string, buildNumber int, path string) (*http.Response, error)

GetFileFromJenkinsGoogleBucket reads data from Google project's GCS bucket for the given job and buildNumber. Returns a response with file stored under a given (relative) path or an error.

func (*Utils) GetLastestBuildNumberFromJenkinsGoogleBucket

func (u *Utils) GetLastestBuildNumberFromJenkinsGoogleBucket(job string) (int, error)

GetLastestBuildNumberFromJenkinsGoogleBucket reads a the number of last completed build of the given job from the Google project's GCS bucket .

Jump to

Keyboard shortcuts

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