api

package
v0.0.39 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2024 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

View Source
const (
	Workspace      = "/tmp/workspace"
	GitHubUserKey  = "GITHUB_USER"
	GitHubTokenKey = "GITHUB_TOKEN"
	BranchMaster   = "master"
	LabelLocked    = "locked"
	LabelAutoMerge = "automerge"
	ReleasesDir    = "releases"

	StableChartRegistry     = "appscode"
	StableChartRegistryURL  = "https://charts.appscode.com/stable/"
	TestChartRegistry       = "appscode-testing"
	TestChartRegistryURL    = "https://charts.appscode.com/testing/"
	StableUIRegistry        = "bytebuilders-ui"
	StableUIRegistryURL     = "https://bundles.byte.builders/ui/"
	TestUIRegistry          = "bytebuilders-ui-dev"
	TestUIRegistryURL       = "https://raw.githubusercontent.com/bytebuilders/ui-wizards/"
	StableBundleRegistry    = "bytebuilders"
	StableBundleRegistryURL = "https://bundles.byte.builders/stable/"
	TestBundleRegistry      = "bytebuilders-testing"
	TestBundleRegistryURL   = "https://bundles.byte.builders/testing/"
)

Variables

This section is empty.

Functions

func StrictParseVersion added in v0.0.38

func StrictParseVersion(v string) (*semver.Version, error)

StrictParseVersion behaves as semver.StrictNewVersion, with as sole exception that it allows versions with a preceding "v" (i.e. v1.2.3). Ensure new releases are FluxCD compatible. xref: https://github.com/fluxcd/pkg/blob/main/version/version.go#L25-L33

Types

type Changelog

type Changelog struct {
	ProductLine       string             `json:"product_line"`
	Release           string             `json:"release"`
	ReleaseDate       time.Time          `json:"release_date"`
	ReleaseProjectURL string             `json:"release_project_url"`
	DocsURL           string             `json:"docs_url"`
	KubernetesVersion string             `json:"kubernetes_version,omitempty"`
	Projects          []ProjectChangelog `json:"projects"`
}

func (*Changelog) Sort

func (chlog *Changelog) Sort()

type ChangelogStatus

type ChangelogStatus string
const (
	AddToChangelog             ChangelogStatus = "" // by default show up in changelog
	SkipChangelog              ChangelogStatus = "Skip"
	StandaloneWebsiteChangelog ChangelogStatus = "StandaloneWebsite"
	SharedWebsiteChangelog     ChangelogStatus = "SharedWebsite"
)

type ChartPublishedReplyData

type ChartPublishedReplyData struct {
	Repo string
}

type ChartReplyData

type ChartReplyData struct {
	Repo string
	Tag  string
}

type CherryPickedReplyData

type CherryPickedReplyData struct {
	Repo           string
	Branch         string
	MergeCommitSHA string
}

type Commit

type Commit struct {
	SHA     string
	Subject string
}

type ExternalProject

type ExternalProject struct {
	Commands []string `json:"commands,omitempty"`
}

func (ExternalProject) GetCommands added in v0.0.2

func (p ExternalProject) GetCommands() []string

type GoReplyData

type GoReplyData struct {
	Repo       string
	ModulePath string
	VCSRoot    string
}

type IndependentProjects

type IndependentProjects map[string]Project

type KrewManifestPublishedReplyData added in v0.0.29

type KrewManifestPublishedReplyData struct {
	Repo string
}

type KrewManifestReplyData added in v0.0.29

type KrewManifestReplyData struct {
	Repo string
	Tag  string
}

type MergeData

type MergeData struct {
	Repo string
	Ref  string
}

func (MergeData) String

func (d MergeData) String() string

type Project

type Project struct {
	Key           string            `json:"key,omitempty"`
	Tag           *string           `json:"tag,omitempty"`
	Tags          map[string]string `json:"tags,omitempty"` // tag-> branch
	ChartNames    []string          `json:"chartNames,omitempty"`
	ChartRepos    []string          `json:"charts,omitempty"`
	Commands      []string          `json:"commands,omitempty"`
	ReleaseBranch string            `json:"release_branch,omitempty"`
	ReadyToTag    bool              `json:"ready_to_tag,omitempty"`
	Changelog     ChangelogStatus   `json:"changelog,omitempty"`
	SubProjects   []string          `json:"sub_projects,omitempty"`
}

func (Project) GetCommands added in v0.0.2

func (p Project) GetCommands() []string

type ProjectChangelog

type ProjectChangelog struct {
	URL      string             `json:"url"`
	Releases []ReleaseChangelog `json:"releases"`
}

type ProjectMeta added in v0.0.2

type ProjectMeta interface {
	GetCommands() []string
}

type PullRequestReplyData

type PullRequestReplyData struct {
	Repo   string
	Number int
}

type ReadyToTagReplyData

type ReadyToTagReplyData struct {
	Repo           string
	MergeCommitSHA string
}

type Release

type Release struct {
	ProductLine       string `json:"product_line"`
	Release           string `json:"release"`
	DocsURLTemplate   string `json:"docs_url_template"` // "https://stash.run/docs/%s"
	KubernetesVersion string `json:"kubernetes_version"`
	// These projects can be released in sequence
	Projects         []IndependentProjects      `json:"projects"`
	ExternalProjects map[string]ExternalProject `json:"external_projects,omitempty"`
}

func (Release) Validate added in v0.0.34

func (r Release) Validate() error

type ReleaseChangelog

type ReleaseChangelog struct {
	Tag     string   `json:"tag"`
	Commits []Commit `json:"commits"`
}

type ReleaseSummary

type ReleaseSummary struct {
	Release           string
	ReleaseDate       time.Time
	KubernetesVersion string
	ReleaseURL        string
	ChangelogURL      string
	DocsURL           string
}

type ReleaseTable

type ReleaseTable struct {
	ProductLine string
	Releases    []ReleaseSummary
}

type Replies

type Replies map[ReplyType][]Reply

func AppendReplyIfMissing

func AppendReplyIfMissing(replies Replies, r Reply) (Replies, bool)

func MergeReplies

func MergeReplies(replies Replies, elems ...Reply) Replies

func MergeReply

func MergeReply(replies Replies, r Reply) Replies

type Reply

type Reply struct {
	Type                  ReplyType
	Tagged                *TaggedReplyData
	PR                    *PullRequestReplyData
	ReadyToTag            *ReadyToTagReplyData
	CherryPicked          *CherryPickedReplyData
	Go                    *GoReplyData
	Chart                 *ChartReplyData
	ChartPublished        *ChartPublishedReplyData
	KrewManifest          *KrewManifestReplyData
	KrewManifestPublished *KrewManifestPublishedReplyData
}

func (Reply) Key

func (r Reply) Key() ReplyKey

type ReplyKey

type ReplyKey struct {
	Repo string
	B    string
}

type ReplyType

type ReplyType string
const (
	OkToRelease ReplyType = "/ok-to-release"
	Done        ReplyType = "/done"

	Tagged       ReplyType = "/tagged"
	Go           ReplyType = "/go"
	ReadyToTag   ReplyType = "/ready-to-tag"
	CherryPicked ReplyType = "/cherry-picked"
	PR           ReplyType = "/pr"

	Chart          ReplyType = "/chart"
	ChartPublished ReplyType = "/chart-published"

	KrewManifest          ReplyType = "/krew-manifest"
	KrewManifestPublished ReplyType = "/krew-manifest-published"
)

type TaggedReplyData

type TaggedReplyData struct {
	Repo string
}

Jump to

Keyboard shortcuts

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