]> Frank Brehm's Git Trees - profitbricks/jenkins-build-scripts.git/commitdiff
support uploads to staging and improve code soemwhat
authorHolger Levsen <holger@layer-acht.org>
Sun, 18 Sep 2011 15:03:02 +0000 (17:03 +0200)
committerHolger Levsen <holger@layer-acht.org>
Sun, 18 Sep 2011 15:03:02 +0000 (17:03 +0200)
kernel_inpbuilder.py

index 0d756a1470c76c3b313f88c7cb9a5b9f7c19ff07..3d8a9769be2fc2771f6d0fb31c80bb5864dfc7f7 100644 (file)
@@ -206,7 +206,7 @@ def build_kernel(version, revision, parallel_jobs='auto', distcc=False):
             '%s' %(BUILD_ARCH), '--rootcmd', 'fakeroot',
             '--append-to-version', '-%s' %(version),
             '--initrd', '--arch-in-name', 
-            'configure' ]
+            'kernel_image' ]
 
     #'kernel_debug',
     #        'kernel_image', 'kernel_source', 'kernel_headers', 'modules']
@@ -250,13 +250,13 @@ def add_local_version_to_config(kernel_build_revision):
         )
     kernel_config = read_file(KERNEL_CONFIG_PATH)
     # don't put the branch names into the packages names
-    if GIT_BRANCH_NAME[:7] == 'master-':
+    if GIT_BRANCH_NAME.startswith('master-'):
         flavour = GIT_BRANCH_NAME[7:]
-    elif GIT_BRANCH_NAME[:8] == 'develop-':
+    elif GIT_BRANCH_NAME.startswith('develop-'):
         flavour = GIT_BRANCH_NAME[8:]
-    elif GIT_BRANCH_NAME[:8] == 'release-':
+    elif GIT_BRANCH_NAME.startswith('release-'):
         flavour = GIT_BRANCH_NAME[8:]
-    elif GIT_BRANCH_NAME[:7] == 'hotfix-':
+    elif GIT_BRANCH_NAME.startswith('hotfix-'):
         flavour = GIT_BRANCH_NAME[7:]
     else: 
         logger.error('GIT_BRANCH_NAME is %s, flavour is none.' % GIT_BRANCH_NAME)
@@ -447,8 +447,10 @@ if __name__ == '__main__':
 
         logger.info('FTP Login on %s successful' %(ftp.host))
 
-        if GIT_BRANCH_NAME.startswith('master-'):
+        if GIT_BRANCH_NAME.startswith('master-') or GIT_BRANCH_NAME.startswith('hotfix-'):
             ftp.cwd('production-proposed-updates')
+        elif GIT_BRANCH_NAME.startswith('release-'):
+            ftp.cwd('staging');
         else:
             ftp.cwd('pre-staging');