jenkins-bot has submitted this change and it was merged.
Change subject: mw-setup: Clear log directory earlier (setup instead of
apply-settings)
......................................................................
mw-setup: Clear log directory earlier (setup instead of apply-settings)
Also:
* Remove redundant mkdir in mw-set-env.
Bug: T93993
Change-Id: I66f65e05524ec994f2d3bda3fa282cae602c38f7
---
M bin/mw-apply-settings.sh
M bin/mw-set-env.sh
M bin/mw-setup.sh
3 files changed, 9 insertions(+), 11 deletions(-)
Approvals:
Krinkle: Looks good to me, approved
jenkins-bot: Verified
diff --git a/bin/mw-apply-settings.sh b/bin/mw-apply-settings.sh
index 6498961..01429b8 100755
--- a/bin/mw-apply-settings.sh
+++ b/bin/mw-apply-settings.sh
@@ -7,12 +7,6 @@
php "$MEDIAWIKI_D/_join.php" >> "$LOCAL_SETTINGS"
-# Clear any previous logs directory
-rm -rf "$LOG_DIR"
-# Re-create logs directory
-mkdir -p "$LOG_DIR"
-chmod 777 "$LOG_DIR"
-
# Copy LocalSettings under /log for archival purposes
cp "$LOCAL_SETTINGS" "$LOG_DIR"
diff --git a/bin/mw-set-env.sh b/bin/mw-set-env.sh
index 3f0f1ad..8871c8c 100755
--- a/bin/mw-set-env.sh
+++ b/bin/mw-set-env.sh
@@ -30,8 +30,3 @@
export MW_DB_PASS="pw_jenkins_u${EXECUTOR_NUMBER}"
export LOG_DIR="$WORKSPACE/log"
-
-# Create logs direcotry
-# Make it writable by apache (for web requests such as from qunit tests)
-mkdir -p "$LOG_DIR"
-chmod 777 "$LOG_DIR"
diff --git a/bin/mw-setup.sh b/bin/mw-setup.sh
index 0c1f5f9..6db05ad 100755
--- a/bin/mw-setup.sh
+++ b/bin/mw-setup.sh
@@ -5,3 +5,12 @@
# Ensure LocalSettings does not exist
rm -f "$MW_INSTALL_PATH/LocalSettings.php"
+
+# Ensure we won't include logs from previous builds
+# Also prevents post-build jUnitArchiver exceptions about old log files
(T93993)
+rm -rf "$LOG_DIR"
+
+# Re-create log directory
+mkdir -p "$LOG_DIR"
+# Make it writable by Apache (for web requests such as from qunit tests)
+chmod 777 "$LOG_DIR"
--
To view, visit https://gerrit.wikimedia.org/r/199821
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I66f65e05524ec994f2d3bda3fa282cae602c38f7
Gerrit-PatchSet: 2
Gerrit-Project: integration/jenkins
Gerrit-Branch: master
Gerrit-Owner: Krinkle <[email protected]>
Gerrit-Reviewer: Hashar <[email protected]>
Gerrit-Reviewer: Krinkle <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits