Documentation
¶
Overview ¶
Package task implements tasks involved in making a Go release.
Index ¶
- Variables
- func AwaitCondition(ctx *wf.TaskContext, period time.Duration, condition func() (T, bool, error)) (T, error)
- func ChangeLink(changeID string) string
- func ConvertTGZToZIP(r io.Reader, w io.Writer) error
- func LatestGoBinaries(ctx context.Context) (string, error)
- func NewSendGridMailClient(sendgridAPIKey string) realSendGridMailClient
- func NewTwitterClient(t secret.TwitterCredentials) realTwitterClient
- func ServeTarball(pathMatch string, files map[string]string, w http.ResponseWriter, ...)
- func WriteSourceArchive(ctx *workflow.TaskContext, client *http.Client, ...) error
- type AnnounceMailTasks
- func (t AnnounceMailTasks) AnnounceRelease(ctx *workflow.TaskContext, versions []string, security []string, ...) (SentMail, error)
- func (t AnnounceMailTasks) AwaitAnnounceMail(ctx *workflow.TaskContext, m SentMail) (announcementURL string, _ error)
- func (t AnnounceMailTasks) PreAnnounceRelease(ctx *workflow.TaskContext, versions []string, target Date, security string, ...) (SentMail, error)
- type BuildletStep
- func (b *BuildletStep) BuildBinary(ctx *workflow.TaskContext, sourceArchive io.Reader, out io.Writer) error
- func (b *BuildletStep) BuildDarwinPKG(ctx *workflow.TaskContext, binaryArchive io.Reader, goVersion string, ...) error
- func (b *BuildletStep) BuildWindowsMSI(ctx *workflow.TaskContext, binaryArchive io.Reader, msi io.Writer) error
- func (b *BuildletStep) ConvertPKGToTGZ(ctx *workflow.TaskContext, in io.Reader, out io.Writer) error
- func (b *BuildletStep) RunTryBot(ctx *workflow.TaskContext, sourceArchive io.Reader) (bool, error)
- func (b *BuildletStep) TestTarget(ctx *workflow.TaskContext, binaryArchive io.Reader) error
- type CommunicationTasks
- type Date
- type FakeBuildlets
- type FakeGerrit
- func (g *FakeGerrit) CreateAutoSubmitChange(ctx context.Context, input gerrit.ChangeInput, reviewers []string, ...) (string, error)
- func (g *FakeGerrit) GerritURL() string
- func (g *FakeGerrit) GetCommitsInRefs(ctx context.Context, project string, commits, refs []string) (map[string][]string, error)
- func (g *FakeGerrit) GetTag(ctx context.Context, project string, tag string) (gerrit.TagInfo, error)
- func (g *FakeGerrit) ListProjects(ctx context.Context) ([]string, error)
- func (g *FakeGerrit) ListTags(ctx context.Context, project string) ([]string, error)
- func (g *FakeGerrit) ReadBranchHead(ctx context.Context, project, branch string) (string, error)
- func (g *FakeGerrit) ReadFile(ctx context.Context, project string, commit string, file string) ([]byte, error)
- func (g *FakeGerrit) Submitted(ctx context.Context, changeID, baseCommit string) (string, bool, error)
- func (g *FakeGerrit) Tag(ctx context.Context, project, tag, commit string) error
- type FakeRepo
- type GerritClient
- type GitHubClient
- func (c *GitHubClient) EditIssue(ctx context.Context, owner string, repo string, number int, ...) (*github.Issue, *github.Response, error)
- func (c *GitHubClient) EditMilestone(ctx context.Context, owner string, repo string, number int, ...) (*github.Milestone, *github.Response, error)
- func (c *GitHubClient) FetchMilestone(ctx context.Context, owner, repo, name string, create bool) (int, error)
- func (c *GitHubClient) FetchMilestoneIssues(ctx context.Context, owner, repo string, milestoneID int) (map[int]map[string]bool, error)
- type GitHubClientInterface
- type LogWriter
- type MailContent
- type MailHeader
- type MilestoneTasks
- func (m *MilestoneTasks) CheckBlockers(ctx *wf.TaskContext, milestones ReleaseMilestones, version string, ...) error
- func (m *MilestoneTasks) FetchMilestones(ctx *wf.TaskContext, currentVersion string, kind ReleaseKind) (ReleaseMilestones, error)
- func (m *MilestoneTasks) PushIssues(ctx *wf.TaskContext, milestones ReleaseMilestones, version string, ...) error
- type RealGerritClient
- func (c *RealGerritClient) CreateAutoSubmitChange(ctx context.Context, input gerrit.ChangeInput, reviewers []string, ...) (string, error)
- func (c *RealGerritClient) GetCommitsInRefs(ctx context.Context, project string, commits, refs []string) (map[string][]string, error)
- func (c *RealGerritClient) GetTag(ctx context.Context, project, tag string) (gerrit.TagInfo, error)
- func (c *RealGerritClient) ListProjects(ctx context.Context) ([]string, error)
- func (c *RealGerritClient) ListTags(ctx context.Context, project string) ([]string, error)
- func (c *RealGerritClient) ReadBranchHead(ctx context.Context, project, branch string) (string, error)
- func (c *RealGerritClient) ReadFile(ctx context.Context, project, commit, file string) ([]byte, error)
- func (c *RealGerritClient) Submitted(ctx context.Context, changeID, parentCommit string) (string, bool, error)
- func (c *RealGerritClient) Tag(ctx context.Context, project, tag, commit string) error
- type ReleaseKind
- type ReleaseMilestones
- type SentMail
- type TagRepo
- type TagXReposTasks
- func (x *TagXReposTasks) AwaitGoMod(ctx *wf.TaskContext, changeID, repo, branch string) (string, error)
- func (x *TagXReposTasks) AwaitGreen(ctx *wf.TaskContext, repo TagRepo, commit string) (string, error)
- func (x *TagXReposTasks) BuildPlan(wd *wf.Definition, repos []TagRepo, reviewers []string) error
- func (x *TagXReposTasks) BuildSingleRepoPlan(wd *wf.Definition, repoSlice []TagRepo, name string, reviewers []string) error
- func (x *TagXReposTasks) MailGoMod(ctx *wf.TaskContext, repo string, files map[string]string, reviewers []string) (string, error)
- func (x *TagXReposTasks) MaybeTag(ctx *wf.TaskContext, repo TagRepo, commit string) (TagRepo, error)
- func (x *TagXReposTasks) NewDefinition() *wf.Definition
- func (x *TagXReposTasks) NewSingleDefinition() *wf.Definition
- func (x *TagXReposTasks) SelectRepos(ctx *wf.TaskContext) ([]TagRepo, error)
- func (x *TagXReposTasks) UpdateGoMod(ctx *wf.TaskContext, repo TagRepo, deps []TagRepo, branch string) (files map[string]string, _ error)
- type TweetTasks
- type VersionTasks
- func (t *VersionTasks) AwaitCL(ctx *workflow.TaskContext, changeID, baseCommit string) (string, error)
- func (t *VersionTasks) CreateAutoSubmitVersionCL(ctx *workflow.TaskContext, branch string, reviewers []string, version string) (string, error)
- func (t *VersionTasks) CreateUpdateStdlibIndexCL(ctx *workflow.TaskContext, reviewers []string, version string) (string, error)
- func (t *VersionTasks) GetCurrentMajor(ctx context.Context) (int, error)
- func (t *VersionTasks) GetNextVersion(ctx context.Context, kind ReleaseKind) (string, error)
- func (t *VersionTasks) GetNextVersions(ctx context.Context, kinds []ReleaseKind) ([]string, error)
- func (t *VersionTasks) MailDLCL(ctx *workflow.TaskContext, versions []string, reviewers []string, dryRun bool) (changeID string, _ error)
- func (t *VersionTasks) ReadBranchHead(ctx *workflow.TaskContext, branch string) (string, error)
- func (t *VersionTasks) TagRelease(ctx *workflow.TaskContext, version, commit string) error
- type WebsiteFile
- type WebsiteRelease
Constants ¶
This section is empty.
Variables ¶
var AwaitDivisor int = 1
var ErrTweetTooLong = fmt.Errorf("tweet text length exceeded Twitter's limit")
ErrTweetTooLong is the error when a tweet is too long.
Functions ¶
func AwaitCondition ¶
func AwaitCondition[T any](ctx *wf.TaskContext, period time.Duration, condition func() (T, bool, error)) (T, error)
AwaitCondition calls the condition function every period until it returns true to indicate success, or an error. If the condition succeeds, AwaitCondition returns its result.
func ChangeLink ¶
ChangeLink returns a link to the review page for the CL with the specified change ID. The change ID must be in the project~cl# form.
func LatestGoBinaries ¶
LatestGoBinaries returns a URL to the latest linux/amd64 Go distribution archive using the go.dev/dl/ JSON API.
func NewSendGridMailClient ¶
func NewSendGridMailClient(sendgridAPIKey string) realSendGridMailClient
NewSendGridMailClient creates a SendGrid mail client authenticated with the given API key.
func NewTwitterClient ¶
func NewTwitterClient(t secret.TwitterCredentials) realTwitterClient
NewTwitterClient creates a Twitter API client authenticated to make Twitter API calls using the provided credentials.
func ServeTarball ¶
func ServeTarball(pathMatch string, files map[string]string, w http.ResponseWriter, r *http.Request)
ServeTarball serves files as a .tar.gz to w, only if path contains pathMatch.
func WriteSourceArchive ¶
func WriteSourceArchive(ctx *workflow.TaskContext, client *http.Client, gerritURL, revision, version string, out io.Writer) error
WriteSourceArchive writes a source archive to out, based on revision with version written in as VERSION.
Types ¶
type AnnounceMailTasks ¶
type AnnounceMailTasks struct { // SendMail sends an email with the given header and content // using an externally-provided implementation. // // Email delivery happens asynchronously, so SendMail returns a nil error // if the transmission was started successfully, but that error value // doesn't indicate anything about the status of the delivery. SendMail func(MailHeader, MailContent) error // AnnounceMailHeader is the header to use for the release (pre-)announcement email. AnnounceMailHeader MailHeader // contains filtered or unexported fields }
AnnounceMailTasks contains tasks related to the release (pre-)announcement email.
func (AnnounceMailTasks) AnnounceRelease ¶
func (t AnnounceMailTasks) AnnounceRelease(ctx *workflow.TaskContext, versions []string, security []string, users []string) (SentMail, error)
AnnounceRelease sends an email announcing a Go release to Google Groups.
func (AnnounceMailTasks) AwaitAnnounceMail ¶
func (t AnnounceMailTasks) AwaitAnnounceMail(ctx *workflow.TaskContext, m SentMail) (announcementURL string, _ error)
AwaitAnnounceMail waits for an announcement email with the specified subject to show up on Google Groups, and returns its canonical URL.
func (AnnounceMailTasks) PreAnnounceRelease ¶
func (t AnnounceMailTasks) PreAnnounceRelease(ctx *workflow.TaskContext, versions []string, target Date, security string, users []string) (SentMail, error)
PreAnnounceRelease sends an email pre-announcing a Go release containing PRIVATE track security fixes planned for the target date.
type BuildletStep ¶
type BuildletStep struct { Target *releasetargets.Target Buildlet buildlet.RemoteClient BuildConfig *dashboard.BuildConfig LogWriter io.Writer }
func (*BuildletStep) BuildBinary ¶
func (b *BuildletStep) BuildBinary(ctx *workflow.TaskContext, sourceArchive io.Reader, out io.Writer) error
BuildBinary builds a binary distribution from sourceArchive and writes it to out.
func (*BuildletStep) BuildDarwinPKG ¶
func (b *BuildletStep) BuildDarwinPKG(ctx *workflow.TaskContext, binaryArchive io.Reader, goVersion string, pkg io.Writer) error
BuildDarwinPKG builds an unsigned macOS installer for the given Go version and binary archive. It writes the result to pkg.
func (*BuildletStep) BuildWindowsMSI ¶
func (b *BuildletStep) BuildWindowsMSI(ctx *workflow.TaskContext, binaryArchive io.Reader, msi io.Writer) error
func (*BuildletStep) ConvertPKGToTGZ ¶
func (b *BuildletStep) ConvertPKGToTGZ(ctx *workflow.TaskContext, in io.Reader, out io.Writer) error
ConvertPKGToTGZ converts a macOS installer (.pkg) to a .tar.gz tarball.
func (*BuildletStep) RunTryBot ¶
func (b *BuildletStep) RunTryBot(ctx *workflow.TaskContext, sourceArchive io.Reader) (bool, error)
func (*BuildletStep) TestTarget ¶
func (b *BuildletStep) TestTarget(ctx *workflow.TaskContext, binaryArchive io.Reader) error
type CommunicationTasks ¶
type CommunicationTasks struct { AnnounceMailTasks TweetTasks }
CommunicationTasks combines communication tasks together.
type Date ¶
type Date struct { Year int // Year (for example, 2009). Month time.Month // Month of the year (January = 1, ...). Day int // Day of the month, starting at 1. }
A Date represents a single calendar day (year, month, day).
This type does not include location information, and therefore does not describe a unique 24-hour timespan.
TODO(go.dev/issue/19700): Start using time.Day or so when available.
type FakeBuildlets ¶
type FakeBuildlets struct {
// contains filtered or unexported fields
}
func NewFakeBuildlets ¶
NewFakeBuildlets creates a set of fake buildlets. httpServer is the base URL of form http://host with no trailing slash where PutTarFromURL downloads remote URLs from. sysCmds optionally allows overriding the named system commands during testing with the given executable content.
func (*FakeBuildlets) CreateBuildlet ¶
func (b *FakeBuildlets) CreateBuildlet(_ context.Context, kind string) (buildlet.RemoteClient, error)
func (*FakeBuildlets) DumpLogs ¶
func (b *FakeBuildlets) DumpLogs()
type FakeGerrit ¶
type FakeGerrit struct {
// contains filtered or unexported fields
}
func NewFakeGerrit ¶
func NewFakeGerrit(t *testing.T, repos ...*FakeRepo) *FakeGerrit
func (*FakeGerrit) CreateAutoSubmitChange ¶
func (g *FakeGerrit) CreateAutoSubmitChange(ctx context.Context, input gerrit.ChangeInput, reviewers []string, contents map[string]string) (string, error)
func (*FakeGerrit) GerritURL ¶
func (g *FakeGerrit) GerritURL() string
func (*FakeGerrit) GetCommitsInRefs ¶
func (*FakeGerrit) ListProjects ¶
func (g *FakeGerrit) ListProjects(ctx context.Context) ([]string, error)
func (*FakeGerrit) ReadBranchHead ¶
type FakeRepo ¶
type FakeRepo struct {
// contains filtered or unexported fields
}
func (*FakeRepo) GetRepoContent ¶
GetRepoContent returns the content of repo based on the value of commit: - commit is "master": return content of the most recent revision - commit is tag: return content of the repo associating with the commit that the tag maps to - commit is neither "master" or tag: return content of the repo associated with that commit
type GerritClient ¶
type GerritClient interface { // CreateAutoSubmitChange creates a change with the given metadata and // contents, sets Run-TryBots and Auto-Submit, and returns its change ID. // If the content of a file is empty, that file will be deleted from the repository. // If the requested contents match the state of the repository, no change // is created and the returned change ID will be empty. // Reviewers is the username part of a google.com or golang.org email address. CreateAutoSubmitChange(ctx context.Context, input gerrit.ChangeInput, reviewers []string, contents map[string]string) (string, error) // Submitted checks if the specified change has been submitted or failed // trybots. If the CL is submitted, returns the submitted commit hash. // If parentCommit is non-empty, the submitted CL's parent must match it. Submitted(ctx context.Context, changeID, parentCommit string) (string, bool, error) // GetTag returns tag information for a specified tag. GetTag(ctx context.Context, project, tag string) (gerrit.TagInfo, error) // Tag creates a tag on project at the specified commit. Tag(ctx context.Context, project, tag, commit string) error // ListTags returns all the tags on project. ListTags(ctx context.Context, project string) ([]string, error) // ReadBranchHead returns the head of a branch in project. ReadBranchHead(ctx context.Context, project, branch string) (string, error) // ListProjects lists all the projects on the server. ListProjects(ctx context.Context) ([]string, error) // ReadFile reads a file from project at the specified commit. ReadFile(ctx context.Context, project, commit, file string) ([]byte, error) // GetCommitsInRefs gets refs in which the specified commits were merged into. GetCommitsInRefs(ctx context.Context, project string, commits, refs []string) (map[string][]string, error) }
type GitHubClient ¶
func (*GitHubClient) EditMilestone ¶
func (*GitHubClient) FetchMilestone ¶
type GitHubClientInterface ¶
type GitHubClientInterface interface { // FetchMilestone returns the number of the requested milestone. If create is true, // and the milestone doesn't exist, it will be created. FetchMilestone(ctx context.Context, owner, repo, name string, create bool) (int, error) // FetchMilestoneIssues returns all the open issues in the specified milestone // and their labels. FetchMilestoneIssues(ctx context.Context, owner, repo string, milestoneID int) (map[int]map[string]bool, error) // See github.Client.Issues.Edit. EditIssue(ctx context.Context, owner string, repo string, number int, issue *github.IssueRequest) (*github.Issue, *github.Response, error) // See github.Client.Issues.EditMilestone EditMilestone(ctx context.Context, owner string, repo string, number int, milestone *github.Milestone) (*github.Milestone, *github.Response, error) }
GitHubClientInterface is a wrapper around the GitHub v3 and v4 APIs, for testing and dry-run support.
type LogWriter ¶
LogWriter is an io.Writer that writes to a workflow task's log, flushing its buffer periodically to avoid too many writes.
type MailContent ¶
A MailContent holds the content of an email.
type MailHeader ¶
type MailHeader struct { From mail.Address // An RFC 5322 address. For example, "Barry Gibbs <bg@example.com>". To mail.Address BCC []mail.Address }
A MailHeader is an email header.
type MilestoneTasks ¶
type MilestoneTasks struct { Client GitHubClientInterface RepoOwner, RepoName string ApproveAction func(*wf.TaskContext) error }
MilestoneTasks contains the tasks used to check and modify GitHub issues' milestones.
func (*MilestoneTasks) CheckBlockers ¶
func (m *MilestoneTasks) CheckBlockers(ctx *wf.TaskContext, milestones ReleaseMilestones, version string, kind ReleaseKind) error
CheckBlockers returns an error if there are open release blockers in the current milestone.
func (*MilestoneTasks) FetchMilestones ¶
func (m *MilestoneTasks) FetchMilestones(ctx *wf.TaskContext, currentVersion string, kind ReleaseKind) (ReleaseMilestones, error)
FetchMilestones returns the milestone numbers for the version currently being released, and the next version that outstanding issues should be moved to. If this is a major release, it also creates its first minor release milestone.
func (*MilestoneTasks) PushIssues ¶
func (m *MilestoneTasks) PushIssues(ctx *wf.TaskContext, milestones ReleaseMilestones, version string, kind ReleaseKind) error
PushIssues updates issues to reflect a finished release. For major and minor releases, it moves issues to the next milestone and closes the current milestone. For pre-releases, it cleans up any "okay-after-..." labels in the current milestone that are done serving their purpose.
type RealGerritClient ¶
func (*RealGerritClient) CreateAutoSubmitChange ¶
func (c *RealGerritClient) CreateAutoSubmitChange(ctx context.Context, input gerrit.ChangeInput, reviewers []string, files map[string]string) (string, error)
func (*RealGerritClient) GetCommitsInRefs ¶
func (*RealGerritClient) ListProjects ¶
func (c *RealGerritClient) ListProjects(ctx context.Context) ([]string, error)
func (*RealGerritClient) ReadBranchHead ¶
type ReleaseKind ¶
type ReleaseKind int
ReleaseKind is the type of release being run.
const ( KindUnknown ReleaseKind = iota KindBeta KindRC KindMajor KindCurrentMinor KindPrevMinor )
type ReleaseMilestones ¶
type ReleaseMilestones struct {
Current, Next int
}
type SentMail ¶
type SentMail struct {
Subject string // Subject of the email. Expected to be unique so it can be used to identify the email.
}
SentMail represents an email that was sent.
type TagRepo ¶
type TagRepo struct { Name string // Gerrit project name, e.g. "tools". ModPath string // Module path, e.g. "golang.org/x/tools". Deps []string // Dependency module paths. Compat string // The Go version to pass to go mod tidy -compat for this repository. StartVersion string // The version of the module when the workflow started. Version string // After a tagging decision has been made, the version dependencies should upgrade to. }
TagRepo contains information about a repo that can be tagged.
type TagXReposTasks ¶
type TagXReposTasks struct { IgnoreProjects map[string]bool // project name -> ignore Gerrit GerritClient GerritURL string CreateBuildlet func(context.Context, string) (buildlet.RemoteClient, error) LatestGoBinaries func(context.Context) (string, error) DashboardURL string }
func (*TagXReposTasks) AwaitGoMod ¶
func (x *TagXReposTasks) AwaitGoMod(ctx *wf.TaskContext, changeID, repo, branch string) (string, error)
func (*TagXReposTasks) AwaitGreen ¶
func (x *TagXReposTasks) AwaitGreen(ctx *wf.TaskContext, repo TagRepo, commit string) (string, error)
func (*TagXReposTasks) BuildPlan ¶
func (x *TagXReposTasks) BuildPlan(wd *wf.Definition, repos []TagRepo, reviewers []string) error
BuildPlan adds the tasks needed to update repos to wd.
func (*TagXReposTasks) BuildSingleRepoPlan ¶
func (x *TagXReposTasks) BuildSingleRepoPlan(wd *wf.Definition, repoSlice []TagRepo, name string, reviewers []string) error
func (*TagXReposTasks) MailGoMod ¶
func (x *TagXReposTasks) MailGoMod(ctx *wf.TaskContext, repo string, files map[string]string, reviewers []string) (string, error)
func (*TagXReposTasks) MaybeTag ¶
func (x *TagXReposTasks) MaybeTag(ctx *wf.TaskContext, repo TagRepo, commit string) (TagRepo, error)
MaybeTag tags repo at commit with the next version, unless commit is already the latest tagged version. repo is returned with Version populated.
func (*TagXReposTasks) NewDefinition ¶
func (x *TagXReposTasks) NewDefinition() *wf.Definition
func (*TagXReposTasks) NewSingleDefinition ¶
func (x *TagXReposTasks) NewSingleDefinition() *wf.Definition
func (*TagXReposTasks) SelectRepos ¶
func (x *TagXReposTasks) SelectRepos(ctx *wf.TaskContext) ([]TagRepo, error)
func (*TagXReposTasks) UpdateGoMod ¶
func (x *TagXReposTasks) UpdateGoMod(ctx *wf.TaskContext, repo TagRepo, deps []TagRepo, branch string) (files map[string]string, _ error)
type TweetTasks ¶
type TweetTasks struct { // TwitterClient can be used to post a tweet. TwitterClient interface { // PostTweet posts a tweet with the given text and PNG image, // both of which must be non-empty, and returns the tweet URL. // // ErrTweetTooLong error is returned if posting fails // due to the tweet text length exceeding Twitter's limit. PostTweet(text string, imagePNG []byte) (tweetURL string, _ error) } // RandomSeed is the pseudo-random number generator seed to use for presentational // choices, such as selecting one out of many available emoji or release archives. // The zero value means to use time.Now().UnixNano(). RandomSeed int64 }
TweetTasks contains tasks related to the release tweet.
func (TweetTasks) TweetRelease ¶
func (t TweetTasks) TweetRelease(ctx *workflow.TaskContext, versions []string, security string, announcement string) (tweetURL string, _ error)
TweetRelease posts a tweet announcing a Go release. ErrTweetTooLong is returned if the inputs result in a tweet that's too long.
type VersionTasks ¶
type VersionTasks struct { Gerrit GerritClient GerritURL string GoProject string CreateBuildlet func(context.Context, string) (buildlet.RemoteClient, error) LatestGoBinaries func(context.Context) (string, error) }
VersionTasks contains tasks related to versioning the release.
func (*VersionTasks) AwaitCL ¶
func (t *VersionTasks) AwaitCL(ctx *workflow.TaskContext, changeID, baseCommit string) (string, error)
AwaitCL waits for the specified CL to be submitted, and returns the new branch head. Callers can pass baseCommit, the current branch head, to verify that no CLs were submitted between when the CL was created and when it was merged. If changeID is blank because the intended CL was a no-op, baseCommit is returned immediately.
func (*VersionTasks) CreateAutoSubmitVersionCL ¶
func (t *VersionTasks) CreateAutoSubmitVersionCL(ctx *workflow.TaskContext, branch string, reviewers []string, version string) (string, error)
CreateAutoSubmitVersionCL mails an auto-submit change to update VERSION on branch.
func (*VersionTasks) CreateUpdateStdlibIndexCL ¶
func (t *VersionTasks) CreateUpdateStdlibIndexCL(ctx *workflow.TaskContext, reviewers []string, version string) (string, error)
func (*VersionTasks) GetCurrentMajor ¶
func (t *VersionTasks) GetCurrentMajor(ctx context.Context) (int, error)
func (*VersionTasks) GetNextVersion ¶
func (t *VersionTasks) GetNextVersion(ctx context.Context, kind ReleaseKind) (string, error)
GetNextVersion returns the next for the given type of release.
func (*VersionTasks) GetNextVersions ¶
func (t *VersionTasks) GetNextVersions(ctx context.Context, kinds []ReleaseKind) ([]string, error)
GetNextVersions returns the next for each of the given types of release.
func (*VersionTasks) MailDLCL ¶
func (t *VersionTasks) MailDLCL(ctx *workflow.TaskContext, versions []string, reviewers []string, dryRun bool) (changeID string, _ error)
MailDLCL mails a golang.org/dl CL that adds commands for the specified Go versions. It accepts one or two versions only.
The versions must use the same format as Go tags. For example:
- "go1.17.2" and "go1.16.9" for a minor Go release
- "go1.18" for a major Go release
- "go1.18beta1" or "go1.18rc1" for a pre-release
On success, the ID of the change is returned, like "dl~1234".
func (*VersionTasks) ReadBranchHead ¶
func (t *VersionTasks) ReadBranchHead(ctx *workflow.TaskContext, branch string) (string, error)
ReadBranchHead returns the current HEAD revision of branch.
func (*VersionTasks) TagRelease ¶
func (t *VersionTasks) TagRelease(ctx *workflow.TaskContext, version, commit string) error
TagRelease tags commit as version.
type WebsiteFile ¶
type WebsiteFile struct { Filename string `json:"filename"` OS string `json:"os"` Arch string `json:"arch"` Version string `json:"version"` ChecksumSHA256 string `json:"sha256"` Size int64 `json:"size"` Kind string `json:"kind"` // "archive", "installer", "source" }
WebsiteFile represents a file on the go.dev downloads page. It should be kept in sync with the download code in x/website/internal/dl.
func (WebsiteFile) GOARCH ¶
func (f WebsiteFile) GOARCH() string
type WebsiteRelease ¶
type WebsiteRelease struct { Version string `json:"version"` Stable bool `json:"stable"` Files []WebsiteFile `json:"files"` Visible bool `json:"-"` // show files on page load SplitPortTable bool `json:"-"` // whether files should be split by primary/other ports. }
Source Files
¶
Directories
¶
Path | Synopsis |
---|---|
Command releaselet does buildlet-side release construction tasks.
|
Command releaselet does buildlet-side release construction tasks. |