You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by di...@apache.org on 2023/10/26 08:40:08 UTC
[kafka] branch trunk updated: KAFKA-15200: Add pre-requisite check in release.py (#14636)
This is an automated email from the ASF dual-hosted git repository.
divijv 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 9989b68d0d3 KAFKA-15200: Add pre-requisite check in release.py (#14636)
9989b68d0d3 is described below
commit 9989b68d0d38c8f1357f78bf9d53a58c1476188d
Author: Owen Leung <ow...@gmail.com>
AuthorDate: Thu Oct 26 16:40:01 2023 +0800
KAFKA-15200: Add pre-requisite check in release.py (#14636)
Reviewers: Divij Vaidya <di...@amazon.com>
---
release.py | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)
diff --git a/release.py b/release.py
index 314df2ed630..8458323ea9d 100755
--- a/release.py
+++ b/release.py
@@ -491,6 +491,35 @@ Some of these may be used from these previous settings loaded from %s:
Do you have all of of these setup? (y/n): """ % (PREFS_FILE, json.dumps(prefs, indent=2))):
fail("Please try again once you have all the prerequisites ready.")
+apache_id = sanitize_input("Please enter your apache-id: ")
+
+print("Begin to check if you have met all the pre-requisites for the release process")
+
+try:
+ test_maven = cmd_output("mvn -v")
+ if "Apache Maven" in test_maven:
+ print("Pre-requisite met: You have maven cli in place")
+ else:
+ fail("Pre-requisite not met: You need to install maven CLI")
+except Exception as e:
+ fail(f"Pre-requisite not met: Unable to check if maven cli is installed. Error: {e}")
+
+try:
+ test_sftp = subprocess.run(f"sftp {apache_id}@home.apache.org".split())
+ if test_sftp.returncode != 0:
+ fail("Pre-requisite not met: Cannot establish sftp connection. Please check your apache-id and ssh keys.")
+ print("Pre-requisite met: sftp connection is successful")
+except Exception as e:
+ fail(f"Pre-requisite not met: Unable to check if sftp connection is successful. Error: {e}")
+
+try:
+ test_svn = cmd_output("svn --version")
+ if "svn" in test_svn:
+ print("Pre-requisite met: You have svn cli in place")
+ else:
+ fail("Pre-requisite not met: You need to install svn cli")
+except Exception as e:
+ fail(f"Pre-requisite not met: Unable to check if svn cli is installed. Error: {e}")
starting_branch = cmd_output('git rev-parse --abbrev-ref HEAD')