aboutsummaryrefslogtreecommitdiffstats
path: root/lib/python2.7/site-packages/autobuilder/buildsteps/PublishLayerTarballs.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/python2.7/site-packages/autobuilder/buildsteps/PublishLayerTarballs.py')
-rw-r--r--lib/python2.7/site-packages/autobuilder/buildsteps/PublishLayerTarballs.py79
1 files changed, 0 insertions, 79 deletions
diff --git a/lib/python2.7/site-packages/autobuilder/buildsteps/PublishLayerTarballs.py b/lib/python2.7/site-packages/autobuilder/buildsteps/PublishLayerTarballs.py
deleted file mode 100644
index 933ea1ce..00000000
--- a/lib/python2.7/site-packages/autobuilder/buildsteps/PublishLayerTarballs.py
+++ /dev/null
@@ -1,79 +0,0 @@
-'''
-Created on Mar 17, 2013
-
-__author__ = "Elizabeth 'pidge' Flanagan"
-__copyright__ = "Copyright 2012-2013, 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
-import os, datetime
-from autobuilder.config import *
-
-class PublishLayerTarballs(ShellCommand):
- haltOnFailure = False
- flunkOnFailure = True
- name = "Publishing Layer Tarballs"
- def __init__(self, factory, layername, workdir, argdict=None, **kwargs):
- self.factory = factory
- self.layername = layername
- self.workdir = workdir
- self.description = "Publishing " + layername + " tarball"
- self.workerdir=os.path.join(os.path.join(YOCTO_ABBASE, "yocto-worker"))
- for k, v in argdict.iteritems():
- setattr(self, k, v)
- self.timeout = 100000
- kwargs['timeout']=self.timeout
- ShellCommand.__init__(self, **kwargs)
-
- def start(self):
- DEST=self.getProperty("DEST")
- buildername=self.getProperty("buildername")
- revision = ""
- snapshot = ""
- self.basedir=os.path.join(os.path.join(os.path.join(
- self.workerdir, buildername), self.workdir))
- if self.layername is not "poky" \
- and "eclipse" not in self.layername:
- command = "cd " + self.layername + ";"
- else:
- command = ""
- deploy = "True"
- deploy = self.getProperty("custom_deploy_artifacts")
- if str(os.environ.get('PUBLISH_BUILDS')) == "True" and (deploy == "True" or deploy is None):
- if self.getProperty("custom_release_me_"+buildername):
- is_milestone = self.getProperty("custom_is_milestone")
- if is_milestone == "True":
- snapshot = "+snapshot"
- poky_name = self.getProperty("poky_name")
- poky_number = self.getProperty("poky_number")
- yocto_number = self.getProperty("yocto_number")
- archive_name = self.layername + "-" + poky_name + "-" + poky_number
- command = command + " git archive --format=tar HEAD "
- command = command + "--prefix=" + archive_name + "/"
- command = command + " | bzip2 -c > " + archive_name + ".tar.bz2; "
- command = command + "md5sum " + archive_name + ".tar.bz2 >> "
- command = command + self.layername + "-" + revision + ".tar.bz2.md5sum; "
- command = command + "mkdir -p " + DEST + "; rsync -av "
- command = command + archive_name +".tar.bz2* " + DEST
- elif self.getProperty("got_revision_"+self.layername):
- revision=self.getProperty("got_revision_"+self.layername)
- archive_name = self.layername + "-" + revision
- command = command + " git archive --format=tar HEAD "
- command = command + "--prefix=" + self.layername + "-" + revision + "/"
- command = command + " | bzip2 -c > " + self.layername + "-" + revision + ".tar.bz2; "
- command = command + "md5sum " + self.layername + "-" + revision + ".tar.bz2 >> "
- command = command + self.layername + "-" + revision + ".tar.bz2.md5sum; "
- command = command + "mkdir -p " + DEST + "; rsync -av "
- command = command + archive_name +".tar.bz2* " + DEST
- self.command=command
- else:
- self.command="echo 'No revision found. Skipping tarball'"
- else:
- self.command="echo 'Not publishing build, skipping step'"
- ShellCommand.start(self)