Documentation ¶
Overview ¶
Package repositories contains actual implementations of the repository interfaces defined in the `core` package. It currently supports Google Cloud Storage (GCS) for Bazel releases, release candidates and Bazel binaries built at arbitrary commits. Moreover, it supports GitHub for Bazel forks.
Index ¶
- type GCSRepo
- func (gcs *GCSRepo) DownloadAtCommit(commit, destDir, destFile string) (string, error)
- func (gcs *GCSRepo) DownloadCandidate(version, destDir, destFile string) (string, error)
- func (gcs *GCSRepo) DownloadRelease(version, destDir, destFile string) (string, error)
- func (gcs *GCSRepo) DownloadRolling(version, destDir, destFile string) (string, error)
- func (gcs *GCSRepo) GetCandidateVersions(bazeliskHome string) ([]string, error)
- func (gcs *GCSRepo) GetLastGreenCommit(bazeliskHome string, downstreamGreen bool) (string, error)
- func (gcs *GCSRepo) GetReleaseVersions(bazeliskHome string, filter core.ReleaseFilter) ([]string, error)
- func (gcs *GCSRepo) GetRollingVersions(bazeliskHome string) ([]string, error)
- type GcsListResponse
- type GitHubRepo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GCSRepo ¶
type GCSRepo struct{}
GCSRepo represents a Bazel repository on Google Cloud Storage that contains Bazel releases, release candidates and Bazel binaries built at arbitrary commits. It can return all available Bazel versions, as well as downloading a specific version.
func (*GCSRepo) DownloadAtCommit ¶
DownloadAtCommit downloads a Bazel binary built at the given commit into the specified location and returns the absolute path.
func (*GCSRepo) DownloadCandidate ¶
DownloadCandidate downloads the given release candidate into the specified location and returns the absolute path.
func (*GCSRepo) DownloadRelease ¶
DownloadRelease downloads the given Bazel release into the specified location and returns the absolute path.
func (*GCSRepo) DownloadRolling ¶ added in v1.12.0
DownloadRolling downloads the given Bazel version into the specified location and returns the absolute path.
func (*GCSRepo) GetCandidateVersions ¶
GetCandidateVersions returns all versions of available release candidates for the latest release in this repository.
func (*GCSRepo) GetLastGreenCommit ¶
GetLastGreenCommit returns the most recent commit at which a Bazel binary passed a specific Bazel CI pipeline. If downstreamGreen is true, the pipeline is https://buildkite.com/bazel/bazel-at-head-plus-downstream, otherwise it's https://buildkite.com/bazel/bazel-bazel
func (*GCSRepo) GetReleaseVersions ¶
func (gcs *GCSRepo) GetReleaseVersions(bazeliskHome string, filter core.ReleaseFilter) ([]string, error)
GetReleaseVersions returns the versions of all available Bazel releases in this repository that match the given filter.
type GcsListResponse ¶
type GcsListResponse struct { // Prefixes contains the available string prefixes. Prefixes []string `json:"prefixes"` // Items contains the names of available objects in the current GCS bucket. Items []interface{} `json:"items"` // Optional token when the result is paginated. NextPageToken string `json:"nextPageToken"` }
GcsListResponse represents the result of listing the contents of a GCS bucket. Public for testing
type GitHubRepo ¶
type GitHubRepo struct {
// contains filtered or unexported fields
}
GitHubRepo represents a fork of Bazel hosted on GitHub, and provides a list of all available Bazel binaries in that repo, as well as the ability to download them.
func CreateGitHubRepo ¶
func CreateGitHubRepo(token string) *GitHubRepo
CreateGitHubRepo instantiates a new GitHubRepo.
func (*GitHubRepo) DownloadVersion ¶
func (gh *GitHubRepo) DownloadVersion(fork, version, destDir, destFile string) (string, error)
DownloadVersion downloads a Bazel binary for the given version and fork to the specified location and returns the absolute path.
func (*GitHubRepo) GetVersions ¶
func (gh *GitHubRepo) GetVersions(bazeliskHome, bazelFork string) ([]string, error)
GetVersions returns the versions of all available Bazel binaries in the given fork.