You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@solr.apache.org by ho...@apache.org on 2021/11/17 16:24:11 UTC

[solr-operator] branch release-0.5 updated: Fix issues with release wizard.

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

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


The following commit(s) were added to refs/heads/release-0.5 by this push:
     new 806d1d5  Fix issues with release wizard.
806d1d5 is described below

commit 806d1d596d86cedf3115e99d33a0b80cabb51adc
Author: Houston Putman <ho...@apache.org>
AuthorDate: Wed Nov 17 11:21:43 2021 -0500

    Fix issues with release wizard.
    
    - Don't delete _config.yml in github pages branch
    - Use dynamic variable for solr_operator_news_file, otherwise the steps
      don't work.
    - Don't delete RC svn directory, as it was already moved.
---
 hack/release/wizard/releaseWizard.py   | 15 +++++++--------
 hack/release/wizard/releaseWizard.yaml | 23 ++++++-----------------
 2 files changed, 13 insertions(+), 25 deletions(-)

diff --git a/hack/release/wizard/releaseWizard.py b/hack/release/wizard/releaseWizard.py
index 62ee37b..e73a913 100755
--- a/hack/release/wizard/releaseWizard.py
+++ b/hack/release/wizard/releaseWizard.py
@@ -111,7 +111,7 @@ def expand_jinja(text, vars=None):
         'vote_close_72h': vote_close_72h_date().strftime("%Y-%m-%d %H:00 UTC"),
         'vote_close_72h_epoch': unix_time_millis(vote_close_72h_date()),
         'vote_close_72h_holidays': vote_close_72h_holidays(),
-        'solr_operator_news_file': solr_operator_news_file,
+        'solr_operator_news_file': state.get_solr_operator_news_file(),
         'load_lines': load_lines,
         'latest_version': state.get_latest_version(),
         'latest_lts_version': state.get_latest_lts_version(),
@@ -614,6 +614,10 @@ class ReleaseState:
     def get_refguide_release(self):
         return "%s_%s" % (self.release_version_major, self.release_version_minor)
 
+    def get_solr_operator_news_file(self):
+        return os.path.join(state.get_website_git_folder(), 'content', 'solr', 'operator', 'news',
+                                           "%s-%s-available.md" % (self.get_release_date_iso(), self.release_version.replace(".", "-")))
+
     def get_todo_states(self):
         states = {}
         if self.todos:
@@ -1394,11 +1398,6 @@ def main():
 
     state.save()
 
-    global solr_operator_news_file
-    solr_operator_news_file = os.path.join(state.get_website_git_folder(), 'content', 'solr', 'operator', 'news',
-      "%s-%s-available.md" % (state.get_release_date_iso(), state.release_version.replace(".", "-")))
-    website_folder = state.get_website_git_folder()
-
     main_menu = UpdatableConsoleMenu(title="Solr Operator ReleaseWizard",
                             subtitle=get_releasing_text,
                             prologue_text="Welcome to the release wizard. From here you can manage the process including creating new RCs. "
@@ -1981,9 +1980,9 @@ def vote_close_72h_holidays():
 
 
 def prepare_announce(todo):
-    if not os.path.exists(solr_operator_news_file):
+    if not os.path.exists(state.get_solr_operator_news_file()):
         solr_operator_text = expand_jinja("(( template=announce_solr_operator ))")
-        with open(solr_operator_news_file, 'w') as fp:
+        with open(state.get_solr_operator_news_file(), 'w') as fp:
             fp.write(solr_operator_text)
         # print("Wrote Solr Operator announce draft to %s" % solr_operator_news_file)
     else:
diff --git a/hack/release/wizard/releaseWizard.yaml b/hack/release/wizard/releaseWizard.yaml
index e4ad8b7..9323dcb 100644
--- a/hack/release/wizard/releaseWizard.yaml
+++ b/hack/release/wizard/releaseWizard.yaml
@@ -101,6 +101,7 @@ templates:
     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: |
@@ -1114,23 +1115,6 @@ groups:
           logfile: upload_crds.log
           tee: true
   - !Todo
-    id: cleanup_svn_rc_folder
-    title: Cleanup RC folder in SVN
-    depends:
-      - svn_release_mv
-    vars:
-      dist_stage_url: https://dist.apache.org/repos/dist/dev/solr/solr-operator/{{ build_rc.rc_folder | default("<rc_folder>", True) }}
-    commands: !Commands
-      root_folder: '{{ git_checkout_folder }}'
-      confirm_each_command: false
-      commands_text: This will remove the release artifacts from staging repo
-      commands:
-        - !Command
-          cmd: svn rm -m "Clean up the RC folder for {{ release_version }} RC{{ rc_number }}"  {{ dist_stage_url }}
-          logfile: svn_rm_containing.log
-          comment: Clean up containing folder on the staging repo
-          tee: true
-  - !Todo
     id: publish_docker_image
     title: Publish the final release Docker image
     depends: tag_release
@@ -1416,6 +1400,10 @@ groups:
           comment: Delete all current docs
           tee: true
         - !Command
+          cmd: git restore --staged _config.yml && git checkout _config.yml
+          comment: Un-delete the github pages config file
+          stdout: true
+        - !Command
           cmd: git checkout {{ release_version }} -- LICENSE NOTICE README.md docs example .gitignore
           comment: Checkout relevant docs & examples from the release tag.
           stdout: true
@@ -1423,6 +1411,7 @@ groups:
           cmd: git status
           stdout: true
           logfile: github-pages-status.log
+          comment: Make sure that the git changes look good, and that the _config.yml is not altered.
         - !Command
           cmd: git commit -a -m "Upgrade documentation for {{ release_version }} release" && git push origin gh-pages
           stdout: true