blob: 55b4e806877214ccd399cff63fbcfc029a5a400d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
'''
Created on Dec 1, 2014
__author__ = "Elizabeth 'pidge' Flanagan"
__copyright__ = "Copyright 2014, Intel Corp."
__credits__ = ["Elizabeth Flanagan"]
__license__ = "GPL"
__version__ = "2.0"
__maintainer__ = "Elizabeth Flanagan"
__email__ = "pidge@toganlabs.com"
'''
from buildbot.steps.shell import ShellCommand
from twisted.python import log
class CreateGPLTarball(ShellCommand):
haltOnFailure = True
flunkOnFailure = True
name = "Create GPL Tarball"
def __init__(self, factory, argdict=None, **kwargs):
self.factory = factory
for k, v in argdict.iteritems():
setattr(self, k, v)
self.description = "Create the GPL tarballs for compliance"
# Timeout needs to be passed to LoggingBuildStep as a kwarg
self.timeout = 100000
kwargs['timeout']=self.timeout
ShellCommand.__init__(self, **kwargs)
def start(self):
if str(self.getProperty("custom_release_tarball")) == "True":
self.command = 'if [ -d "./build/tmp/deploy/sources" ]; then tar cvf gpl_compliance.tar.bz2 ./build/tmp/deploy/sources; fi'
else:
self.command = 'echo "Skipping step"'
ShellCommand.start(self)
def describe(self, done=False):
description = ShellCommand.describe(self,done)
return description
|