Andrew Bogott has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/75159


Change subject: Half-assed attempt to track the post-merge hook on sockpuppet.
......................................................................

Half-assed attempt to track the post-merge hook on sockpuppet.

Change-Id: I43bc509ad87b8f0ae457dacb5e009e51b8779478
---
A files/puppet/sockpuppet-hooks/README
A files/puppet/sockpuppet-hooks/post-merge
A files/puppet/sockpuppet-hooks/pre-commit
3 files changed, 37 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/59/75159/1

diff --git a/files/puppet/sockpuppet-hooks/README 
b/files/puppet/sockpuppet-hooks/README
new file mode 100644
index 0000000..be46b4d
--- /dev/null
+++ b/files/puppet/sockpuppet-hooks/README
@@ -0,0 +1,8 @@
+Files in this directory are not currently installed by puppet,
+but I'm sticking them here because right now they are live hacks,
+and I want them tracked someplace at least.
+
+If you're installing this, stick these files in .git/hooks on sockpuppet
+or whatever has replaced sockpuppet.
+
+(Andrew Bogott, 7/22)
diff --git a/files/puppet/sockpuppet-hooks/post-merge 
b/files/puppet/sockpuppet-hooks/post-merge
new file mode 100755
index 0000000..0ec4c5b
--- /dev/null
+++ b/files/puppet/sockpuppet-hooks/post-merge
@@ -0,0 +1,24 @@
+#!/bin/sh
+#
+# An example hook script that is called after a successful
+# merge is made.
+#
+# To enable this hook, rename this file to "post-merge".
+
+rsync -a --delete /root/puppet/files/. /etc/puppet/files/.
+rsync -a --delete /root/puppet/manifests/. /etc/puppet/manifests/.
+rsync -a --delete /root/puppet/modules/. /etc/puppet/modules/.
+rsync -a --delete /root/puppet/templates/. /var/lib/puppet/templates/.
+
+# Add an apache reload, since puppet is stupid and will botch
+# catalogues in a way that does not show up on the clients and causes
+# an insane amount of confusion. A reload makes it regenerate them properly.
+#/etc/init.d/apache2 reload
+
+# This bug has allegedly been fixed, so let's try with touch site.pp again
+touch /etc/puppet/manifests.site.pp
+
+# Update stafford
+# Replaced using this key with needing to use forwarded keys
+# ssh -i ~/.ssh/sockpuppet root@stafford.pmtpa.wmnet 'cd 
/var/lib/git/operations/puppet && git pull'
+ssh root@stafford.pmtpa.wmnet 'cd /var/lib/git/operations/puppet && git pull'
diff --git a/files/puppet/sockpuppet-hooks/pre-commit 
b/files/puppet/sockpuppet-hooks/pre-commit
new file mode 100755
index 0000000..daa7115
--- /dev/null
+++ b/files/puppet/sockpuppet-hooks/pre-commit
@@ -0,0 +1,5 @@
+#!/bin/sh                                                                      
                                               
+#                                                                              
                                               
+
+echo "Local commits are not allowed in this repository. Please push your 
changes to gerrit, and then merge to this location."
+exit 1

-- 
To view, visit https://gerrit.wikimedia.org/r/75159
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I43bc509ad87b8f0ae457dacb5e009e51b8779478
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Andrew Bogott <abog...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to