Nikerabbit has uploaded a new change for review.
https://gerrit.wikimedia.org/r/189240
Change subject: Add hook support to oregano
......................................................................
Add hook support to oregano
Bug: T88905
Change-Id: Ia72dfa2c41c36e31a2b70f525dedb486d5f56a42
---
M bin/oregano
1 file changed, 15 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/translatewiki
refs/changes/40/189240/1
diff --git a/bin/oregano b/bin/oregano
index 5e572e4..bc8c978 100755
--- a/bin/oregano
+++ b/bin/oregano
@@ -43,6 +43,10 @@
rm -f "targets/${ENV}_previous"
ln -s "$OLD" "targets/${ENV}_previous"
fi
+
+ if [ -x "hooks/deploy" ]; then
+ ./hooks/deploy "$TAG" "$ENV"
+ fi
;;
rollback)
@@ -50,12 +54,17 @@
ENV=${2:-production}
TAG=$(readlink "targets/${ENV}_previous" || :)
+ TAG_NAME=$(basename "$TAG")
if [ -n "$TAG" ]; then
- echo "Updating targets/$ENV to previously deployed '$(basename
"$TAG")'"
+ echo "Updating targets/$ENV to previously deployed '$TAG_NAME'"
rm -f "targets/${ENV}_previous"
rm -f "targets/$ENV"
ln -s "$TAG" "targets/$ENV"
+
+ if [ -x "./hooks/deploy" ]; then
+ ./hooks/deploy "$PREVIOUS_NAME" "$ENV"
+ fi
else
echo "Unable to rollback. Either already rollbacked or first
deployment"
fi
@@ -78,6 +87,11 @@
# Need to restore the write permissions we removed
ls -1tr | head -n-$MAX | xargs --no-run-if-empty -d"\n" chmod -R ug+w
ls -1tr | head -n-$MAX | xargs --no-run-if-empty -d"\n" rm -r
+ cd ..
+
+ if [ -x "hooks/tag" ]; then
+ ./hooks/tag "$TAG"
+ fi
;;
*)
--
To view, visit https://gerrit.wikimedia.org/r/189240
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia72dfa2c41c36e31a2b70f525dedb486d5f56a42
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Nikerabbit <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits