Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature] Rancher UI dashboard commands #474

Merged
merged 17 commits into from
Oct 16, 2024

Conversation

rafaelbreno
Copy link
Contributor

Commands added

$ release [repo] release-notes

Added support for repo:

  • ui
  • dashboard

Command examples:

  • $ release generate ui release-notes --milestone v2.9.1 --prev-milestone v2.9.0
  • $ release generate dashboard release-notes --milestone v2.9.1 --prev-milestone v2.9.0

This command will generate and output the release notes, based on two milestones.


$ release [repo] [ga,ra] [version]

Added support for repo:


$ release update rancher dashboard [version]

This command is ran in the rancher/rancher fork clone, where it will run a script that updates the two necessary fields, and opens a PR against rancher/rancher.

Command examples:

release/release.go Outdated Show resolved Hide resolved
release/rancher/rancher.go Outdated Show resolved Hide resolved
release/rancher/rancher.go Outdated Show resolved Hide resolved
release/rancher/rancher.go Outdated Show resolved Hide resolved
release/rancher/rancher.go Show resolved Hide resolved
cmd/release/config/config.go Outdated Show resolved Hide resolved
cmd/release/cmd/update.go Show resolved Hide resolved
cmd/release/cmd/update.go Show resolved Hide resolved
cmd/release/cmd/tag.go Outdated Show resolved Hide resolved
cmd/release/cmd/generate.go Outdated Show resolved Hide resolved
cmd/release/config/config.go Show resolved Hide resolved
cmd/release/config/config.go Outdated Show resolved Hide resolved
release/rancher/rancher.go Outdated Show resolved Hide resolved
release/release.go Outdated Show resolved Hide resolved
cmd/release/cmd/tag.go Show resolved Hide resolved
cmd/release/cmd/tag.go Outdated Show resolved Hide resolved
release/dashboard/dashboard.go Outdated Show resolved Hide resolved
release/ui/ui.go Outdated Show resolved Hide resolved
cmd/release/cmd/update.go Show resolved Hide resolved
Copy link
Contributor

@tashima42 tashima42 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remember to add the ui config example

cmd/release/cmd/tag.go Outdated Show resolved Hide resolved
Copy link
Contributor

@tashima42 tashima42 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using latestPreRelease and the release type also includes alphas and other future pre-release types, not just rcs

release/dashboard/dashboard.go Outdated Show resolved Hide resolved
release/dashboard/dashboard.go Outdated Show resolved Hide resolved
release/ui/ui.go Outdated Show resolved Hide resolved
Comment on lines +349 to +368
func genUIReleaseNotes(tmpl *template.Template, _ string, rd uiReleaseNoteData) (*bytes.Buffer, error) {
uiTemplate := fmt.Sprintf(dashboardReleaseNoteTemplate, "ui")
tmpl = template.Must(tmpl.Parse(uiTemplate))
b := bytes.NewBuffer(nil)
if err := tmpl.ExecuteTemplate(b, uiRepo, rd); err != nil {
return nil, err
}
return b, nil
}

func genDashboardReleaseNotes(tmpl *template.Template, _ string, rd dashboardReleaseNoteData) (*bytes.Buffer, error) {
dashboardTemplate := fmt.Sprintf(dashboardReleaseNoteTemplate, "dashboard")
tmpl = template.Must(tmpl.Parse(dashboardTemplate))
b := bytes.NewBuffer(nil)
if err := tmpl.ExecuteTemplate(b, dashboardRepo, rd); err != nil {
return nil, err
}
return b, nil
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not saying that we should do it, but I think this is a case where we could use the new go generics

release/dashboard/dashboard.go Outdated Show resolved Hide resolved
release/ui/ui.go Outdated Show resolved Hide resolved
@rafaelbreno rafaelbreno merged commit 515f16e into master Oct 16, 2024
2 checks passed
@rafaelbreno rafaelbreno deleted the feature/rancher-ui-dashboard branch October 16, 2024 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants