Repository navigation
Add releaseDryRun.sh: CI dry run of the release process - #5252
Conversation
Prepares the changelog on a local branch, builds an unsigned RC with buildAndPushRelease.py, and runs smokeTestRelease.py on it. For the Solr-Smoketest-* Jenkins jobs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
I'm looking forward to having the release process (namely smoketester) back to green in CI. And a script we can run locally to validate changes to the smoketester and some other scripts. If no input; will merge in 48 hours. |
|
BTW won't merge until https://ci-builds.apache.org/job/Solr/job/Solr-Smoketest-main/ is green. I just updated it to match this bash script. |
… it also works pasted inline in Jenkins Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
there is one quirkiness related to git-status that this script works around by CD'ing to another dir... 🤖 What I worked around: The optional change: make |
…le before cleanup Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
checkWorkingCopyClean and gitStatus now only consider a git repository rooted at the project dir. Previously an unpacked source release inside another git checkout was compared against the parent's index and reported every file as missing. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…l unit tests smokeTestRelease.py runs the Gradle task named by SMOKETEST_SRC_TEST_TASK (default test) on the unpacked source release. releaseDryRun.sh sets it to testClasses since unit tests run in the regular CI jobs. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Jenkins job passed finally! https://ci-builds.apache.org/job/Solr/job/Solr-Smoketest-main/7/ |
dsmiley
left a comment
There was a problem hiding this comment.
Will merge tonight.
|
|
||
| pip3 install -r dev-tools/scripts/requirements.txt | ||
|
|
||
| [[ -e "$TMP_ROOT" ]] && chmod -R u+w "$TMP_ROOT" |
There was a problem hiding this 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.
| set -euo pipefail | ||
| cd "$(git rev-parse --show-toplevel)" | ||
|
|
||
| TMP_ROOT="${1:-${WORKSPACE:-$(pwd)}_smoke}" |
|
|
||
| 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 |
There was a problem hiding this comment.
small feature here to run this without running all tests
| // (e.g. an unpacked source release inside a clone). | ||
| def findGitRepository = { | ||
| if (!rootProject.file(".git").exists()) { | ||
| throw new RepositoryNotFoundException(rootProject.projectDir) |
There was a problem hiding this comment.
note: will be caught; not a new failure scenario
It's for the Solr-Smoketest-* Jenkins jobs. * smokeTestRelease.py: SMOKETEST_SRC_TEST_TASK to reduce/eliminate unit tests to run * git-status.gradle: allow source only execution in a subdirectory of another git checkout Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit d5d7df9)
🤖 Adds
dev-tools/scripts/releaseDryRun.sh, a dry run of the release process for the version inbuild.gradle(e.g. 11.0.0 on main). It's for theSolr-Smoketest-*Jenkins jobs, which have been broken for months, and it can also be run locally.Steps, mirroring the release wizard:
logchange.py prepare --commiton a localrelease-dry-runbranch (never pushed). Pretending a real version, rather than a SNAPSHOT, exercises the version-specific checks, e.g. "Release X" in Changes.html.buildAndPushRelease.py --dev-mode --push-local, unsigned. This also covers Changes.html generation, which moved out of the Gradle build in SOLR-18119 (SOLR-18119: Generate changes HTML only for releases #5180).smokeTestRelease.py --not-signedagainst the local RC.The temp dir defaults to outside the checkout. When the unpacked source release sits inside a git checkout,
checkWorkingCopyCleanfinds the parent repo, which fails the smoke test.Status: Solr-Smoketest-main runs this script inline. Build #1 passed everything up to and including the source-release tests, then failed on the temp-dir issue above, which is now fixed. Once this merges, the job's shell step becomes
dev-tools/scripts/releaseDryRun.sh.Not covered: signing, svn staging, and publishing.
🤖 Generated with Claude Code