From c63efcbedc84a3c71d4523a1521851f495a0cf49 Mon Sep 17 00:00:00 2001 From: Luca Comellini Date: Tue, 31 Oct 2023 17:26:48 -0700 Subject: [PATCH] Update hack files for release --- hack/changelog-template.txt | 31 ++++++++++++++ hack/common-release-prep.sh | 68 ------------------------------- hack/minor-changelog-template.txt | 15 ------- hack/operator-note.txt | 4 -- hack/prepare-major-release.sh | 28 ------------- hack/prepare-minor-release.sh | 32 --------------- hack/repo-changelog-template.txt | 6 --- 7 files changed, 31 insertions(+), 153 deletions(-) create mode 100644 hack/changelog-template.txt delete mode 100755 hack/common-release-prep.sh delete mode 100644 hack/minor-changelog-template.txt delete mode 100644 hack/operator-note.txt delete mode 100755 hack/prepare-major-release.sh delete mode 100755 hack/prepare-minor-release.sh delete mode 100644 hack/repo-changelog-template.txt diff --git a/hack/changelog-template.txt b/hack/changelog-template.txt new file mode 100644 index 0000000000..604d1ae9b5 --- /dev/null +++ b/hack/changelog-template.txt @@ -0,0 +1,31 @@ +%%TITLE%% + +%%RELEASE_DATE%% + +### Breaking Changes + +### Features + +### Fixes + +### Helm Chart + +### Dependencies + +### Upgrade + +- For NGINX, use the %%IC_VERSION%% images from our +[DockerHub](https://hub.docker.com/r/nginx/nginx-ingress/tags?page=1&ordering=last_updated&name=%%IC_VERSION%%), +[GitHub Container](https://github.com/nginxinc/kubernetes-ingress/pkgs/container/kubernetes-ingress), +[Amazon ECR Public Gallery](https://gallery.ecr.aws/nginx/nginx-ingress) or [Quay.io](https://quay.io/repository/nginx/nginx-ingress). +- For NGINX Plus, use the %%IC_VERSION%% images from the F5 Container registry, +the [AWS Marketplace](https://aws.amazon.com/marketplace/search/?CREATOR=741df81b-dfdc-4d36-b8da-945ea66b522c&FULFILLMENT_OPTION_TYPE=CONTAINER&filters=CREATOR%2CFULFILLMENT_OPTION_TYPE), +the [GCP Marketplace](https://console.cloud.google.com/marketplace/browse?filter=partner:F5,%20Inc.&filter=solution-type:k8s&filter=category:networking) +or build your own image using the %%IC_VERSION%% source code +- For Helm, use version %%HELM_CHART_VERSION%% of the chart. + +### Supported Platforms + +We will provide technical support for NGINX Ingress Controller on any Kubernetes platform that is currently supported by +its provider and that passes the Kubernetes conformance tests. This release was fully tested on the following Kubernetes +versions: x.xx-x.xx. diff --git a/hack/common-release-prep.sh b/hack/common-release-prep.sh deleted file mode 100755 index 7875c5746a..0000000000 --- a/hack/common-release-prep.sh +++ /dev/null @@ -1,68 +0,0 @@ -#!/usr/bin/env bash - -# Updates the files required for a new release. Run this script in the release branch. Use it from -# hack/prepare-major-release.sh or hack/prepare-minor-release.sh -# -# Usage: -# hack/common-release-prep.sh prev_ic_version ic-version prev_helm_chart_version helm-chart-version -# -# Example: -# hack/prepare-major-release.sh 1.12.1 1.13.0 0.10.1 0.11.0 - -FILES_TO_UPDATE_IC_VERSION=( - Makefile - README.md - deployments/daemon-set/nginx-ingress.yaml - deployments/daemon-set/nginx-plus-ingress.yaml - deployments/deployment/nginx-ingress.yaml - deployments/deployment/nginx-plus-ingress.yaml - deployments/helm-chart/Chart.yaml - deployments/helm-chart/README.md - deployments/helm-chart/values-icp.yaml - deployments/helm-chart/values-nsm.yaml - deployments/helm-chart/values-plus.yaml - deployments/helm-chart/values.yaml -) - -FILE_TO_UPDATE_HELM_CHART_VERSION=( - deployments/helm-chart/Chart.yaml - deployments/helm-chart/README.md -) - -DOCS_TO_UPDATE_FOLDER=docs/content - -prev_ic_version=$1 -ic_version=$2 -prev_helm_chart_version=$3 -helm_chart_version=$4 - -sed -i "" "s/$prev_ic_version/$ic_version/g" ${FILES_TO_UPDATE_IC_VERSION[*]} -sed -i "" "s/$prev_helm_chart_version/$helm_chart_version/g" ${FILE_TO_UPDATE_HELM_CHART_VERSION[*]} - -# copy the helm chart README to the docs -{ - sed -n '1,10p' docs/content/installation/installation-with-helm.md - sed -n '3,$p' deployments/helm-chart/README.md -} >file2.new && mv file2.new docs/content/installation/installation-with-helm.md - -sed -i '' '/^|Parameter | Description | Default |/i\ -{{% table %}}\ -' docs/content/installation/installation-with-helm.md - -line_number=$(grep -n -e "|" docs/content/installation/installation-with-helm.md | tail -n 1 | cut -d : -f 1) - -sed -i '' "${line_number}a\\ -{{% /table %}} -" docs/content/installation/installation-with-helm.md - -# update repo CHANGELOG -sed -i "" "1r hack/repo-changelog-template.txt" CHANGELOG.md -sed -i "" -e "s/%%TITLE%%/## $ic_version/g" -e "s/%%IC_VERSION%%/$ic_version/g" -e "s/%%HELM_CHART_VERSION%%/$helm_chart_version/g" CHANGELOG.md - -# update docs -find $DOCS_TO_UPDATE_FOLDER -type f -name "*.md" -exec sed -i "" "s/v$prev_ic_version/v$ic_version/g" {} + -find $DOCS_TO_UPDATE_FOLDER/installation -type f -name "*.md" -exec sed -i "" "s/$prev_ic_version/$ic_version/g" {} + -find $DOCS_TO_UPDATE_FOLDER/app-protect-* -type f -name "*.md" -exec sed -i "" "s/$prev_ic_version/$ic_version/g" {} + - -# update IC version in the technical-specification doc -sed -i "" "s/$prev_ic_version/$ic_version/g" $DOCS_TO_UPDATE_FOLDER/technical-specifications.md diff --git a/hack/minor-changelog-template.txt b/hack/minor-changelog-template.txt deleted file mode 100644 index 74dcb5464f..0000000000 --- a/hack/minor-changelog-template.txt +++ /dev/null @@ -1,15 +0,0 @@ -%%TITLE%% - -%%DATE%% - -CHANGES: -* Update NGINX version to X.Y.Z. -* Update NGINX Plus version to RX. - -HELM CHART: -* The version of the Helm chart is now %%HELM_CHART_VERSION%%. - -UPGRADE: -* For NGINX, use the %%IC_VERSION%% images from our [DockerHub](https://hub.docker.com/r/nginx/nginx-ingress/tags?page=1&ordering=last_updated&name=%%IC_VERSION%%), [GitHub Container](https://github.com/nginxinc/kubernetes-ingress/pkgs/container/kubernetes-ingress), [Amazon ECR Public Gallery](https://gallery.ecr.aws/nginx/nginx-ingress) or [Quay.io](https://quay.io/repository/nginx/nginx-ingress). -* For NGINX Plus, use the %%IC_VERSION%% images from the F5 Container registry, the [AWS Marketplace](https://aws.amazon.com/marketplace/search/?CREATOR=741df81b-dfdc-4d36-b8da-945ea66b522c&FULFILLMENT_OPTION_TYPE=CONTAINER&filters=CREATOR%2CFULFILLMENT_OPTION_TYPE), the [GCP Marketplace](https://console.cloud.google.com/marketplace/browse?filter=partner:F5,%20Inc.&filter=solution-type:k8s&filter=category:networking) or build your own image using the %%IC_VERSION%% source code -* For Helm, use version %%HELM_CHART_VERSION%% of the chart. diff --git a/hack/operator-note.txt b/hack/operator-note.txt deleted file mode 100644 index 554c44a5ac..0000000000 --- a/hack/operator-note.txt +++ /dev/null @@ -1,4 +0,0 @@ - -{{< note >}} -An NGINX Ingress Operator version compatible with the %%IC_VERSION%% NGINX Ingress Controller release is not available yet. We will update this document and remove this note once we publish a compatible Operator version. -{{< /note >}} diff --git a/hack/prepare-major-release.sh b/hack/prepare-major-release.sh deleted file mode 100755 index 0481cda3f3..0000000000 --- a/hack/prepare-major-release.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env bash - -# Updates the files required for a new major release. Run this script in the release branch. -# -# Usage: -# hack/prepare-major-release.sh prev_ic_version ic-version prev_helm_chart_version helm-chart-version -# -# Example: -# hack/prepare-major-release.sh 1.12.1 1.13.0 0.10.1 0.11.0 - -DOCS_TO_UPDATE_FOLDER=docs/content - -if [ $# != 4 ]; then - echo "Invalid number of arguments" 1>&2 - echo "Usage: $0 prev_ic_version ic-version prev_helm_chart_version helm-chart-version" 1>&2 - exit 1 -fi - -prev_ic_version=$1 -ic_version=$2 -prev_helm_chart_version=$3 -helm_chart_version=$4 - -hack/common-release-prep.sh $prev_ic_version $ic_version $prev_helm_chart_version $helm_chart_version - -# update operator installation docs with note -sed -i "" "9r hack/operator-note.txt" $DOCS_TO_UPDATE_FOLDER/installation/installation-with-operator.md -sed -i "" -e "s/%%IC_VERSION%%/$ic_version/g" $DOCS_TO_UPDATE_FOLDER/installation/installation-with-operator.md diff --git a/hack/prepare-minor-release.sh b/hack/prepare-minor-release.sh deleted file mode 100755 index c94c707dde..0000000000 --- a/hack/prepare-minor-release.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/usr/bin/env bash - -# Updates the files required for a new minor release. Run this script in the release branch. -# -# Usage: -# hack/prepare-minor-release.sh ic-version helm-chart-version -# -# Example: -# hack/prepare-minor-release.sh 1.5.5 0.3.5 - -DOCS_TO_UPDATE_FOLDER=docs/content - -if [ $# != 2 ]; then - echo "Invalid number of arguments" 1>&2 - echo "Usage: $0 ic-version helm-chart-version" 1>&2 - exit 1 -fi - -ic_version=$1 -helm_chart_version=$2 - -todays_date=$(date '+%d %b %Y') - -prev_ic_version=$(echo $ic_version | awk -F. '{ printf("%s\\.%s\\.%d", $1, $2, $3-1) }') -prev_helm_chart_version=$(echo $helm_chart_version | awk -F. '{ printf("%s\\.%s\\.%d", $1, $2, $3-1) }') - -# update docs -hack/common-release-prep.sh $prev_ic_version $ic_version $prev_helm_chart_version $helm_chart_version - -# update docs CHANGELOG for minor release -sed -i "" "8r hack/minor-changelog-template.txt" $DOCS_TO_UPDATE_FOLDER/releases.md -sed -i "" -e "s/%%TITLE%%/## NGINX Ingress Controller $ic_version/g" -e "s/%%IC_VERSION%%/$ic_version/g" -e "s/%%HELM_CHART_VERSION%%/$helm_chart_version/g" -e "s/%%DATE%%/$todays_date/g" $DOCS_TO_UPDATE_FOLDER/releases.md diff --git a/hack/repo-changelog-template.txt b/hack/repo-changelog-template.txt deleted file mode 100644 index 6e5c0cf5ca..0000000000 --- a/hack/repo-changelog-template.txt +++ /dev/null @@ -1,6 +0,0 @@ - -%%TITLE%% - -An automatically generated list of changes can be found on GitHub at: [%%IC_VERSION%% Release](https://github.com/nginxinc/kubernetes-ingress/releases/tag/v%%IC_VERSION%%) - -A curated list of changes can be found on the [Releases](http://docs.nginx.com/nginx-ingress-controller/releases/) page on the NGINX Documentation website.