Skip to content

Commit

Permalink
add Go utility on generating git issues at provider repos
Browse files Browse the repository at this point in the history
- get key details of the issue from the env variables
- updated README.md
- updated release-tasks.md
- move the util to hack/tools/release/internal

List of provieders:
		"kubernetes-sigs/cluster-api-addon-provider-helm",
		"kubernetes-sigs/cluster-api-provider-aws",
		"kubernetes-sigs/cluster-api-provider-azure",
		"kubernetes-sigs/cluster-api-provider-cloudstack",
		"kubernetes-sigs/cluster-api-provider-digitalocean",
		"kubernetes-sigs/cluster-api-provider-gcp",
		"kubernetes-sigs/cluster-api-provider-kubemark",
		"kubernetes-sigs/cluster-api-provider-kubevirt",
		"kubernetes-sigs/cluster-api-provider-ibmcloud",
		"kubernetes-sigs/cluster-api-provider-nested",
		"oracle/cluster-api-provider-oci",
		"kubernetes-sigs/cluster-api-provider-openstack",
		"kubernetes-sigs/cluster-api-operator",
		"kubernetes-sigs/cluster-api-provider-packet",
		"kubernetes-sigs/cluster-api-provider-vsphere",
		"metal3-io/cluster-api-provider-metal3",
  • Loading branch information
nawazkh committed Jan 24, 2024
1 parent 17a5a74 commit 9863869
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 @@ -1104,6 +1104,10 @@ release-notes-tool:
test-release-notes-tool:
go test -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 -o 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 @@ -457,7 +457,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 9863869

Please sign in to comment.