evergreen

package
v0.0.0-...-6df37af Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EVG_API_BASE_URI    = "https://evergreen.mongodb.com/rest/v2"
	EVG_API_HEADER_USER = "Api-User"
	EVG_API_HEADER_KEY  = "Api-Key"

	EVG_USER_ENV_VAR = "EVG_USER"
	EVG_KEY_ENV_VAR  = "EVG_KEY"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type APIError

type APIError struct {
	Method string
	Path   string
	Status int
	Body   string
}

func (APIError) Error

func (e APIError) Error() string

func (APIError) String

func (e APIError) String() string

type Artifact

type Artifact struct {
	Name string `json:"name"`
	URL  string `json:"url"`
}

func GetArtifactsForTask

func GetArtifactsForTask(id string) ([]Artifact, error)

type BuildDetail

type BuildDetail struct {
	BuildVariant string `json:"build_variant"`
	BuildID      string `json:"build_id"`
}

type EvgVersion

type EvgVersion struct {
	BuildVariantStatus []BuildDetail `json:"build_variants_status"`
}

EvgVersion is a container for the /versions/<id> endpoint response. We only decode build_variants_status since that's all we care about.

type Task

type Task struct {
	TaskID      string `json:"task_id"`
	BuildID     string `json:"build_id"`
	Variant     string `json:"build_variant"`
	Status      string `json:"status"`
	DisplayName string `json:"display_name"`
}

func GetTasksForBuild

func GetTasksForBuild(build string) ([]Task, error)

GetTasksForBuild gets all the evergreen tasks associated with a build.

func GetTasksForVersion

func GetTasksForVersion(version string) ([]Task, error)

GetTasksForVersion gets all the evergreen tasks associated with a version.

func (Task) IsPatch

func (t Task) IsPatch() bool

IsPatch indicates whether the task is part of a patchbuild (as opposed to a task from the waterfall).

Jump to

Keyboard shortcuts

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