From 501ef7e35cbd1a764ee4418b2800e84050ac90d1 Mon Sep 17 00:00:00 2001 From: Stephen McQuay Date: Thu, 24 Jan 2013 18:38:55 -0800 Subject: [PATCH] another example of composition --- super_composition.py | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 super_composition.py diff --git a/super_composition.py b/super_composition.py new file mode 100644 index 0000000..7f14604 --- /dev/null +++ b/super_composition.py @@ -0,0 +1,26 @@ +from fabric.api import run, local + +def run_tests(): + local("echo running tests") + # local("false") + + +def push_code(): + local("echo pushing code") + + +def pull_code(): + run("echo pulling code") + + +def restart_webserver(): + run("echo restaring webserver") + + +def deploy_changes(): + # will run once here for each server: + run_tests() + + push_code() + pull_code() + restart_webserver()