moved the test for war existance into python
authorsalimfadhley <sal@stodge.org>
Tue, 18 Jun 2013 23:02:37 +0000 (00:02 +0100)
committerSalim Fadhley <sal@stodge.org>
Sun, 23 Jun 2013 20:21:52 +0000 (21:21 +0100)
jenkinsapi_utils/jenkins_launcher.py

index d271ed6..e52d3c5 100644 (file)
@@ -56,7 +56,11 @@ class JenkinsLancher(object):
 
     def update_war(self):
         os.chdir(self.war_directory)
-        subprocess.check_call('./get-jenkins-war.sh')
+        if os.path.exists(self.war_path):
+            log.info("We already have the War file...")
+        else:
+            log.info("Redownloading Jenkins")
+            subprocess.check_call('./get-jenkins-war.sh')
 
     def stop(self):
         log.info("Shutting down jenkins.")