]> Frank Brehm's Git Trees - profitbricks/jenkins-build-scripts.git/commitdiff
build sources as part of the regular kernel build again
authorHolger Levsen <holger@layer-acht.org>
Thu, 3 Nov 2011 16:28:00 +0000 (17:28 +0100)
committerHolger Levsen <holger@layer-acht.org>
Thu, 3 Nov 2011 16:28:00 +0000 (17:28 +0100)
kernel_build.py
kernel_inpbuilder.py

index d3838a1daceecf58c2ad7834ef258d04d70dfd3b..2a3b55f857de224350b0562520f6cafdc0b3bfc2 100644 (file)
@@ -14,9 +14,6 @@ from logging import Formatter
 import kernel_persistence
 import urllib
 
-JOB_URL = 'http://rwittler:MiMaMopel@jenkins:80/job/%(flavour)s-source/buildWithParameters?'
-JOB_DELAY = '0sec'
-
 CWD = os.environ.get('WORKSPACE')
 BUILD_NUMBER = os.environ.get('BUILD_NUMBER')
 BUILD_ID = os.environ.get('BUILD_ID')
@@ -73,11 +70,6 @@ def send_email(result):
 def build_kernel_with_pbuilder(revision, pbuilder_script, dist='stable'):
     pbuilder_script = os.path.abspath(pbuilder_script)
 
-    if os.environ.get('SOURCE_BUILD'):
-        SOURCE_BUILD='--source-only=True'
-    else:
-        SOURCE_BUILD=''
-
     cmd = [
             SUDO,
             PBUILDER,
@@ -98,7 +90,6 @@ def build_kernel_with_pbuilder(revision, pbuilder_script, dist='stable'):
             '--revision', '%s' %(revision),
             '--dist', '%s' %(dist),
             '--overlay-dir', '%s' % os.path.join(CWD,'kernel-package-overlay'),
-            SOURCE_BUILD
     ]
 
     os.environ.update({'DIST': '%s' %(dist)})
@@ -165,27 +156,4 @@ if __name__ == '__main__':
             dist='stable'):
         exit_error()
 
-    # trigger source build
-    logger.info('Triggering source build now')
-    flavour=GIT_REPO_NAME[6:-4]
-    urlencode_expansion_dict = {
-       'flavour': 'linux-%s' % flavour
-    }
-    url = HudsonUrl()
-    data = urllib.urlencode(
-        (
-            ('GIT_REPO_PATH', GIT_REPO_PATH),
-            ('DISTRIBUTION', pb_suite),
-            ('delay', JOB_DELAY)
-        )
-    )
-    ret = url.open(JOB_URL %(urlencode_expansion_dict) + '%s' %(data))
-
-    if ret.code == 200:
-        logger.info('jenkins url called successfully.')
-    else:
-        logger.info('URL was %s' % JOB_URL %(urlencode_expansion_dict) + '%s' %(data))
-        logger.info('jenkins sends the following: %s' %(ret.read())                    )
-        exit_error()
-
     exit_ok()
index b0c676913ed48ac7466ba42cedb3850465d42f76..9fb12bdb0ddc94267d2aa4bdaa1dac7df038019b 100644 (file)
@@ -137,14 +137,6 @@ def getopts():
             help='Set the overlay-dir for make-kpkg Default: %default'
     )
 
-    parser.add_option(
-            '--source-only',
-            dest='source_only',
-            default=False,
-            metavar='SOURCE_ONLY',
-            help='If set, only build source packages. Default: %default'
-    )
-
     return parser.parse_args()
 
 def git_clone_remote_repository(url, destination):
@@ -458,19 +450,12 @@ if __name__ == '__main__':
     logger.info('Running %s' % cmd)
     os.system(cmd)
 
-    if options.source_only:
-        # only build source
-        logger.info('Lets build only sources')
-        if not build_kernel(kernel_flavour, REVISION, OVERLAY_DIR, [ 'kernel_source' ]):
-            exit(ERROR)
-    else:
-        # build binaries and modules
-        if not build_kernel(kernel_flavour, REVISION, OVERLAY_DIR, [ 'kernel_debug', 'kernel_image' ]):
+    if not build_kernel(kernel_flavour, REVISION, OVERLAY_DIR, [ 'kernel_image', 'kernel_source', 'kernel_debug' ]):
+        exit(ERROR)
+    if has_extra_modules():
+        if not install_extra_modules():
+            logger.error('Error during installation of extra kernel modules')
             exit(ERROR)
-        if has_extra_modules():
-            if not install_extra_modules():
-                logger.error('Error during installation of extra kernel modules')
-                exit(ERROR)
         if not build_kernel(kernel_flavour, REVISION, OVERLAY_DIR, [ 'modules' ]):
             exit(ERROR)