kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ewe...@apache.org
Subject [kafka] branch trunk updated: MINOR: Update release script with new remote, better error handling, correct mvn deploy profile
Date Tue, 06 Feb 2018 17:38:46 GMT
This is an automated email from the ASF dual-hosted git repository.

ewencp pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/kafka.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 6541ab1  MINOR: Update release script with new remote, better error handling, correct
mvn deploy profile
6541ab1 is described below

commit 6541ab199395bfb06a7a020f7ab76d70855006c2
Author: Ewen Cheslack-Postava <me@ewencp.org>
AuthorDate: Tue Feb 6 09:38:35 2018 -0800

    MINOR: Update release script with new remote, better error handling, correct mvn deploy
profile
    
    Author: Ewen Cheslack-Postava <me@ewencp.org>
    
    Reviewers: Damian Guy <damian.guy@gmail.com>, Ismael Juma <github@juma.me.uk>
    
    Closes #4528 from ewencp/update-release-script
---
 release.py | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/release.py b/release.py
index a21ffdc..b008794 100755
--- a/release.py
+++ b/release.py
@@ -45,8 +45,8 @@ CAPITALIZED_PROJECT_NAME = "kafka".upper()
 SCRIPT_DIR = os.path.abspath(os.path.dirname(__file__))
 # Location of the local git repository
 REPO_HOME = os.environ.get("%s_HOME" % CAPITALIZED_PROJECT_NAME, SCRIPT_DIR)
-# Remote name which points to Apache git
-PUSH_REMOTE_NAME = os.environ.get("PUSH_REMOTE_NAME", "apache")
+# Remote name, which points to Github by default
+PUSH_REMOTE_NAME = os.environ.get("PUSH_REMOTE_NAME", "apache-github")
 PREFS_FILE = os.path.join(SCRIPT_DIR, '.release-settings.json')
 
 delete_gitrefs = False
@@ -77,6 +77,7 @@ def print_output(output):
 def cmd(action, cmd, *args, **kwargs):
     if isinstance(cmd, basestring) and not kwargs.get("shell", False):
         cmd = cmd.split()
+    allow_failure = kwargs.pop("allow_failure", False)
 
     stdin_log = ""
     if "stdin" in kwargs and isinstance(kwargs["stdin"], basestring):
@@ -93,6 +94,9 @@ def cmd(action, cmd, *args, **kwargs):
     except subprocess.CalledProcessError as e:
         print_output(e.output)
 
+        if allow_failure:
+            return
+
         print("*************************************************")
         print("*** First command failure occurred here.      ***")
         print("*** Will now try to clean up working state.   ***")
@@ -128,7 +132,7 @@ def sftp_mkdir(dir):
 cd %s
 mkdir %s
 """ % (basedir, dirname)
-       cmd("Creating '%s' in '%s' in your Apache home directory if it does not exist (errors
are ok if the directory already exists)" % (dirname, basedir), "sftp -b - %s@home.apache.org"
% apache_id, stdin=cmd_str)
+       cmd("Creating '%s' in '%s' in your Apache home directory if it does not exist (errors
are ok if the directory already exists)" % (dirname, basedir), "sftp -b - %s@home.apache.org"
% apache_id, stdin=cmd_str, allow_failure=True)
     except subprocess.CalledProcessError:
         # This is ok. The command fails if the directory already exists
         pass
@@ -389,7 +393,7 @@ if not user_ok("Going to build and upload mvn artifacts based on these
settings:
     fail("Retry again later")
 cmd("Building and uploading archives", "./gradlew uploadArchivesAll", cwd=kafka_dir, env=jdk7_env)
 cmd("Building and uploading archives", "./gradlew uploadCoreArchives_2_12 -PscalaVersion=2.12",
cwd=kafka_dir, env=jdk8_env)
-cmd("Building and uploading archives", "mvn deploy", cwd=streams_quickstart_dir, env=jdk7_env)
+cmd("Building and uploading archives", "mvn deploy -Pgpg-signing", cwd=streams_quickstart_dir,
env=jdk7_env)
 
 release_notification_props = { 'release_version': release_version,
                                'rc': rc,

-- 
To stop receiving notification emails like this one, please contact
ewencp@apache.org.

Mime
View raw message