jenkins-bot has submitted this change and it was merged.
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(-)
Approvals:
Nikerabbit: Looks good to me, approved
jenkins-bot: Verified
diff --git a/bin/oregano b/bin/oregano
index 5e572e4..e99d7f3 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 "$TAG_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: merged
Gerrit-Change-Id: Ia72dfa2c41c36e31a2b70f525dedb486d5f56a42
Gerrit-PatchSet: 2
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Nikerabbit <[email protected]>
Gerrit-Reviewer: Nikerabbit <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits