Skip to content

Commit

Permalink
update set kdm branch refs docs
Browse files Browse the repository at this point in the history
  • Loading branch information
tashima42 committed Oct 24, 2023
1 parent f8f65d6 commit 2f89f8f
Showing 1 changed file with 28 additions and 15 deletions.
43 changes: 28 additions & 15 deletions cmd/rancher_release/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,29 @@ Updates Rancher KDM branch references in:
- `package/Dockerfile`
- `Dockerfile.dapper`

| **Flag** | **Description** | **Required** |
| ------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ |
| `fork-path`, `f` | Path for your fork of rancher/rancher. | TRUE |
| `base-branch`, `b` | The branch you want to update with the new KDM branch. | TRUE |
| `current-kdm-branch`, `c` | Current KDM branch used in the files listed above. | TRUE |
| `new-kdm-branch`, `n` | KDM branch to replace the current. | TRUE |
| `create-pr`, `p` | if true, will try to create a PR against the `base-branch` in rancher/rancher, may fail if your GitHub token doesn’t have the required permission. Requires a GITHUB_TOKEN env var to be set. | FALSE |
| `fork-owner`, `o` | GitHub Username of the owner of the rancher fork used in `rancher-fork`. | FALSE |
| `dry-run`, `r` | Changes will not be pushed to remote and the PR will not be created. | FALSE |
Non-required flags can be automatically set, if you are inside your rancher fork. ⚠️ If you decide to run this way, please double check your branch and directory ⚠️

| **Flag** | **Description** | **Required** |
| --------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ |
| `fork-path`, `f` | Path for your fork of rancher/rancher. Default is the currenty directory you are running the command in. | FALSE |
| `base-branch`, `b` | The branch you want to update with the new KDM branch. Default is the current branch in your repo. | FALSE |
| `new-kdm-branch`, `n` | KDM branch to replace the current. | TRUE |
| `create-pr`, `p` | if true, will try to create a PR against the `base-branch` in rancher/rancher, may fail if your GitHub token doesn’t have the required permission. Requires a GITHUB_TOKEN env var to be set. | FALSE |
| `fork-owner`, `o` | GitHub Username of the owner of the rancher fork used in `rancher-fork`. Default is the username of the `origin` remote | FALSE |
| `dry-run`, `r` | Changes will not be pushed to remote and the PR will not be created. | FALSE |

**Examples**

```
rancher_release set-kdm-branch-refs -n dev-v2.8-september-patches --create-pr --dry-run
```

```
export GITHUB_TOKEN={YOUR_GITHUB_TOKEN}
rancher_release set-kdm-branch-refs -n dev-v2.8-september-patches -p -r
```

```
rancher_release set-kdm-branch-refs --fork-path $GOPATH/src/github.com/{YOUR_USERNAME}/rancher \
--base-branch release/v2.8 \
Expand Down Expand Up @@ -89,17 +100,20 @@ Updates Rancher branch references in charts:
**Examples**

```
rancher_release set-charts-branch-refs --fork-path $GOPATH/src/github.com/{YOUR_USERNAME}/rancher \
--base-branch release/v2.8 \
--current-charts-branch dev-v2.8 \
--new-charts-branch dev-v2.9
--base-branch release/v2.8 \
--current-charts-branch dev-v2.8 \
--new-charts-branch dev-v2.9
```

```
export GITHUB_TOKEN={YOUR_GITHUB_TOKEN}
rancher_release set-charts-branch-refs -f $GOPATH/src/github.com/{YOUR_USERNAME}/rancher -b release/v2.8 -c dev-v2.8 -n dev-v2.9 -p -o {YOUR_USERNAME}
```

### label-issues
Expand All @@ -112,12 +126,11 @@ Given a release candidate, updates each GitHub issue belonging to its milestone
rancher_release label-issues -t v2.8.1-rc1 --dry-run
# Updating 2 issues
# #1 Issue one (v2.8.x)
# [Waiting for RC] -> [To Test]
# [Waiting for RC] -> [To Test]
# #2 Issue two (v2.8.x)
# [Waiting for RC] -> [To Test]
# [Waiting for RC] -> [To Test]
```


## Contributions

- File Issue with details of the problem, feature request, etc.
Expand Down

0 comments on commit 2f89f8f

Please sign in to comment.