dsmiley commented on code in PR #5252:
URL: https://github.com/apache/solr/pull/5252#discussion_r4416970915
##########
dev-tools/scripts/releaseDryRun.sh:
##########
@@ -0,0 +1,42 @@
+#!/bin/bash
+# Dry run of the release process for the version in build.gradle: prepares the
+# changelog (committed to a local "release-dry-run" branch, never pushed),
builds
+# an unsigned RC with buildAndPushRelease.py, then runs smokeTestRelease.py on
it.
+# Used by the Solr-Smoketest-* Jenkins jobs.
+#
+# Usage: dev-tools/scripts/releaseDryRun.sh [TMP_DIR]
+# TMP_DIR must be outside the git checkout; it is deleted first.
+
+set -euo pipefail
+cd "$(git rev-parse --show-toplevel)"
+
+TMP_ROOT="${1:-${WORKSPACE:-$(pwd)}_smoke}"
Review Comment:
a sibling dir.
##########
dev-tools/scripts/smokeTestRelease.py:
##########
@@ -651,8 +651,10 @@ def verifySrcUnpacked(java, artifact, unpackPath, version,
testArgs, tmpDir):
print(' run "%s"' % validateCmd)
java.run_java(validateCmd, '%s/documentation.log' % logDir)
- print(" run tests w/ Java %s and testArgs='%s'..." % (java.version,
testArgs))
- java.run_java('./gradlew test %s' % testArgs, '%s/test.log' % logDir)
+ # SMOKETEST_SRC_TEST_TASK lets CI swap the full test run for something
lighter
Review Comment:
small feature here to run this without running all tests
##########
dev-tools/scripts/releaseDryRun.sh:
##########
@@ -0,0 +1,42 @@
+#!/bin/bash
+# Dry run of the release process for the version in build.gradle: prepares the
+# changelog (committed to a local "release-dry-run" branch, never pushed),
builds
+# an unsigned RC with buildAndPushRelease.py, then runs smokeTestRelease.py on
it.
+# Used by the Solr-Smoketest-* Jenkins jobs.
+#
+# Usage: dev-tools/scripts/releaseDryRun.sh [TMP_DIR]
+# TMP_DIR must be outside the git checkout; it is deleted first.
+
+set -euo pipefail
+cd "$(git rev-parse --show-toplevel)"
+
+TMP_ROOT="${1:-${WORKSPACE:-$(pwd)}_smoke}"
+
+if [[ -n "$(git status --porcelain --untracked-files=no)" ]]; then
+ echo "Working tree has uncommitted changes" >&2
+ exit 1
+fi
+
+pip3 install -r dev-tools/scripts/requirements.txt
+
+[[ -e "$TMP_ROOT" ]] && chmod -R u+w "$TMP_ROOT"
Review Comment:
this was quirky... had to do because our release process actually goes out
of its way to remove the write permission! No justification given.
##########
gradle/validation/git-status.gradle:
##########
@@ -37,14 +37,23 @@ buildscript {
}
configure(rootProject) {
+ // Only a repository rooted at the project dir counts, not a parent checkout
that merely contains it
+ // (e.g. an unpacked source release inside a clone).
+ def findGitRepository = {
+ if (!rootProject.file(".git").exists()) {
+ throw new RepositoryNotFoundException(rootProject.projectDir)
Review Comment:
note: will be caught; not a new failure scenario
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]