Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
81c5086ee4
|
No files matched your search
@@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
### Fixed
|
||||
- Maven compile, verify and frontend test steps pass `--update-snapshots`, so SNAPSHOT dependencies restored from the pom-checksum-keyed `~/.m2` cache are re-checked against the remote on every build instead of going stale
|
||||
|
||||
### Added
|
||||
- Auto-publish `dev:snapshot` on develop branch pushes
|
||||
- Auto-publish production releases on main branch pushes with semantic version bumping
|
||||
|
||||
@@ -14,4 +14,7 @@
|
||||
set -e
|
||||
|
||||
echo "Running Maven Compile with optimized settings"
|
||||
mvn -s /tmp/circleci/mvn-settings.xml -T4 --no-transfer-progress compile
|
||||
## --update-snapshots: the ~/.m2 cache is keyed only on the pom checksum, so
|
||||
## without it a SNAPSHOT dependency restored from cache is never re-checked
|
||||
## (Maven's daily update policy) and builds run against stale snapshots.
|
||||
mvn -s /tmp/circleci/mvn-settings.xml --update-snapshots -T4 --no-transfer-progress compile
|
||||
@@ -21,4 +21,7 @@ export PORT=3001
|
||||
npm run start &
|
||||
dockerize -wait tcp://localhost:3001 -timeout 3m
|
||||
export QQQ_SELENIUM_HEADLESS=true
|
||||
mvn -s /tmp/circleci/mvn-settings.xml --no-transfer-progress -B test
|
||||
## --update-snapshots: the ~/.m2 cache is keyed only on the pom checksum, so
|
||||
## without it a SNAPSHOT dependency restored from cache is never re-checked
|
||||
## (Maven's daily update policy) and builds run against stale snapshots.
|
||||
mvn -s /tmp/circleci/mvn-settings.xml --update-snapshots --no-transfer-progress -B test
|
||||
@@ -23,4 +23,7 @@ set -e
|
||||
###################################################
|
||||
## Compile Maven project with optimized settings ##
|
||||
###################################################
|
||||
mvn -s /tmp/circleci/mvn-settings.xml -T4 --no-transfer-progress compile
|
||||
## --update-snapshots: the ~/.m2 cache is keyed only on the pom checksum, so
|
||||
## without it a SNAPSHOT dependency restored from cache is never re-checked
|
||||
## (Maven's daily update policy) and builds run against stale snapshots.
|
||||
mvn -s /tmp/circleci/mvn-settings.xml --update-snapshots -T4 --no-transfer-progress compile
|
||||
@@ -23,4 +23,7 @@ set -e
|
||||
########################################################
|
||||
## Run Maven verify lifecycle with optimized settings ##
|
||||
########################################################
|
||||
mvn -s /tmp/circleci/mvn-settings.xml -T4 --no-transfer-progress verify
|
||||
## --update-snapshots: the ~/.m2 cache is keyed only on the pom checksum, so
|
||||
## without it a SNAPSHOT dependency restored from cache is never re-checked
|
||||
## (Maven's daily update policy) and builds run against stale snapshots.
|
||||
mvn -s /tmp/circleci/mvn-settings.xml --update-snapshots -T4 --no-transfer-progress verify
|
||||
+3
-1
@@ -17,6 +17,7 @@ set -e
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
TEST_SCRIPT="$SCRIPT_DIR/test_calculate_version.sh"
|
||||
SETTINGS_TEST_SCRIPT="$SCRIPT_DIR/test_maven_settings_output.sh"
|
||||
SNAPSHOT_TEST_SCRIPT="$SCRIPT_DIR/test_snapshot_refresh.sh"
|
||||
VERBOSE=false
|
||||
CI_MODE=false
|
||||
|
||||
@@ -73,7 +74,7 @@ main() {
|
||||
## CI mode: minimal output, focus on results ##
|
||||
###############################################
|
||||
echo "Running tests in CI mode..."
|
||||
if { "$TEST_SCRIPT" $test_args && bash "$SETTINGS_TEST_SCRIPT"; } > /tmp/test_output.log 2>&1; then
|
||||
if { "$TEST_SCRIPT" $test_args && bash "$SETTINGS_TEST_SCRIPT" && bash "$SNAPSHOT_TEST_SCRIPT"; } > /tmp/test_output.log 2>&1; then
|
||||
echo "✅ All tests passed!"
|
||||
exit 0
|
||||
else
|
||||
@@ -88,6 +89,7 @@ main() {
|
||||
###################################
|
||||
"$TEST_SCRIPT" $test_args
|
||||
bash "$SETTINGS_TEST_SCRIPT"
|
||||
bash "$SNAPSHOT_TEST_SCRIPT"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
# Asserts that every Maven build/test entry point refreshes SNAPSHOT dependencies.
|
||||
# The ~/.m2 cache is keyed only on the pom checksum, so without --update-snapshots
|
||||
# a cached SNAPSHOT is never re-checked within Maven's daily update window.
|
||||
set -u
|
||||
cd "$(dirname "$0")/.." || exit 1
|
||||
fail=0
|
||||
for f in src/scripts/mvn_build_compile.sh src/scripts/mvn_verify.sh src/scripts/frontend_build_compile.sh src/scripts/frontend_test_run.sh; do
|
||||
if grep -E '^mvn ' "$f" | grep -q -- '--update-snapshots'; then
|
||||
echo "PASS $f"
|
||||
else
|
||||
echo "FAIL $f: mvn invocation lacks --update-snapshots"; fail=1
|
||||
fi
|
||||
done
|
||||
exit $fail
|
||||
Reference in new issue
Block a user