]> Frank Brehm's Git Trees - profitbricks/jenkins-build-scripts.git/commitdiff
support new parameter, NO_UPLOAD, to do exactly that
authorHolger Levsen <holger@layer-acht.org>
Thu, 12 Jan 2012 09:34:08 +0000 (10:34 +0100)
committerHolger Levsen <holger@layer-acht.org>
Thu, 12 Jan 2012 09:34:08 +0000 (10:34 +0100)
debian_build.py

index 5e6e26147fc3dc7a9ccf8edd8a10e7a9eb459dd7..d043b645c6177cf340675bb2bcecee494c4b8cf3 100755 (executable)
@@ -73,6 +73,8 @@ DPUT_OPTIONS = {
         }
 DPUT_CF = os.path.join(GIT_TARGET_WORKSPACE, 'dput.cf')
 
+NO_UPLOAD = os.environ.get('NO_UPLOAD')
+
 log_format = '%(asctime)s %(name)s[%(process)d] %(levelname)s: %(message)s'
 formatter = Formatter(log_format)
 logging.basicConfig(
@@ -437,8 +439,9 @@ if __name__ == '__main__':
             fh = open(changes_file, 'r')
             logger.info('%s' % (fh.read()))
             fh.close()
-            # upload
-            dput_package_upload(changes_file)
+            # upload (if NO_UPLOAD is not set)
+            if NO_UPLOAD == "None":
+                dput_package_upload(changes_file)
         except Exception, error:
             logger.exception(error)
             exit_error()