package
0.43.0
Repository: https://github.com/rancher/ecm-distro-tools.git
Documentation: pkg.go.dev

# README

backport

The backport utility will create backport issues and perform a cherry-pick of the given commits to the given branches, if commits are provided on the CLI. If no commits are given, only the backport issues are created.

If a commit is provided, backport assumes you're running from the repository the operation is related to. This is simply to avoid having to guess or figure out where you store your code on your local system.

Flags

FlagDescriptionRequired
repo, rName of the repository to perform the backport, e.g: k3s, rke2TRUE
issue, iID of the original issue on GitHubTRUE
branches, bBranches the issue is being backported to, one or more (comma separated)TRUE
owner, oOwner of the repository e.g: k3s-io, rancherTRUE
commits, cCommits to be backported, if none is provided, only the issues will be created. When passing this flag, it assumes you're running from the repository this operation is related to (comma separated)FALSE
user, uUser to assign new issues to (default: user assignted to the original issue)FALSE
dry-run, nSkip creating issues and pushing changes to remoteFALSE
skip-create-issue, sSkip creating issuesFALSE
github-token, g, GITHUB_TOKENGithub TokenTRUE

Examples

  • Backport K3s change into release-1.21 and release-1.22. Only create the backport issues.
cd k3s
export GITHUB_TOKEN={YOUR_GITHUB_TOKEN}
backport -r k3s -o k3s-io -b 'release-1.21,release-1.22' -i 123
  • Backport K3s change into release-1.21 and release-1.22. Creates the backport issues and cherry-picks the given commit id.
cd k3s
export GITHUB_TOKEN={YOUR_GITHUB_TOKEN}
backport -r k3s -o k3s-io -b 'release-1.21,release-1.22' -i 123 -c '181210f8f9c779c26da1d9b2075bde0127302ee0'
  • Backport RKE2 change into release-1.20, release-1.21 and release-1.22
cd rke2
export GITHUB_TOKEN={YOUR_GITHUB_TOKEN}
backport -r rke2 -o rancher -b 'release-1.20,release-1.21,release-1.22' -i 456 -c 'cd700d9a444df8f03b8ce88cb90261ed1bc49f27'
  • Backport K3s change into release-1.21 and release-1.22 and assign to given user.
cd k3s
export GITHUB_TOKEN={YOUR_GITHUB_TOKEN}
backport -r k3s -o k3s-io -b 'release-1.21,release-1.22' -i 123 -u susejsmith

Contributions

  • File Issue with details of the problem, feature request, etc.
  • Submit a pull request and include details of what problem or feature the code is solving or implementing.

# Structs

No description provided by the author