Skip to content

Commit

Permalink
Merge pull request #9110 from nawazkh/create_provider_issues
Browse files Browse the repository at this point in the history
✨ add utility to create git issues on provider repo
  • Loading branch information
k8s-ci-robot authored Feb 27, 2024
2 parents 9132d80 + 9863869 commit 6b361e4
Show file tree
Hide file tree
Showing 4 changed files with 398 additions and 2 deletions.
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1166,6 +1166,10 @@ release-notes: release-notes-tool
test-release-notes-tool:
go test -C hack/tools -v -tags tools,integration sigs.k8s.io/cluster-api/hack/tools/release/notes

.PHONY: release-provider-issues-tool
release-provider-issues-tool: # Creates GitHub issues in a pre-defined list of CAPI provider repositories
@go run ./hack/tools/release/internal/update_providers/provider_issues.go

.PHONY: release-weekly-update-tool
release-weekly-update-tool:
go build -C hack/tools -o $(ROOT_DIR)/bin/weekly -tags tools sigs.k8s.io/cluster-api/hack/tools/release/weekly
Expand Down
6 changes: 4 additions & 2 deletions docs/release/release-tasks.md
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,9 @@ We should inform at least the following providers via a new issue on their respe
* Packet: https://github.com/kubernetes-sigs/cluster-api-provider-packet/issues/new
* vSphere: https://github.com/kubernetes-sigs/cluster-api-provider-vsphere/issues/new
TODO: Right now we don't have a template for this message but the Comms Team will provide one later.
To create GitHub issues at the Cluster API providers repositories and inform about a new minor beta release, use ["provider_issues.go"](../../hack/tools/release/internal/update_providers/provider_issues.go) go utility.
- Ensure that the [provider repos pre-requisites](../../hack/tools/release/internal/update_providers/README.md#pre-requisites) are completed.
- From the root of this repository, run `make release-provider-issues-tool` to create git issues at the provider repositories.
## CI Signal/Bug Triage/Automation Manager
Expand Down Expand Up @@ -543,4 +545,4 @@ The goal of bug triage is to triage incoming issues and if necessary flag them w
and add them to the milestone of the current release.
We probably have to figure out some details about the overlap between the bug triage task here, release leads
and Cluster API maintainers.
and Cluster API maintainers.
38 changes: 38 additions & 0 deletions hack/tools/release/internal/update_providers/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Update CAPI Providers with CAPI beta releases

`provider_issues` is a go utility intended to open git issues on provider repos about the first beta minor release of CAPI.

## Pre-requisites

- Create a github token with the below access and export it in your environment as `GITHUB_ISSUE_OPENER_TOKEN`. Set the validity to the least number of days since this utility is a one time use tool per release cycle.
- `repo:status` - Grants access to commit status on public and private repositories.
- `repo_deployment` - Grants access to deployment statuses on public and private repositories.
- `public_repo` - Grants access to public repositories

- Export `PROVIDER_ISSUES_DRY_RUN` environment variable to `"true"` to run the utility in dry run mode. Export it to `"false"` to create issues on the provider repositories. Example:

```sh
export PROVIDER_ISSUES_DRY_RUN="true"
```

- Export `RELEASE_TAG` environment variable to the CAPI release version e.g. `1.6.0`. The suffix `-beta.0` is appended by the utility.
Example:

```sh
export RELEASE_TAG="1.6.0"
```

- Export `RELEASE_DATE` to the targeted CAPI release version date. Fetch the target date from latest [release file](https://github.com/kubernetes-sigs/cluster-api/tree/main/docs/release/releases).
Example:

```sh
export RELEASE_DATE="2023-11-28"
```

## How to run the tool

- Finish the pre-requites [tasks](#pre-requisites).
- From the root of the project Cluster API, run `make release-provider-issues-tool` to create issues at provider repositories.
- Note that the utility will
- do a dry run on setting `PROVIDER_ISSUES_DRY_RUN="true"` (and will not create git issues)
- create git issues on setting `PROVIDER_ISSUES_DRY_RUN="false"`.
Loading

0 comments on commit 6b361e4

Please sign in to comment.