From 7cb1db90b31d50c6a222137b95341dd2ee733d42 Mon Sep 17 00:00:00 2001 From: Pasquale Congiusti Date: Mon, 23 Oct 2023 11:21:24 +0200 Subject: [PATCH] chore(ci): release notes procedure --- release.adoc | 32 ++++------------- script/Makefile | 2 +- script/gen_release_notes.sh | 68 ------------------------------------- 3 files changed, 7 insertions(+), 95 deletions(-) delete mode 100755 script/gen_release_notes.sh diff --git a/release.adoc b/release.adoc index 88881b8681..8b17f9d358 100644 --- a/release.adoc +++ b/release.adoc @@ -40,7 +40,7 @@ NOTE: if you don't list any available builder, if you're on Ubuntu, you can inst [[releasing-camel-k]] == Release Camel K -As the process will do Git operations, it is advisable that you clone the Camel K repository to some new location (ie /tmp/) in order to avoid to conflict with any other development in progress. If you’re starting a major or a minor release version, you need to create the respective `release-a.b.x` branch. It’s highly advisable not to release directly from `main` branch. +As the process will do Git operations, it is advisable that you clone the Camel K repository to some new location (ie `/Desktop/`) in order to avoid to conflict with any other development in progress. If you’re starting a major or a minor release version, you need to create the respective `release-a.b.x` branch. It’s highly advisable not to release directly from `main` branch. ``` git clone https://github.com/apache/camel-k.git /tmp/camel-k @@ -50,6 +50,8 @@ cd /tmp/camel-k git checkout release-2.0.x ``` +NOTE: don't use `/tmp/` directories as the release process may last a few days and files generated before the voting, will be used once the release is finalized. If you use any temporary directory, make sure to store the files generated by the release procedure or later recover them from Apache dist folders. + === Create release branch WARNING: Only run this when starting a new **major** or **minor** release. @@ -181,35 +183,13 @@ cd release-utils/scripts/ Wait for maven mirrors to sync the new artifacts. This can take more than 1 hour sometimes. -[[release-notes]] -=== Release notes - -Release notes can be generated with: - -``` -# previous version released on same branch, e.g. 1.8.0 -export PREV=a.b.c -# current version to be released, e.g. 1.8.1 -export CUR=x.y.z -# Branch where both tags are present -export BRANCH=main -# Personal access Token for accessing Github API -export GITHUB_TOKEN=token -# Run the release-notes command -./script/gen_release_notes.sh $PREV $CUR $BRANCH -``` - -A `release-notes.md` file is generated and can be attached to the release github issue for reference. - === Github release -Binary files can be now released on Github, together with release notes generated in previous step. Files need to be uploaded manually to a new Github release. +You can start a release from the tag created in the previous steps (ie, `v2.1.0`). You can use the automatic release note generator, making sure to select the previous stable release. You need to manually add the CLI files and the CRDs dependency created in the previous steps. Select it as latest stable release and finalize the process. -Before announcing the release, a simple test should be done to verify that everything is in place (running a "Hello World" integration +Before announcing the release, perform a simple test to verify that everything is in place (running a "Hello World" integration after an installation done with a simple `kamel install`). Do a simple final test. -The release can be now announced to dev@camel.apache.org and users@camel.apache.org. - -A PMC member with access to the @ApacheCamel Twitter account should announce the release on Twitter as well. +The release can be now announced to dev@camel.apache.org and users@camel.apache.org ideally accompanied by a blog post to explain what's new. A PMC member with access to the @ApacheCamel former Twitter account should announce the release on former Twitter as well. [[post-release]] == Post Release diff --git a/script/Makefile b/script/Makefile index 3b7dbea47a..509bad421a 100644 --- a/script/Makefile +++ b/script/Makefile @@ -536,7 +536,7 @@ release-kustomize: get-staging-repo: @echo $(or ${STAGING_RUNTIME_REPO},https://repository.apache.org/content/repositories/snapshots@id=apache-snapshots@snapshots) -.PHONY: do-build build build-kamel build-resources dep codegen images images-push images-push-staging test check clean release cross-compile package-examples set-version git-tag release-notes check-licenses build-resources release-helm release-staging release-nightly get-staging-repo get-version bundle-kamelets +.PHONY: do-build build build-kamel build-resources dep codegen images images-push images-push-staging test check clean release cross-compile package-examples set-version git-tag check-licenses build-resources release-helm release-staging release-nightly get-staging-repo get-version bundle-kamelets .PHONY: controller-gen kubectl kustomize operator-sdk opm # find or download controller-gen if necessary diff --git a/script/gen_release_notes.sh b/script/gen_release_notes.sh deleted file mode 100755 index 75b4380e7a..0000000000 --- a/script/gen_release_notes.sh +++ /dev/null @@ -1,68 +0,0 @@ -#!/bin/sh - -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You 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 -e - -if [ "$#" -ne 3 ]; then - echo "usage: $0 last-version new-version branch" - exit 1 -fi - -location=$(dirname $0) -last_tag=v$1 -new_tag=v$2 -branch=$3 - -echo "Generating release notes for version $new_tag starting from tag $last_tag" - -start_sha=$(git rev-list -n 1 $last_tag) -if [ "$start_sha" == "" ]; then - echo "cannot determine initial SHA from tag $last_tag" - exit 1 -fi -echo "Using start SHA $start_sha from tag $last_tag" - -set +e -end_sha=$(git rev-list -n 1 $new_tag 2>&1) -if [ $? -ne 0 ]; then - end_sha=$(git rev-parse upstream/$branch) - if [ "$end_sha" == "" ]; then - echo "cannot determine current SHA from git" - exit 1 - fi - echo "Using end SHA $end_sha from upstream/$branch" -else - echo "Using end SHA $end_sha from tag $new_tag" -fi -set -e - -set +e -which release-notes > /dev/null 2>&1 -if [ $? -ne 0 ]; then - echo "No \"release-notes\" command found. Please install it from https://github.com/kubernetes/release" - exit 1 -fi -set -e - -set +e -if [ -z "${GITHUB_TOKEN}" ]; then - echo "No \"GITHUB_TOKEN\" environment variable exported. Please set the GITHUB_TOKEN environment variable" - exit 1 -fi -set -e - -release-notes --start-sha $start_sha --end-sha $end_sha --branch $branch --repo camel-k --org apache --output $location/../release-notes.md --required-author ""