This is an automated email from the ASF dual-hosted git repository.

onichols pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git


The following commit(s) were added to refs/heads/develop by this push:
     new bbe12c3  GEODE-9972: eliminate overnight step from release process 
(#7280)
bbe12c3 is described below

commit bbe12c3217aa351422f3a61aa9a2cd1546a7b5db
Author: Owen Nichols <[email protected]>
AuthorDate: Thu Jan 27 00:03:08 2022 -0800

    GEODE-9972: eliminate overnight step from release process (#7280)
    
    * eliminate overnight step from release process and template announce mail
    * remove duplicate Subject line
    * fix group name in link
    * support branch protection for develop on all subprojects
    * make sure we can still pull after changing the single-branch-develop 
checkouts to support branches
    * fix undefined variable usage
---
 dev-tools/release/README.md                  |   5 +-
 dev-tools/release/create_support_branches.sh |  25 ++-----
 dev-tools/release/print_announce_email.sh    | 102 +++++++++++++++++++++++++++
 dev-tools/release/promote_rc.sh              |  72 ++++++++++++-------
 4 files changed, 156 insertions(+), 48 deletions(-)

diff --git a/dev-tools/release/README.md b/dev-tools/release/README.md
index 493ce10..a5a51e2 100644
--- a/dev-tools/release/README.md
+++ b/dev-tools/release/README.md
@@ -24,7 +24,8 @@ These scripts are intended to be run from the parent 
directory of your geode dev
 
 **print\_rc\_email.sh** Generates an email to send to the dev list announcing 
a release candidate
 
-**promote\_rc.sh** Tags an RC as the final release, builds docker images, 
merges to master, and starts the mirroring and brew processes
+**promote\_rc.sh** Tags an RC as the final release, builds docker images, 
merges to master, uploads to mirrors, and starts the brew process
 
-**end\_of\_support.sh** cleans up pipelines and branches after 9-month life of 
support branch is reached
+**print\_annouce\_email.sh** Generates an email to send to all lists 
announcing a release
 
+**end\_of\_support.sh** cleans up pipelines and branches after N-2 support 
lifetime is reached
diff --git a/dev-tools/release/create_support_branches.sh 
b/dev-tools/release/create_support_branches.sh
index 2b0b739..45d64d6 100755
--- a/dev-tools/release/create_support_branches.sh
+++ b/dev-tools/release/create_support_branches.sh
@@ -87,7 +87,6 @@ echo 
"============================================================"
 set -x
 rm -rf $WORKSPACE
 mkdir -p $WORKSPACE
-cd $WORKSPACE
 set +x
 
 
@@ -96,6 +95,7 @@ echo 
"============================================================"
 echo "Cloning repositories..."
 echo "============================================================"
 set -x
+cd ${WORKSPACE}
 git clone --single-branch --branch develop [email protected]:apache/geode.git
 #(cd geode; git reset --hard $desired_sha) #uncomment if latest commit is not 
the desired branchpoint
 git clone --single-branch --branch develop [email protected]:apache/geode.git 
geode-develop
@@ -122,22 +122,6 @@ set +x
 
 echo ""
 echo "============================================================"
-echo "Pushing copyright updates (if any) to develop before branching"
-echo "============================================================"
-#get these 2 done before the branch so we don't have to do develop and support 
separately.
-#the other 2 will be pushed to develop and support versions when version bumps 
are pushed.
-for DIR in ${GEODE_NATIVE} ${GEODE_BENCHMARKS} ; do
-    set -x
-    cd ${DIR}
-    if ! git push --dry-run 2>&1 | grep -q 'Everything up-to-date' ; then
-      git push -u origin
-    fi
-    set +x
-done
-
-
-echo ""
-echo "============================================================"
 echo "Creating support/${VERSION_MM} branches"
 echo "============================================================"
 for DIR in ${GEODE} ${GEODE_EXAMPLES} ${GEODE_NATIVE} ${GEODE_BENCHMARKS} ; do
@@ -145,6 +129,7 @@ for DIR in ${GEODE} ${GEODE_EXAMPLES} ${GEODE_NATIVE} 
${GEODE_BENCHMARKS} ; do
     cd ${DIR}
     git checkout -b support/${VERSION_MM}
     git push -u origin support/${VERSION_MM}
+    git remote set-branches --add origin support/${VERSION_MM}
     set +x
 done
 
@@ -282,7 +267,7 @@ echo 
"============================================================"
 cd ${GEODE}/../..
 echo "Next steps:"
 echo "1. Go to 
https://github.com/${GITHUB_USER}/geode/pull/new/roll-develop-to-${NEWVERSION} 
and create the pull request"
-echo "2. Plus the BumpMinor job at 
https://concourse.apachegeode-ci.info/teams/main/pipelines/apache-develop-main?group=Semver%20Management";
+echo "2. Plus the BumpMinor job at 
https://concourse.apachegeode-ci.info/teams/main/pipelines/apache-develop-main?group=semver-management";
 echo "3. Add ${NEWVERSION} to Jira at 
https://issues.apache.org/jira/projects/GEODE?selectedItem=com.atlassian.jira.jira-projects-plugin:release-page";
-echo "4. (cd ${GEODE}/ci/pipelines/meta && ./deploy_meta.sh) #takes about 2 
hours. keep re-running until successful."
-echo "5. That's it for now.  Once all needed fixes have been proposed and 
cherry-picked to support/${VERSION_MM} and 
https://concourse.apachegeode-ci.info/teams/main/pipelines/apache-support-${VERSION_MM/./-}-main
 is green, come back and run ${0%/*}/prepare_rc.sh -v ${VERSION}.RC1"
+echo "4. (cd ${GEODE}/ci/pipelines/meta && ./deploy_meta.sh) #takes 1-2 hours. 
keep re-running until successful."
+echo "5. That's it for now.  Once all needed fixes have been proposed and 
cherry-picked to support/${VERSION_MM} and 
https://concourse.apachegeode-ci.info/teams/main/pipelines/apache-support-${VERSION_MM/./-}-main
 is green, come back and run ${0%/*}/prepare_rc.sh -v ${VERSION_MM}.0.RC1"
diff --git a/dev-tools/release/print_announce_email.sh 
b/dev-tools/release/print_announce_email.sh
new file mode 100755
index 0000000..1faf9e1
--- /dev/null
+++ b/dev-tools/release/print_announce_email.sh
@@ -0,0 +1,102 @@
+#!/usr/bin/env bash
+#
+# 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
+
+usage() {
+      echo "Usage: print_announce_email.sh -v version_number -f 
latest_version_number"
+      echo "  -v   The #.#.# version number"
+      echo "  -f   The #.#.# version number of the latest and greatest, if 
other than above"
+      exit 1
+}
+
+VERSION=""
+LATER=""
+
+while getopts ":v:f:" opt; do
+  case ${opt} in
+    v )
+      VERSION=$OPTARG
+      ;;
+    f )
+      LATER=$OPTARG
+      ;;
+    \? )
+      usage
+      ;;
+  esac
+done
+
+if [[ ${VERSION} == "" ]] ; then
+  usage
+fi
+
+if [[ $VERSION =~ ^([0-9]+\.[0-9]+\.[0-9]+)$ ]]; then
+    true
+else
+    echo "Malformed version number ${VERSION}. Example valid number - 1.9.0"
+    exit 1
+fi
+
+if [ -z "$FLAGSHIP" ] || [[ "$FLAGSHIP" =~ ^([0-9]+\.[0-9]+\.[0-9]+)$ ]]; then
+    true
+else
+    echo "Malformed version number ${FLAGSHIP}. Example valid number - 1.9.0"
+    exit 1
+fi
+
+VERSION_MM=${VERSION%.*}
+
+#support mac or linux date arithmetic syntax
+DEADLINE=$(date --date '+5 days' '+%a, %B %d %Y' 2>/dev/null || date -v +5d 
"+%a, %B %d %Y" 2>/dev/null || echo "<5 days from now>")
+
+if [ -n "${LATER}" ] && [ "${VERSION}" != "${LATER}" ] ; then
+  LATEST="Users are encouraged to upgrade to the latest ${LATER%.*}.x release 
(currently $LATER)."
+else
+  LATEST="Users are encouraged to upgrade to this latest release."
+fi
+
+if echo $VERSION | grep -q '\.0$' ; then
+  IMPROV=" improvements and"
+else
+  IMPROV=""
+fi
+
+cat << EOF
+To: [email protected], [email protected], [email protected]
+Subject: [ANNOUNCE] Apache Geode ${VERSION}
+
+The Apache Geode community is pleased to announce the availability of
+Apache Geode ${VERSION}.
+
+Geode is a data management platform that provides a database-like consistency
+model, reliable transaction processing and a shared-nothing architecture
+to maintain very low latency performance with high concurrency processing.
+
+Apache Geode ${VERSION} contains a number of${IMPROV} bug fixes.
+$LATEST
+For the full list of changes please review the release notes at:
+https://cwiki.apache.org/confluence/display/GEODE/Release+Notes#ReleaseNotes-${VERSION}
+
+Release artifacts and documentation can be found at the project website:
+https://geode.apache.org/releases/
+https://geode.apache.org/docs/guide/${VERSION_MM//./}/about_geode.html
+
+We would like to thank all the contributors that made the release possible.
+Regards,
+$(git config --get user.name) on behalf of the Apache Geode team
+EOF
diff --git a/dev-tools/release/promote_rc.sh b/dev-tools/release/promote_rc.sh
index 2bf034a..b335834 100755
--- a/dev-tools/release/promote_rc.sh
+++ b/dev-tools/release/promote_rc.sh
@@ -135,9 +135,10 @@ latestn=$(echo $latestnv | awk '{print $1}')
 latestv=$(echo $latestnv | awk '{print $2}')
 thisre=$(echo $VERSION | awk -F. '{print 1000000*$1+1000*$2+$3}')
 if [ $latestn -gt $thisre ] ; then
-  LATER=$latestv
+  LATER="$latestv"
   echo "Later version $LATER found; $VERSION will not be merged to master or 
tagged as 'latest' in docker."
 else
+  LATER=""
   echo "No later versions found; $VERSION will be tagged as 'latest' in docker 
and merged to master"
 fi
 
@@ -169,23 +170,34 @@ for DIR in ${GEODE} ${GEODE_EXAMPLES} ${GEODE_NATIVE} 
${GEODE_BENCHMARKS} ; do
 done
 
 
-echo ""
-echo "============================================================"
-echo "Waiting for artifacts to publish to downloads.apache.org..."
-echo "============================================================"
-for suffix in "" .asc .sha256 ; do
+for server in dlcdn.apache.org/geode downloads.apache.org/geode 
repo1.maven.org/maven2/org/apache/geode/apache-geode ; do
   file=apache-geode-${VERSION}.tgz
-  url=https://downloads.apache.org/geode/${VERSION}/${file}${suffix}
-  expectedsize=$(cd ${SVN_DIR}/../../release/geode/${VERSION}; ls -l 
${file}${suffix} | awk '{print $5}')
-  actualsize=0
-  while [ $expectedsize -ne $actualsize ] ; do
-    while ! curl -s --output /dev/null --head --fail "$url"; do
-      echo -n .
-      sleep 3
+  baseurl=https://${server}/${VERSION}/${file}
+  echo ""
+  echo "============================================================"
+  echo "Waiting for ${baseurl} to appear..."
+  if  echo "${server}" | grep -q repo1 ; then
+    echo "(may take up to one hour after clicking 'Release' on 
http://repository.apache.org/ )"
+  else
+    echo "(may take up to 15 minutes)"
+  fi
+  echo "============================================================"
+  for suffix in "" .asc .sha256 ; do
+    if [ "${suffix}" = ".sha256" ] && echo "${server}" | grep -q repo1 ; then
+      continue;
+    fi
+    url=${baseurl}${suffix}
+    expectedsize=$(cd ${SVN_DIR}/../../release/geode/${VERSION}; ls -l 
${file}${suffix} | awk '{print $5}')
+    actualsize=0
+    while [ $expectedsize -ne $actualsize ] ; do
+      while ! curl -sk --output /dev/null --head --fail "$url"; do
+        echo -n .
+        sleep 12
+      done
+      actualsize=$(curl -sk --head "$url" | grep -i "Content-Length" | awk 
'{print $2}' | tr -d '\r')
     done
-    actualsize=$(curl -s --head "$url" | grep "Content-Length" | awk '{print 
$2}' | tr -d '\r')
+    echo "$url exists and is correct size"
   done
-  echo "$url exists and is correct size"
 done
 
 
@@ -561,23 +573,30 @@ rm ../keep ../did.remove
 
 
 echo ""
+NEWVERSION="${VERSION_MM}.$(( PATCH + 1 ))"
+echo "============================================================"
+echo -n "Bumping version to ${NEWVERSION}"
+cd "${WORKSPACE}/.."
+${0%/*}/set_versions.sh -v ${NEWVERSION} -s -w "${WORKSPACE}"
+
+
+echo ""
 echo "============================================================"
-echo 'Done promoting release artifacts!'
+echo 'Done promoting Release Candidate to Official Release!'
 echo "============================================================"
 MAJOR="${VERSION_MM%.*}"
 MINOR="${VERSION_MM#*.}"
 PATCH="${VERSION##*.}"
 cd ${GEODE}/../..
-echo "Next steps:"
-echo "1. Click 'Release' in http://repository.apache.org/ (if you haven't 
already)"
+echo "Final steps (some gaps in numbering is normal since not all steps apply 
to all releases):"
 [ -n "$LATER" ] || echo "2. Go to 
https://github.com/${GITHUB_USER}/homebrew-core/pull/new/apache-geode-${VERSION}
 and submit the pull request"
 echo "3. Go to 
https://github.com/${GITHUB_USER}/geode/pull/new/add-${VERSION}-to-old-versions 
and create the pull request"
 [ -n "$LATER" ] || echo "3b.Go to 
https://github.com/${GITHUB_USER}/geode-native/pull/new/update-to-geode-${VERSION}
 and create the pull request"
 [ -n "$LATER" ] && tag=":${VERSION}" || tag=""
 echo "4. Validate docker image: docker run -it apachegeode/geode${tag}"
 [ -n "$LATER" ] && caveat=" (UNLESS they are still unreleased on a later patch 
branch)"
-echo "5. Bulk-transition JIRA issues fixed in this release to Closed${caveat}"
-echo "5b.Publish to GitHub ( https://github.com/apache/geode/tags then Create 
Release from the 2nd ... menu )."
+echo "5. Mark ${VERSION} as Released in Jira and Bulk-transition JIRA issues 
fixed in this release to Closed${caveat}"
+echo "5b.Publish to GitHub ( https://github.com/apache/geode/tags then Create 
Release from the 2nd ... menu ), filling out the form as follows:"
 echo "   Upload apache-geode-${VERSION}.tgz from: open 
${GEODE}/geode-assembly/build/distributions/"
 echo "   Release Title: Apache Geode ${VERSION}"
 echo "   Release Description:"
@@ -587,17 +606,18 @@ echo "sha256 for apache-geode-${VERSION}.tgz is $(awk 
'{print $1}' < ${GEODE}/ge
 echo ""
 echo "See full release notes at 
https://cwiki.apache.org/confluence/display/GEODE/Release+Notes#ReleaseNotes-${VERSION}";
 echo ""
-echo "6. Wait overnight for apache mirror sites and mavencentral to sync"
-[ -n "$LATER" ] || echo "7. Confirm that your homebrew PR passed its PR checks 
and was merged to master"
 echo "8. Check that ${VERSION} documentation has been published to 
https://geode.apache.org/docs/";
 [ -z "$DID_REMOVE" ] || DID_REMOVE=" and ${DID_REMOVE} info has been removed"
 echo "9. Check that ${VERSION} download info has been published to 
https://geode.apache.org/releases/${DID_REMOVE}";
 [ "${PATCH}" -ne 0 ] || echo "10. If 3rd-party dependencies haven't been 
bumped in awhile, ask on the dev list for a volunteer (details in 
dev-tools/dependencies/README.md)"
-[ "${PATCH}" -ne 0 ] || [ "${MINOR}" -lt 15 ] || echo "11. In accordance with 
Geode's N-2 support policy, the time has come to ${0%/*}/end_of_support.sh -v 
${MAJOR}.$((MINOR - 3))"
+[ "${PATCH}" -ne 0 ] || [ "${MINOR}" -lt 15 ] || echo "11. In accordance with 
Geode's N-2 support policy, propose on the dev list that the time has come to 
${0%/*}/end_of_support.sh -v ${MAJOR}.$((MINOR - 3))"
 [ "${PATCH}" -ne 0 ] || [ -n "$LATER" ] || echo "12. Log in to 
https://hub.docker.com/repository/docker/apachegeode/geode and update the 
latest Dockerfile linktext and url to ${VERSION_MM}"
 [ -n "$LATER" ] || andnative=", geode-benchmarks, and geode-native"
 echo "If there are any support branches between ${VERSION_MM} and develop, 
manually cherry-pick '${VERSION}' bump from develop to those branches of 
geode${andnative}."
-echo "Bump support pipeline to ${VERSION_MM}.$(( PATCH + 1 )) by plussing 
BumpPatch in 
https://concourse.apachegeode-ci.info/teams/main/pipelines/apache-support-${VERSION_MM//./-}-main?group=Semver%20Management";
-echo "Run ${0%/*}/set_versions.sh -v ${VERSION_MM}.$(( PATCH + 1 )) -s"
+echo "Bump support pipeline to ${VERSION_MM}.$(( PATCH + 1 )) by plussing 
BumpPatch in 
https://concourse.apachegeode-ci.info/teams/main/pipelines/apache-support-${VERSION_MM//./-}-main?group=semver-management";
 [ "${PATCH}" -ne 0 ] || echo "Run cd ${GEODE} && 
geode-management/src/test/script/update-management-wiki.sh"
-echo 'Finally, send announce email!'
+[ -n "$LATER" ] || echo "Make a note to confirm tomorrow morning that your 
homebrew PR passed its PR checks and was merged to master"
+echo 'Send email!  Note: MUST be sent from your @apache.org email address (see 
https://infra.apache.org/committer-email.html) and MUST be sent as Plain text 
(in gmail click three dots at bottom of compose window then Plain text mode)'
+${0%/*}/print_announce_email.sh -v "${VERSION}" -f "${LATER}"
+echo ""
+which pbcopy >/dev/null && ${0%/*}/print_announce_email.sh -v "${VERSION}" -f 
"${LATER}" | pbcopy && echo "(copied to clipboard)"

Reply via email to