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

houston pushed a commit to branch release-0.4
in repository https://gitbox.apache.org/repos/asf/solr-operator.git


The following commit(s) were added to refs/heads/release-0.4 by this push:
     new fa76433  Fix various things in the release wizard/smoke tests (#315)
fa76433 is described below

commit fa76433ac150976f19bf39dc1264ade260ca7363
Author: Houston Putman <[email protected]>
AuthorDate: Thu Sep 2 18:49:40 2021 -0400

    Fix various things in the release wizard/smoke tests (#315)
    
    - New downloads page on the Solr Operator site
    - New location of changelog
    - Fix GPG Loading in release wizard
    - Add Kubernetes version option for smoketest
    - Fix communication for release
---
 hack/release/smoke_test/smoke_test.sh   | 14 ++++++++++----
 hack/release/smoke_test/test_cluster.sh | 16 +++++++++++-----
 hack/release/wizard/releaseWizard.py    | 15 ++++++++++++---
 hack/release/wizard/releaseWizard.yaml  | 19 ++++++++++++-------
 4 files changed, 45 insertions(+), 19 deletions(-)

diff --git a/hack/release/smoke_test/smoke_test.sh 
b/hack/release/smoke_test/smoke_test.sh
index 949f0fa..45f1396 100755
--- a/hack/release/smoke_test/smoke_test.sh
+++ b/hack/release/smoke_test/smoke_test.sh
@@ -23,7 +23,7 @@ set -u
 
 show_help() {
 cat << EOF
-Usage: ./hack/release/smoke_test/smoke_test.sh [-h] [-i IMAGE] [-s GIT_SHA] -v 
VERSION -l LOCATION -g GPG_KEY
+Usage: ./hack/release/smoke_test/smoke_test.sh [-h] [-i IMAGE] [-s GIT_SHA] 
[-k KUBERNETES_VERSION] -v VERSION -l LOCATION -g GPG_KEY
 
 Smoke test the Solr Operator release artifacts.
 
@@ -33,11 +33,12 @@ Smoke test the Solr Operator release artifacts.
     -s  GitSHA of the last commit for this version of Solr (Optional, check 
will not happen if not provided)
     -l  Base location of the staged artifacts. Can be a URL or relative or 
absolute file path.
     -g  GPG Key (fingerprint) used to sign the artifacts
+    -k  Kubernetes Version to test with (Optional, defaults to a compatible 
version)
 EOF
 }
 
 OPTIND=1
-while getopts hv:i:l:s:g: opt; do
+while getopts hv:i:l:s:g:k: opt; do
     case $opt in
         h)
             show_help
@@ -53,6 +54,8 @@ while getopts hv:i:l:s:g: opt; do
             ;;
         g)  GPG_KEY=$OPTARG
             ;;
+        k)  KUBERNETES_VERSION=$OPTARG
+            ;;
         *)
             show_help >&2
             exit 1
@@ -73,6 +76,9 @@ fi
 if [[ -z "${GPG_KEY:-}" ]]; then
   echo "Specify a gpg key fingerprint through -g, or through the GPG_KEY env 
var" >&2 && exit 1
 fi
+if [[ -n "${KUBERNETES_VERSION:-}" ]]; then
+  export KUBERNETES_VERSION="${KUBERNETES_VERSION}"
+fi
 
 PULL_PASS_THROUGH=""
 # If LOCATION is a URL, we want to pull the Docker image
@@ -87,13 +93,13 @@ fi
 
 # Add GOBIN to PATH
 if [[ -z "${GOBIN:-}" ]]; then
-  export GOBIN="$(cd ${GOPATH:-~/go}/bin && pwd)"
+  export GOBIN="$(cd "${GOPATH:-~/go}/bin" && pwd)"
 fi
 export PATH="${PATH}:${GOBIN}"
 
 ./hack/release/smoke_test/verify_all.sh -v "${VERSION}" -l "${LOCATION}" -g 
"${GPG_KEY}"
 ./hack/release/smoke_test/verify_docker.sh -v "${VERSION}" -i "${IMAGE}" 
"${GIT_SHA_PASS_THROUGH[@]}" "${PULL_PASS_THROUGH}"
 ./hack/release/smoke_test/test_source.sh -v "${VERSION}" -l "${LOCATION}"
-./hack/release/smoke_test/test_cluster.sh -v "${VERSION}" -i "${IMAGE}" -l 
"${LOCATION}" -g "${GPG_KEY}"
+./hack/release/smoke_test/test_cluster.sh -v "${VERSION}" -i "${IMAGE}" -l 
"${LOCATION}" -g "${GPG_KEY}" "${GIT_SHA_PASS_THROUGH[@]}"
 
 printf "\n\n********************\nSuccessfully smoke tested the Solr Operator 
%s!\n" "${VERSION}"
diff --git a/hack/release/smoke_test/test_cluster.sh 
b/hack/release/smoke_test/test_cluster.sh
index dc2363b..70b8ea0 100755
--- a/hack/release/smoke_test/test_cluster.sh
+++ b/hack/release/smoke_test/test_cluster.sh
@@ -23,7 +23,7 @@ set -u
 
 show_help() {
 cat << EOF
-Usage: ./hack/release/smoke_test/test_cluster.sh [-h] [-i IMAGE] -v VERSION -l 
LOCATION -g GPG_KEY
+Usage: ./hack/release/smoke_test/test_cluster.sh [-h] [-i IMAGE] [-k 
KUBERNETES_VERSION] -v VERSION -l LOCATION -g GPG_KEY
 
 Test the release candidate in a Kind cluster
 
@@ -32,11 +32,12 @@ Test the release candidate in a Kind cluster
     -i  Solr Operator docker image to use  (Optional, defaults to 
apache/solr-operator:<version>)
     -l  Base location of the staged artifacts. Can be a URL or relative or 
absolute file path.
     -g  GPG Key (fingerprint) used to sign the artifacts
+    -k  Kubernetes Version to test with (full tag, e.g. v1.21.2)
 EOF
 }
 
 OPTIND=1
-while getopts hv:i:l:g: opt; do
+while getopts hv:i:l:g:k: opt; do
     case $opt in
         h)
             show_help
@@ -50,6 +51,8 @@ while getopts hv:i:l:g: opt; do
             ;;
         g)  GPG_KEY=$OPTARG
             ;;
+        k)  KUBERNETES_VERSION=$OPTARG
+            ;;
         *)
             show_help >&2
             exit 1
@@ -70,6 +73,9 @@ fi
 if [[ -z "${GPG_KEY:-}" ]]; then
   echo "Specify a gpg key fingerprint through -g, or through the GPG_KEY env 
var" >&2 && exit 1
 fi
+if [[ -z "${KUBERNETES_VERSION:-}" ]]; then
+  KUBERNETES_VERSION="v1.21.2"
+fi
 
 # If LOCATION is not a URL, then get the absolute path
 if ! (echo "${LOCATION}" | grep "http"); then
@@ -91,7 +97,7 @@ fi
 
 if ! (which kind); then
   echo "Install Kind (Kubernetes in Docker)"
-  GO111MODULE="on" go install sigs.k8s.io/[email protected]
+  GO111MODULE="on" go install sigs.k8s.io/[email protected]
 fi
 
 CLUSTER_NAME="solr-operator-${VERSION}-rc"
@@ -102,8 +108,8 @@ if (kind get clusters | grep "${CLUSTER_NAME}"); then
   kind delete clusters "${CLUSTER_NAME}"
 fi
 
-echo "Create test Kubernetes cluster in Kind. This will allow us to test the 
CRDs, Helm chart and the Docker image."
-kind create cluster --name "${CLUSTER_NAME}"
+echo "Create test Kubernetes ${KUBERNETES_VERSION} cluster in Kind. This will 
allow us to test the CRDs, Helm chart and the Docker image."
+kind create cluster --name "${CLUSTER_NAME}" --image 
"kindest/node:${KUBERNETES_VERSION}"
 
 # Load the docker image into the cluster
 kind load docker-image --name "${CLUSTER_NAME}" "${IMAGE}"
diff --git a/hack/release/wizard/releaseWizard.py 
b/hack/release/wizard/releaseWizard.py
index cf20f03..1623806 100755
--- a/hack/release/wizard/releaseWizard.py
+++ b/hack/release/wizard/releaseWizard.py
@@ -184,9 +184,17 @@ def check_prerequisites(todo=None):
         asciidoc_ver = ""
         print("WARNING: In order to export asciidoc version to HTML, you will 
need asciidoctor installed")
     try:
+        go_ver = run("go version").splitlines()[0]
+    except:
+        sys.exit("You will need go installed")
+    try:
         git_ver = run("git --version").splitlines()[0]
     except:
         sys.exit("You will need git installed")
+    try:
+        svn_ver = run("svn --version").splitlines()[0]
+    except:
+        sys.exit("You will need svn installed")
     if not 'EDITOR' in os.environ:
         print("WARNING: Environment variable $EDITOR not set, using %s" % 
get_editor())
 
@@ -1109,8 +1117,9 @@ def configure_pgp(gpg_todo):
     id = str(input("Please enter your Apache id: (ENTER=skip) "))
     if id.strip() == '':
         return False
-    all_keys = load('https://home.apache.org/keys/group/solr.asc')
-    lines = all_keys.splitlines()
+    key_url = "https://home.apache.org/keys/committer/%s.asc"; % id.strip()
+    committer_key = load(key_url)
+    lines = committer_key.splitlines()
     keyid_linenum = None
     for idx, line in enumerate(lines):
         if line == 'ASF ID: %s' % id:
@@ -1122,7 +1131,7 @@ def configure_pgp(gpg_todo):
         gpg_fingerprint = keyid_line[14:].replace(" ", "")
         gpg_id = gpg_fingerprint[-8:]
 
-        print("Found gpg key id %s on file at Apache 
(https://home.apache.org/keys/group/solr.asc)" % gpg_id)
+        print("Found gpg key id %s on file at Apache (%s)" % (gpg_id, key_url))
     else:
         print(textwrap.dedent("""\
             Could not find your GPG key from Apache servers.
diff --git a/hack/release/wizard/releaseWizard.yaml 
b/hack/release/wizard/releaseWizard.yaml
index c578e6f..2ad929d 100644
--- a/hack/release/wizard/releaseWizard.yaml
+++ b/hack/release/wizard/releaseWizard.yaml
@@ -88,7 +88,7 @@ templates:
 
     This release contains numerous bug fixes, optimizations, and improvements, 
some of which are highlighted below. The release is available for immediate 
download at:
 
-      <https://solr.apache.org/operator/downloads.html>
+      <https://solr.apache.org/operator/artifacts.html>
 
     ### Solr Operator {{ release_version }} Release Highlights:
 
@@ -98,8 +98,9 @@ templates:
 
       <https://apache.github.io/solr-operator/docs/upgrade-notes.html>
 
-    For the most exhaustive list, see the full release notes in the Github 
Releases or by viewing the git history in the solr-operator repo.
+    For the most exhaustive list, see the change log on ArtifactHub or view 
the git history in the solr-operator repo.
 
+      
<https://artifacthub.io/packages/helm/apache-solr/solr-operator?modal=changelog>
       <https://github.com/apache/solr-operator/releases/tag/{{ release_version 
}}>
 
   announce_solr_operator_mail: |
@@ -285,7 +286,7 @@ groups:
       name: branch_date
   - !Todo
     id: decide_freeze_length
-    title: Decide the lenght of feature freeze
+    title: Decide the length of feature freeze
     types:
     - major
     - minor
@@ -657,15 +658,17 @@ groups:
         - !Command
           cmd: "{{ editor }} helm/solr-operator/Chart.yaml"
           comment: |
-            Add changelog at annotations.'artifacthub.io/changes', in 
helm/solr-operator/Chart.yaml.
-            This will replace the "Change 1" and "Change 2" lines.
+            Make sure the changelog is complete at path 
annotations.'artifacthub.io/changes', in helm/solr-operator/Chart.yaml.
             The Changelog format is described here: 
https://artifacthub.io/docs/topics/annotations/helm/#example
+            Our current stance is that Solr Operator features belong in the 
Solr Operator Helm chart changelog,
+            while the Solr Helm chart changelog should only contain 
differences to how the Solr Helm chart behaves.
+            This is to ensure that users are able to easily find information 
around changes even if they do not use the
+            Solr Helm chart.
           tee: true
         - !Command
           cmd: "{{ editor }} helm/solr/Chart.yaml"
           comment: |
-            Add changelog at annotations.'artifacthub.io/changes', in 
helm/solr/Chart.yaml.
-            This will replace the "Change 1" and "Change 2" lines.
+            Make sure the changelog is complete at path 
annotations.'artifacthub.io/changes', in helm/solr-operator/Chart.yaml.
             The Changelog format is described here: 
https://artifacthub.io/docs/topics/annotations/helm/#example
           tee: true
         - !Command
@@ -877,6 +880,8 @@ groups:
       ./hack/release/smoke_test/smoke_test.sh -v "{{ release_version }}" -s 
"{{ build_rc.git_sha | default("<git_sha>", True) }}" -i 
"apache/solr-operator:{{ release_version }}-rc{{ rc_number }}" -g "{{ gpg_key | 
default("<gpg_key_id>", True) }}" \
           -l 'https://dist.apache.org/repos/dist/dev/solr/solr-operator/{{ 
build_rc.rc_folder | default("<rc_folder>", True) }}'
 
+      If you want to run the smoke test with a specific version of kubernetes, 
use the -k option with a full version tag. (e.g. -k v1.19.3)
+
       Make sure you have the following installed before running the smoke test:
         - Docker (Give it enough memory and CPU to run ~12 containers, 3 of 
which are Solr nodes)
         - Go 1.16

Reply via email to