lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From romseyg...@apache.org
Subject [lucene-solr] branch branch_8_5 updated: Correctly pass gpg_key to release script
Date Thu, 12 Mar 2020 10:53:15 GMT
This is an automated email from the ASF dual-hosted git repository.

romseygeek pushed a commit to branch branch_8_5
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git


The following commit(s) were added to refs/heads/branch_8_5 by this push:
     new 1be293c  Correctly pass gpg_key to release script
1be293c is described below

commit 1be293c02b092b22f183ece167c6495b5688a9b6
Author: Alan Woodward <romseygeek@apache.org>
AuthorDate: Thu Mar 12 10:51:54 2020 +0000

    Correctly pass gpg_key to release script
---
 dev-tools/scripts/buildAndPushRelease.py |  2 +-
 dev-tools/scripts/releaseWizard.py       | 12 ++++++++++--
 dev-tools/scripts/releaseWizard.yaml     |  2 +-
 3 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/dev-tools/scripts/buildAndPushRelease.py b/dev-tools/scripts/buildAndPushRelease.py
index f24fe30..6cf5db6 100755
--- a/dev-tools/scripts/buildAndPushRelease.py
+++ b/dev-tools/scripts/buildAndPushRelease.py
@@ -307,7 +307,7 @@ def check_key_in_keys(gpgKeyID, local_keys):
       gpgKeyID = gpgKeyID.replace(" ", "")
     if len(gpgKeyID) == 8:
       gpgKeyID8Char = "%s %s" % (gpgKeyID[0:4], gpgKeyID[4:8])
-      re_to_match = r"^pub .*\n\s+\w{4} \w{4} \w{4} \w{4} \w{4}  \w{4} \w{4} \w{4} %s" %
gpgKeyID8Char
+      re_to_match = r"^pub .*\n\s+(\w{4} \w{4} \w{4} \w{4} \w{4}  \w{4} \w{4} \w{4} %s|\w{32}%s)"
% (gpgKeyID8Char, gpgKeyID)
     elif len(gpgKeyID) == 40:
       gpgKeyID40Char = "%s %s %s %s %s  %s %s %s %s %s" % \
                        (gpgKeyID[0:4], gpgKeyID[4:8], gpgKeyID[8:12], gpgKeyID[12:16], gpgKeyID[16:20],
diff --git a/dev-tools/scripts/releaseWizard.py b/dev-tools/scripts/releaseWizard.py
index da76fac..3710616 100755
--- a/dev-tools/scripts/releaseWizard.py
+++ b/dev-tools/scripts/releaseWizard.py
@@ -97,6 +97,7 @@ def expand_jinja(text, vars=None):
         'release_version_minor': state.release_version_minor,
         'release_version_bugfix': state.release_version_bugfix,
         'state': state,
+        'gpg_key' : state.get_gpg_key(),
         'epoch': unix_time_millis(datetime.utcnow()),
         'get_next_version': state.get_next_version(),
         'current_git_rev': state.get_current_git_rev(),
@@ -301,6 +302,13 @@ class ReleaseState:
     def is_released(self):
         return self.get_todo_by_id('announce_lucene').is_done()
 
+    def get_gpg_key(self):
+        gpg_task = self.get_todo_by_id('gpg')
+        if gpg_task.is_done():
+            return gpg_task.get_state()['gpg_key']
+        else:
+            return None
+
     def get_release_date(self):
         publish_task = self.get_todo_by_id('publish_maven')
         if publish_task.is_done():
@@ -1074,7 +1082,7 @@ def configure_pgp(gpg_todo):
     id = str(input("Please enter your Apache id: (ENTER=skip) "))
     if id.strip() == '':
         return False
-    all_keys = load('https://downloads.apache.org/lucene/KEYS')
+    all_keys = load('https://home.apache.org/keys/group/lucene.asc')
     lines = all_keys.splitlines()
     keyid_linenum = None
     for idx, line in enumerate(lines):
@@ -1085,7 +1093,7 @@ def configure_pgp(gpg_todo):
         keyid_line = lines[keyid_linenum]
         assert keyid_line.startswith('LDAP PGP key: ')
         gpg_id = keyid_line[14:].replace(" ", "")[-8:]
-        print("Found gpg key id %s on file at Apache (https://downloads.apache.org/lucene/KEYS)"
% gpg_id)
+        print("Found gpg key id %s on file at Apache (https://home.apache.org/keys/group/lucene.asc)"
% gpg_id)
     else:
         print(textwrap.dedent("""\
             Could not find your GPG key from Apache servers.
diff --git a/dev-tools/scripts/releaseWizard.yaml b/dev-tools/scripts/releaseWizard.yaml
index 51303d7..0311b1f 100644
--- a/dev-tools/scripts/releaseWizard.yaml
+++ b/dev-tools/scripts/releaseWizard.yaml
@@ -734,7 +734,7 @@ groups:
         cmd: git pull
         tee: true
       - !Command
-        cmd: python3 -u dev-tools/scripts/buildAndPushRelease.py {{ local_keys }}  --logfile
{{ logfile }}  --push-local "{{ dist_file_path }}"  --rc-num {{ rc_number }}  --sign {{ gpg.gpg_id
| default("<gpg_key_id>", True) }}
+        cmd: python3 -u dev-tools/scripts/buildAndPushRelease.py {{ local_keys }}  --logfile
{{ logfile }}  --push-local "{{ dist_file_path }}"  --rc-num {{ rc_number }}  --sign {{ gpg_key
| default("<gpg_key_id>", True) }}
         comment: "NOTE: Remember to type your GPG pass-phrase at the prompt!"
         logfile: build_rc.log
         tee: true


Mime
View raw message