Documentation ¶
Index ¶
- Constants
- func Anago(o *Options) error
- func BuiltWithBazel(workDir string) (bool, error)
- func GetDefaultToolRepoURL() string
- func GetKubecrossVersion(branches ...string) (string, error)
- func GetToolBranch() string
- func GetToolOrg() string
- func GetToolRepo() string
- func GetToolRepoURL(org, repo string, useSSH bool) string
- func IsDirtyBuild(build string) bool
- func IsValidReleaseBuild(build string) (bool, error)
- func ReadBazelVersion(workDir string) (string, error)
- func ReadDockerizedVersion(workDir string) (string, error)
- func SetBuildVersion(branch string) error
- func URLPrefixForBucket(bucket string) string
- type Options
- type Repo
- type Repository
- type Version
- type VersionClient
- type VersionType
Constants ¶
const ( // gcbmgr/anago defaults DefaultToolRepo = "release" DefaultToolBranch = git.Master DefaultToolOrg = git.DefaultGithubOrg // TODO(vdf): Need to reference K8s Infra project here DefaultKubernetesStagingProject = "kubernetes-release-test" DefaultRelengStagingProject = "k8s-staging-releng" DefaultDiskSize = "300" BucketPrefix = "kubernetes-release-" // GCSStagePath is the directory where release artifacts are staged before // push to GCS. GCSStagePath = "gcs-stage" // ReleaseStagePath is the directory where releases are staged. ReleaseStagePath = "release-stage" // GCEPath is the directory where GCE scripts are created. GCEPath = "release-stage/full/kubernetes/cluster/gce" // GCIPath is the path for the container optimized OS for GCP. GCIPath = "release-stage/full/kubernetes/cluster/gce/gci" // ReleaseTarsPath is the directory where release artifacts are created. ReleaseTarsPath = "release-tars" // WindowsLocalPath is the directory where Windows GCE scripts are created. WindowsLocalPath = "release-stage/full/kubernetes/cluster/gce/windows" // WindowsGCSPath is the directory where Windoes GCE scripts are staged // before push to GCS. WindowsGCSPath = "gcs-stage/extra/gce/windows" // ProductionBucket is the default bucket for Kubernetes releases ProductionBucket = "kubernetes-release" // ProductionBucketURL is the url for the ProductionBucket ProductionBucketURL = "https://dl.k8s.io" )
const (
DefaultBaseDir = "$HOME/anago"
)
Variables ¶
This section is empty.
Functions ¶
func BuiltWithBazel ¶
BuiltWithBazel determines whether the most recent Kubernetes release was built with Bazel.
func GetDefaultToolRepoURL ¶ added in v0.2.5
func GetDefaultToolRepoURL() string
GetDefaultToolRepoURL returns the default HTTPS repo URL for Release Engineering tools. Expected: https://github.com/kubernetes/release
func GetKubecrossVersion ¶ added in v0.2.3
GetKubecrossVersion returns the current kube-cross container version. Replaces release::kubecross_version
func GetToolBranch ¶ added in v0.2.5
func GetToolBranch() string
GetToolBranch checks if the 'TOOL_BRANCH' environment variable is set. If 'TOOL_BRANCH' is non-empty, it returns the value. Otherwise, it returns DefaultToolBranch.
func GetToolOrg ¶ added in v0.2.5
func GetToolOrg() string
GetToolOrg checks if the 'TOOL_ORG' environment variable is set. If 'TOOL_ORG' is non-empty, it returns the value. Otherwise, it returns DefaultToolOrg.
func GetToolRepo ¶ added in v0.2.5
func GetToolRepo() string
GetToolRepo checks if the 'TOOL_REPO' environment variable is set. If 'TOOL_REPO' is non-empty, it returns the value. Otherwise, it returns DefaultToolRepo.
func GetToolRepoURL ¶ added in v0.2.5
GetToolRepoURL takes a GitHub org and repo, and useSSH as a boolean and returns a repo URL for Release Engineering tools. Expected result is one of the following: - https://github.com/<org>/release - git@github.com:<org>/release
func IsDirtyBuild ¶
IsDirtyBuild checks if build version is dirty.
func IsValidReleaseBuild ¶
IsValidReleaseBuild checks if build version is valid for release.
func ReadBazelVersion ¶
ReadBazelVersion reads the version from a Bazel build.
func ReadDockerizedVersion ¶
ReadDockerizedVersion reads the version from a Dockerized Kubernetes build.
func SetBuildVersion ¶ added in v0.3.0
SetBuildVersion sets the build version for a branch
func URLPrefixForBucket ¶ added in v0.2.6
URLPrefixForBucket returns the URL prefix for the provided bucket string
Types ¶
type Repo ¶ added in v0.3.0
type Repo struct {
// contains filtered or unexported fields
}
Repo is a wrapper around a kubernetes/release repository
func (*Repo) CheckState ¶ added in v0.3.0
CheckState verifies that the repository is in the requested state
func (*Repo) Open ¶ added in v0.3.0
Open assumes the current working directory as repository root and tries to open it
func (*Repo) SetRepo ¶ added in v0.3.0
func (r *Repo) SetRepo(repo Repository)
SetRepo can be used to set the internal repository implementation
type Repository ¶ added in v0.3.0
type Repository interface { Describe(opts *git.DescribeOptions) (string, error) CurrentBranch() (branch string, err error) Head() (string, error) Remotes() (res []*git.Remote, err error) LsRemote(...string) (string, error) IsDirty() (bool, error) }
Repository is an interface for interacting with a git repository
type Version ¶ added in v0.3.0
type Version struct {
// contains filtered or unexported fields
}
Version is a wrapper around version related functionality
func (*Version) GetKubeVersion ¶ added in v0.3.0
func (v *Version) GetKubeVersion(versionType VersionType) (string, error)
GetKubeVersion retrieves the version of the provided Kubernetes version type
func (*Version) GetKubeVersionForBranch ¶ added in v0.3.0
func (v *Version) GetKubeVersionForBranch(versionType VersionType, branch string) (string, error)
GetKubeVersionForBranch returns the remote Kubernetes release version for the provided branch
func (*Version) SetClient ¶ added in v0.3.0
func (v *Version) SetClient(client VersionClient)
SetClient can be used to manually set the internal Version client
type VersionClient ¶ added in v0.3.0
VersionClient is a client for getting Kubernetes versions
type VersionType ¶ added in v0.2.6
type VersionType string
VersionType is a simple wrapper around a Kubernetes release version
const ( // VersionTypeStable references the latest stable Kubernetes // version, for example `v1.17.3` VersionTypeStable VersionType = "release/stable" // VersionTypeStablePreRelease references the latest stable pre // release Kubernetes version, for example `v1.19.0-alpha.0` VersionTypeStablePreRelease VersionType = "release/latest" // VersionTypeCILatest references the latest CI Kubernetes version, // for example `v1.19.0-alpha.0.721+f8ff8f44206ff4` VersionTypeCILatest VersionType = "ci/latest" )
func (VersionType) URL ¶ added in v0.3.0
func (t VersionType) URL(version string) string
URL retrieves the full URL of the Kubernetes release version