Dzahn has submitted this change and it was merged.
Change subject: beta: phase out shell autoupdater
......................................................................
beta: phase out shell autoupdater
We used to have a shell to automatically update the MediaWiki code
bases. I have rewrote it in python (9a39f008), it got deployed and the
Jenkins job has been updated.
Change-Id: I7dd62ce48c11cf16b9af7b31a55df6e702d80623
---
D files/misc/beta/wmf-beta-autoupdate
M manifests/misc/beta.pp
2 files changed, 2 insertions(+), 73 deletions(-)
Approvals:
jenkins-bot: Verified
Dzahn: Looks good to me, approved
diff --git a/files/misc/beta/wmf-beta-autoupdate
b/files/misc/beta/wmf-beta-autoupdate
deleted file mode 100755
index cee137d..0000000
--- a/files/misc/beta/wmf-beta-autoupdate
+++ /dev/null
@@ -1,65 +0,0 @@
-#!/bin/bash
-#######################################################################
-# WARNING: this file is managed by Puppet
-# puppet:///files/misc/beta/wmf-beta-autoupdate
-#######################################################################
-
-# NAME
-# wmf-beta-autoupdate -- Continuously update MW code for beta
-#
-# DESCRIPTION
-# wmf-beta-autoupdate is an infinite "while loop" used to checkout
-# MediaWiki core code and all extensions.
-
-# Parameters with sane (to the WMF) default values
-MW_CORE_PATH=${MW_CORE_PATH:-"/home/wikipedia/common/php-master"}
-MW_EXTENSIONS_PATH=${MW_EXTENSIONS_PATH:-"$MW_CORE_PATH/extensions"}
-VERBOSE=${VERBOSE:-"no"}
-
-if [ "$VERBOSE" != "no" ]; then
- GIT_QUIET=""
-else
- GIT_QUIET="--quiet"
-fi
-
-# Wrappers to make sure we dont forget about --quiet
-GIT_PULL="git pull $GIT_QUIET"
-GIT_SUBMODULE_UPDATE="git submodule $GIT_QUIET update --init --recursive"
-
-# Write a message prefixed with the current time
-ts_echo() { echo `date '+%Y-%m-%d %H:%M:%S'` $*; }
-# Write message to stderr
-error() { ts_echo "$*" >&2; }
-
-# Params: $exitcode, $output
-handle_command_result() {
- local exitcode=$1
- shift
- local output="$*"
- if [ $exitcode -eq 0 ]; then
- return 0
- fi
- ts_echo $output
- ts_echo "Exit code: $exitcode"
-}
-
-ts_echo "update MediaWiki core in $MW_CORE_PATH"
-OUTPUT=`(cd $MW_CORE_PATH && $GIT_PULL 2>&1)`
-handle_command_result $? "$OUTPUT"
-
-ts_echo "update extensions in $MW_EXTENSIONS_PATH"
-if [ ! -d "${MW_EXTENSIONS_PATH}/.git" ]; then
- error "ERR> $MW_EXTENSIONS_PATH is not a git repo"
-else
- # Update the generic repository holding all submodules
- OUTPUT=`(cd $MW_EXTENSIONS_PATH && $GIT_PULL 2>&1)`
- handle_command_result $? "$OUTPUT"
- # Update submodules
- OUTPUT=`(cd $MW_EXTENSIONS_PATH && $GIT_SUBMODULE_UPDATE 2>&1)`
- handle_command_result $? "$OUTPUT"
-fi
-
-# Update localisation cache
-ts_echo "updating localisation cache"
-OUTPUT=`(mw-update-l10n)`
-handle_command_result $? "$OUTPUT"
diff --git a/manifests/misc/beta.pp b/manifests/misc/beta.pp
index 66d45d7..fb6770b 100644
--- a/manifests/misc/beta.pp
+++ b/manifests/misc/beta.pp
@@ -3,15 +3,9 @@
require misc::deployment::common_scripts
file {
- # Shell version, FIXME need to be removed
+ # Old shell version
"/usr/local/bin/wmf-beta-autoupdate":
- owner => root,
- group => root,
- mode => 0555,
- require => [
- Package["git-core"],
- ],
- source =>
"puppet:///files/misc/beta/wmf-beta-autoupdate";
+ ensure => absent;
# Python rewrite
"/usr/local/bin/wmf-beta-autoupdate.py":
owner => root,
--
To view, visit https://gerrit.wikimedia.org/r/76905
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I7dd62ce48c11cf16b9af7b31a55df6e702d80623
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Hashar <[email protected]>
Gerrit-Reviewer: Dzahn <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits