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

Add doctoc's check for changelog files #5956

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ jobs:
run: hack/verify-swagger-docs.sh
- name: verify lifted docs
run: hack/verify-lifted.sh
- name: verify changelogs
run: hack/verify-doctoc.sh
build:
name: compile
needs: codegen # rely on codegen successful completion
Expand Down
12 changes: 12 additions & 0 deletions docs/CHANGELOG/CHANGELOG-0.10.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
**Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)*

- [What's New](#whats-new)
- [Resource Interpreter Webhook](#resource-interpreter-webhook)
- [Significant Scheduling Enhancement](#significant-scheduling-enhancement)
- [Workloads Observation from Karmada Control Plane](#workloads-observation-from-karmada-control-plane)
- [Other Notable Changes](#other-notable-changes)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->

# What's New
## Resource Interpreter Webhook
The newly introduced Resource Interpreter Webhook framework allows users to implement their own CRD plugins that will be
Expand Down
12 changes: 12 additions & 0 deletions docs/CHANGELOG/CHANGELOG-0.9.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
**Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)*

- [What's New](#whats-new)
- [Upgrading support](#upgrading-support)
- [Introduced karmada-scheduler-estimator to facilitate end-to-end scheduling accuracy](#introduced-karmada-scheduler-estimator-to-facilitate-end-to-end-scheduling-accuracy)
- [Maintainability improvements](#maintainability-improvements)
- [Other Notable Changes](#other-notable-changes)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->

# What's New
## Upgrading support
Users are now able to upgrade from the previous version smoothly. With the
Expand Down
20 changes: 20 additions & 0 deletions docs/CHANGELOG/CHANGELOG-1.0.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
**Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)*

- [What's New](#whats-new)
- [Aggregated Kubernetes API Endpoint](#aggregated-kubernetes-api-endpoint)
- [Promoting Workloads from Legacy Clusters to Karmada](#promoting-workloads-from-legacy-clusters-to-karmada)
- [Verified Integration with Ecosystem](#verified-integration-with-ecosystem)
- [OverridePolicy Improvements](#overridepolicy-improvements)
- [Karmada Installation Improvements](#karmada-installation-improvements)
- [Configuring Karmada Controllers](#configuring-karmada-controllers)
- [Resource Interpreter Webhook Enhancement](#resource-interpreter-webhook-enhancement)
- [Other Notable Changes](#other-notable-changes)
- [Bug Fixes](#bug-fixes)
- [Features & Enhancements](#features--enhancements)
- [Instrumentation (Metrics and Events)](#instrumentation-metrics-and-events)
- [Deprecation](#deprecation)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->

# What's New
## Aggregated Kubernetes API Endpoint
The newly introduced `karmada-aggregated-apiserver` component aggregates all registered clusters and allows users to
Expand Down
17 changes: 17 additions & 0 deletions docs/CHANGELOG/CHANGELOG-1.1.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
**Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)*

- [What's New](#whats-new)
- [Multi-Cluster Ingress](#multi-cluster-ingress)
- [Federated ResourceQuota](#federated-resourcequota)
- [Configurability improvement for performance tuning](#configurability-improvement-for-performance-tuning)
- [Resource Interpreter Webhook Enhancement](#resource-interpreter-webhook-enhancement)
- [Other Notable Changes](#other-notable-changes)
- [Bug Fixes](#bug-fixes)
- [Features & Enhancements](#features--enhancements)
- [Instrumentation (Metrics and Events)](#instrumentation-metrics-and-events)
- [Deprecation](#deprecation)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->

# What's New
## Multi-Cluster Ingress
The newly introduced [MultiClusterIngress](https://github.com/karmada-io/karmada/blob/d6355ec85296daa46ed344cade6ef10a9bee58dc/pkg/apis/networking/v1alpha1/ingress_types.go#L16)
Expand Down
28 changes: 22 additions & 6 deletions docs/CHANGELOG/CHANGELOG-1.2.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,25 @@

* [v1.2.0](#v120)
* [Downloads for v1.2.0](#downloads-for-v120)
* [Karmada v1.2 Release Notes](#karmada-v12-release-notes)
* [1.2 What's New](#whats-new)
* [Other Notable Changes](#other-notable-changes)
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
**Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)*

- [v1.2.0](#v120)
- [Downloads for v1.2.0](#downloads-for-v120)
- [Karmada v1.2 Release Notes](#karmada-v12-release-notes)
- [What's New](#whats-new)
- [Significant improvement on scheduling capability and scalability](#significant-improvement-on-scheduling-capability-and-scalability)
- [1. Karmada Descheduler](#1-karmada-descheduler)
- [2. Multi region HA support](#2-multi-region-ha-support)
- [Fully adopted aggregated API](#fully-adopted-aggregated-api)
- [Distributed search and analytics engine for Kubernetes resources (`alpha`)](#distributed-search-and-analytics-engine-for-kubernetes-resources-alpha)
- [Resource Interpreter Webhook enhancement](#resource-interpreter-webhook-enhancement)
- [Integrating verification with the ecosystem](#integrating-verification-with-the-ecosystem)
- [Other Notable Changes](#other-notable-changes)
- [Bug Fixes](#bug-fixes)
- [Features & Enhancements](#features--enhancements)
- [Other (Dependencies)](#other-dependencies)
- [Deprecation](#deprecation)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->

# v1.2.0

Expand Down
28 changes: 23 additions & 5 deletions docs/CHANGELOG/CHANGELOG-1.3.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,26 @@
* [v1.3.0](#v130)
* [Downloads for v1.3.0](#downloads-for-v130)
* [Karmada v1.3 Release Notes](#karmada-v13-release-notes)
* [1.3 What's New](#whats-new)
* [Other Notable Changes](#other-notable-changes)
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
**Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)*

- [v1.3.0](#v130)
- [Downloads for v1.3.0](#downloads-for-v130)
- [Karmada v1.3 Release Notes](#karmada-v13-release-notes)
- [What's New](#whats-new)
- [Taint-based eviction in graceful way](#taint-based-eviction-in-graceful-way)
- [Global proxy for resources across multi-clusters](#global-proxy-for-resources-across-multi-clusters)
- [Cluster resource modeling](#cluster-resource-modeling)
- [Bootstrap token-based cluster registration](#bootstrap-token-based-cluster-registration)
- [Significant improvement in system scalability](#significant-improvement-in-system-scalability)
- [Other Notable Changes](#other-notable-changes)
- [API changes](#api-changes)
- [Bug Fixes](#bug-fixes)
- [Features & Enhancements](#features--enhancements)
- [Other](#other)
- [Helm Chart](#helm-chart)
- [Dependencies](#dependencies)
- [Deprecation](#deprecation)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->

# v1.3.0

Expand Down
1 change: 1 addition & 0 deletions hack/update-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,4 @@ bash "$REPO_ROOT/hack/update-swagger-docs.sh"
bash "$REPO_ROOT/hack/update-lifted.sh"
bash "$REPO_ROOT/hack/update-mocks.sh"
bash "$REPO_ROOT/hack/update-gofmt.sh"
bash "$REPO_ROOT/hack/update-doctoc.sh"
40 changes: 40 additions & 0 deletions hack/update-doctoc.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#!/usr/bin/env bash
# Copyright 2024 The Karmada Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.


set -o errexit
set -o nounset
set -o pipefail

SCRIPT_ROOT=$(dirname "${BASH_SOURCE[0]}")/..

DIFFDOCTOCDIR="${SCRIPT_ROOT}/docs/CHANGELOG"

# check if doctoc is installed.
if ! command -v doctoc &> /dev/null
then
echo "doctoc is not installed, downloading now..."
npm install -g doctoc

if [ $? -ne 0 ]; then
echo "doctoc installation failed, check your network connection or npm configuration."
exit 1
fi

echo "doctoc has been successfully installed."
fi

# updating all relevant CHANGELOG files using doctoc.
doctoc ${DIFFDOCTOCDIR}
1 change: 1 addition & 0 deletions hack/verify-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,4 @@ bash "$REPO_ROOT/hack/verify-swagger-docs.sh"
bash "$REPO_ROOT/hack/verify-crdgen.sh"
bash "$REPO_ROOT/hack/verify-codegen.sh"
bash "$REPO_ROOT/hack/verify-license.sh"
bash "$REPO_ROOT/hack/verify-doctoc.sh"
50 changes: 50 additions & 0 deletions hack/verify-doctoc.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
#!/usr/bin/env bash
# Copyright 2024 The Karmada Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.


set -o errexit
set -o nounset
set -o pipefail

SCRIPT_ROOT=$(dirname "${BASH_SOURCE[0]}")/..

DIFFDOCTOCDIR="${SCRIPT_ROOT}/docs/CHANGELOG"
TMP_DIFFDOCTOCDIR="${SCRIPT_ROOT}/_tmp/docs/CHANGELOG"
_tmp="${SCRIPT_ROOT}/_tmp"

cleanup() {
rm -rf "${_tmp}"
}
trap "cleanup" EXIT SIGINT

cleanup

mkdir -p "${TMP_DIFFDOCTOCDIR}"
cp -a "${DIFFDOCTOCDIR}"/* "${TMP_DIFFDOCTOCDIR}"

bash "${SCRIPT_ROOT}/hack/update-doctoc.sh"
echo "diffing ${DIFFDOCTOCDIR} against freshly generated files"

ret=0

diff -Naupr "${DIFFDOCTOCDIR}" "${TMP_DIFFDOCTOCDIR}" || ret=$?
cp -a "${TMP_DIFFDOCTOCDIR}"/* "${DIFFDOCTOCDIR}"
if [[ $ret -eq 0 ]]
then
echo "${DIFFDOCTOCDIR} up to date."
else
echo "${DIFFDOCTOCDIR} is out of date. Please run hack/update-doctoc.sh"
exit 1
fi