def start(self): pullrequestid = self.getProperty(PROPERTYNAME_JENKINSGITHUBPULLREQUEST) build_url = self.getProperty(PROPERTYNAME_JENKINSBUILDURL) mono_version = self.getProperty(PROPERTYNAME_MONOVERSION) git_commit = self.getProperty(PROPERTYNAME_JENKINSGITCOMMIT) config_name = self.getProperty('config_name') benchmarker_commit = self.getProperty('got_revision').get('benchmarker') assert benchmarker_commit is not None cmd = ['mono', 'tools/compare.exe', '--create-run-set'] if pullrequestid is not None: cmd.append('--pull-request-url') cmd.append('https://github.com/mono/mono/pull/%s' % str(pullrequestid)) cmd.append('--mono-repository') cmd.append('../mono') if build_url is not None: cmd.append('--build-url') cmd.append(build_url) if git_commit is not None: cmd.append('--main-product') cmd.append('mono') cmd.append(git_commit) cmd.append('--config-file') cmd.append('configs/%s.conf' % (config_name)) cmd.append('--root') cmd.append(self.install_root(mono_version)) cmd.append('--secondary-product') cmd.append('benchmarker') cmd.append(benchmarker_commit) self.setCommand(cmd) ShellCommand.start(self)
def start(self): if self.master is None: self.master = self.build.builder.botmaster.parent #find artifact dependency br = yield self._getBuildRequest() if br["submitted_at"] > ARTIFACT_LOCATION_CHANGE_DATE: artifactPath = "%s/%s_%s" % (safeTranslate( self.artifactBuilderName), br['brid'], FormatDatetime(br["submitted_at"])) else: artifactPath = "%s_%s_%s" % (safeTranslate( self.artifactBuilderName), br['brid'], FormatDatetime(br["submitted_at"])) if (self.artifactDirectory): artifactPath += "/%s" % self.artifactDirectory remotelocation = getRemoteLocation(self.artifactServer, self.artifactServerDir, artifactPath, self.artifact) command = rsyncWithRetry(self, remotelocation, self.artifactDestination, self.artifactServerPort) self.setCommand(command) ShellCommand.start(self)
def start(self): buildername=self.getProperty("buildername") oldbuildername=buildername.replace("plugin", "poky") branch=self.getProperty("branch") eclipsehome=self.workerworkdir + "/" + buildername + '/build' self.command='cd ' + eclipsehome + '/scripts/; ./setup.sh; ECLIPSE_HOME="' + eclipsehome + '/scripts/eclipse/" ./build.sh ' + branch + ' development' ShellCommand.start(self)
def start(self): # choose progressMetrics and logfiles based on whether trial is being # run with multiple workers or not. output_observer = logobserver.OutputProgressObserver('test.log') if self.jobs is not None: self.jobs = int(self.jobs) self.command.append("--jobs=%d" % self.jobs) # using -j/--jobs flag produces more than one test log. self.logfiles = {} for i in xrange(self.jobs): self.logfiles['test.%d.log' % i] = '_trial_temp/%d/test.log' % i self.logfiles['err.%d.log' % i] = '_trial_temp/%d/err.log' % i self.logfiles['out.%d.log' % i] = '_trial_temp/%d/out.log' % i self.addLogObserver('test.%d.log' % i, output_observer) else: # this one just measures bytes of output in _trial_temp/test.log self.addLogObserver('test.log', output_observer) # now that self.build.allFiles() is nailed down, finish building the # command if self.testChanges: for f in self.build.allFiles(): if f.endswith(".py"): self.command.append("--testmodule=%s" % f) else: self.command.extend(self.tests) log.msg("Trial.start: command is", self.command) ShellCommand.start(self)
def __init__(self, factory, argdict=None, **kwargs): for k, v in argdict.iteritems(): setattr(self, k, v) self.description = "Creating Current Link" # Timeout needs to be passed to LoggingBuildStep as a kwarg self.timeout = 100000 kwargs['timeout']=self.timeout buildername = self.getProperty("buildername") branch = self.getProperty("branch_poky") persistdbdir = str(os.environ.get('PERSISTDB_DIR')) buildhistory = str(os.environ.get('BUILD_HISTORY_COLLECT'')) nightly_arch = [] nightly_arch.append("x86") nightly_arch.append("x86-64") nightly_arch.append("arm") nightly_arch.append("mips") nightly_arch.append("ppc") self.workdir="build/build" for arch in nightly_arch: if "nightly-" + arch in buildername and branch == "master" and buildhistory == "True" and self.sync == "checkout": command="mkdir -p tmp/cache; " command=command+"mkdir -p " + persistdbdir + "/" + buildername \ + "/" + branch + "/" + self.distro +";" command=command+"cp -R " + persistdbdir + "/" + buildername \ + "/" + branch + "/" + self.distro \ + "/bb_persist_data.sqlite3 tmp/cache" elif "nightly-" + arch in buildername and branch == "master" and buildhistory == "True" and self.sync == "checkin": command=command+"cp -R tmp/cache/bb_persist_data.sqlite3 " \ + persistdbdir + "/" + buildername \ + "/" + branch + "/" + self.distro ShellCommand.start(self, **kwargs)
def start(self, *args, **kwargs): # if getattr(self, 'builder', None): # build_number = self.builder.getProperty("number") # self.setCommand(["python", "setup.py", "create_debian_package", "--build-number=%s" % build_number]) # ShellCommand.start(self, *args, **kwargs)
def start(self): DEST=self.getProperty("DEST") buildername=self.getProperty("buildername") if self.getProperty("custom_release_me_" + buildername): revision=self.getProperty("custom_release_name_" + buildername) else: revision=self.getProperty("got_revision_poky") self.basedir=os.path.join(self.slavedir, buildername) self.basedir=os.path.join(self.slavedir, buildername) bsptardir = self.machine cmd = "mkdir -p " + bsptardir + "/meta-intel; cd " + bsptardir + "; rm -rf meta-intel;" cmd = cmd + "git clone " + self.getProperty("repourl_meta-intel") + " meta-intel;" cmd = cmd + "cd meta-intel; git checkout " + self.getProperty("got_revision_meta-intel")+";" # issue with buildbot choking on a find exec. figure this out later. cmd = cmd + "for x in `find . -name .git\*`; do rm -rf $x; done;" cmd = cmd + "for x in `/bin/ls|egrep -v '(common|tlk|conf|README|MAINT|meta-" + self.machine.replace("-noemgd", "").replace("-lsb", "") + ")'`; do rm -rf $x; done;" cmd = cmd + "mkdir -p ./meta-" + self.machine.replace("-noemgd", "").replace("-lsb", "") + "/binary;" cmd = cmd + "cp -RL " + DEST + "/machines/" + self.machine + "/core-image-sato-" + self.machine + ".hddimage ./meta-" + self.machine.replace("-noemgd", "").replace("-lsb", "") + "/binary;" cmd = cmd + "cp -RL " + DEST + "/machines/" + self.machine + "/core-image-minimal-" + self.machine + ".hddimage ./meta-" + self.machine.replace("-noemgd", "").replace("-lsb", "") + "/binary;" cmd = cmd + "echo '' >> ./README.tlk;" cmd = cmd + "echo 'The following text is autogenerated during the autobuilder build process.' >> ./README.tlk;" cmd = cmd + "echo 'It is not a part of the repositories used to create this BSP package.' >> ./README.tlk;" cmd = cmd + "echo '------------------------------------------------------------------------' >> ./README.tlk;" cmd = cmd + "echo 'Please note that the provided images were built using the meta-tlk layer' >> ./README.tlk;" cmd = cmd + "echo '(time limited kernel). Build instructions to build non-tlk images are' >> ./README.tlk;" cmd = cmd + "echo 'provided in ./meta-" + self.machine.replace("-noemgd", "").replace("-lsb", "") + "/README' >> ./README.tlk;" cmd = cmd + "echo '' >> ./README.tlk; cd ..;" cmd = cmd + "cd ..; tar cjvf " + self.machine + ".tar.bz2 meta-intel;" cmd = cmd + "mkdir -p " + DEST + "/machines/" + self.machine +";" cmd = cmd + "cp -RL " + self.machine + ".tar.bz2 " + DEST + "/machines/" + self.machine +";" self.command=cmd ShellCommand.start(self)
def start(self): try: self.getProperty('package-local') except KeyError: self.setProperty('package-local', self.package) self.cmd = dedent( """ # Wait a bit for the probe to startup or curl won't be able to connect to # the FTP server. # XXX: why do we need to wait that much? :( while true do curl --ftp-pasv ftp://%(user)s:%(password)s@%(prop-instance)s --upload-file %(prop-pkg)s if [ $? = 0 ] then exit 0 fi echo "FTP server not yet launched, waiting a bit..." sleep 1 done """ % { 'package': self.package, 'user': self.user, 'password': self.password, 'prop-instance': self.getProperty('instance-name'), 'prop-pkg': self.getProperty('package-local') } ) self.setCommand(self.cmd) ShellCommand.start(self)
def start(self): properties = self.build.getProperties() if properties.has_key("skip_configure"): return SKIPPED ShellCommand.start(self)
def start(self): properties = self.build.getProperties() if not properties.has_key("package"): return SKIPPED ShellCommand.start(self)
def start(self): DEST=self.getProperty("DEST") buildername=self.getProperty("buildername") revision = "" if str(os.environ.get('PUBLISH_BUILDS')) == "True": if self.getProperty("custom_release_me_"+buildername): revision=self.getProperty("custom_release_name_"+buildername) elif self.getProperty("got_revision_"+self.layername): revision=self.getProperty("got_revision_"+self.layername) if revision is not "": self.basedir=os.path.join(os.path.join(os.path.join( self.slavedir, buildername), self.workdir)) command = " git archive --format=tar HEAD " command = command + "--prefix=" + self.layername + "-" + revision + "/" command = command + " | gzip > " + self.layername + "-" + revision + ".tar.gz; " 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 + "md5sum " + self.layername + "-" + revision + ".tar.gz >> " command = command + self.layername + "-" + revision + ".tar.gz.md5sum; " command = command + "mkdir -p " + DEST + "; rsync -av " command = command + self.layername + "-" + revision +".tar.* " + 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)
def start(self): if self.getProperty('branch_'+self.layername): self.branch = self.getProperty('branch_'+self.layername) else: self.branch = "master" if self.getProperty('repo_'+self.layername): self.repourl = self.getProperty('repo_'+self.layername) else: self.repourl = "git://git.yoctoproject.org/poky" if self.getProperty('commit_'+self.layername) is 'HEAD' and self.getProperty('commit_resolvedhead_'+self.layername) is not None: self.commit = self.getProperty('commit_resolvedhead_'+self.layername) else: self.commit = self.getProperty('commit_' + self.layername) if self.commit == "HEAD": cmd = 'git ls-remote ' + self.repourl + ' refs/heads/' + self.branch + '|cut -f1' elif self.commit is not None: cmd = 'echo ' + self.commit else: self.finished(SUCCESS) self.build.stopBuild('STOPPED!') self.command = cmd ShellCommand.start(self)
def start(self): # choose progressMetrics and logfiles based on whether trial is being # run with multiple workers or not. output_observer = logobserver.OutputProgressObserver('test.log') if self.jobs is not None: self.jobs = int(self.jobs) self.command.append("--jobs=%d" % self.jobs) # using -j/--jobs flag produces more than one test log. self.logfiles = {} for i in range(self.jobs): self.logfiles['test.%d.log' % i] = '_trial_temp/%d/test.log' % i self.logfiles['err.%d.log' % i] = '_trial_temp/%d/err.log' % i self.logfiles['out.%d.log' % i] = '_trial_temp/%d/out.log' % i self.addLogObserver('test.%d.log' % i, output_observer) else: # this one just measures bytes of output in _trial_temp/test.log self.addLogObserver('test.log', output_observer) # now that self.build.allFiles() is nailed down, finish building the # command if self.testChanges: for f in self.build.allFiles(): if f.endswith(".py"): self.command.append("--testmodule=%s" % f) else: self.command.extend(self.tests) log.msg("Trial.start: command is", self.command) ShellCommand.start(self)
def start(self): pullrequestid = self.getProperty(PROPERTYNAME_JENKINSGITHUBPULLREQUEST) build_url = self.getProperty(PROPERTYNAME_JENKINSBUILDURL) mono_version = self.getProperty(PROPERTYNAME_MONOVERSION) git_commit = self.getProperty(PROPERTYNAME_JENKINSGITCOMMIT) machine_name = self.getProperty('machine_name') config_name = self.getProperty('config_name') benchmarker_commit = self.getProperty('got_revision').get('benchmarker') assert benchmarker_commit is not None cmd = ['mono', '--debug', 'tools/compare.exe', '--create-run-set'] if pullrequestid is not None: cmd.append('--pull-request-url') cmd.append('https://github.com/mono/mono/pull/%s' % str(pullrequestid)) cmd.append('--mono-repository') cmd.append('../mono') if build_url is not None: cmd.append('--build-url') cmd.append(build_url) if git_commit is not None: cmd.append('--main-product') cmd.append('mono') cmd.append(git_commit) cmd.append('--machine') cmd.append(machine_name) cmd.append('--config-file') cmd.append('configs/%s.conf' % (config_name)) cmd.append('--root') cmd.append(self.install_root(mono_version)) cmd.append('--secondary-product') cmd.append('benchmarker') cmd.append(benchmarker_commit) self.setCommand(cmd) ShellCommand.start(self)
def start(self): # now that self.build.allFiles() is nailed down, finish building the # command if self.testChanges: for f in self.build.allFiles(): if f.endswith(".py"): self.command.append("--testmodule=%s" % f) else: for test in self.tests: if test: # If there's just a null-y string, don't add it self.command.append(test) log.msg("Trial.start: command is", self.command) # if our slave is too old to understand logfiles=, fetch them # manually. This is a fallback for the Twisted buildbot and some old # buildslaves. self._needToPullTestDotLog = False if self.slaveVersionIsOlderThan("shell", "2.1"): log.msg("Trial: buildslave %s is too old to accept logfiles=" % self.getSlaveName()) log.msg(" falling back to 'cat _trial_temp/test.log' instead") self.logfiles = {} self._needToPullTestDotLog = True ShellCommand.start(self)
def start(self): command = self._python + [ "-c", self._formatSource(self._moduleInfo, self._pkg_resources) ] self.setCommand(command) ShellCommand.start(self)
def start(self): self.distro = self.getProperty("DISTRO") self.machine = self.getProperty("MACHINE") kmeta = self.getProperty("custom_kmeta") kbranch = self.getProperty("custom_kbranch") srcrev_meta = self.getProperty("custom_srcrev_meta") srcrev_machine = self.getProperty("custom_srcrev_machine") srcuri_meta = self.getProperty("custom_srcuri_meta") srcuri_machine = self.getProperty("custom_srcuri_machine") fout = "" if self.distro == "poky-rt": self.kstring = "pn-linux-yocto-rt" if srcrev_machine != "" and str(srcrev_machine) != "None": fout += 'SRCREV_machine_%s_%s = "%s"\n' % (self.machine, self.kstring, srcrev_machine) if srcrev_meta != "" and str(srcrev_meta) != "None": fout += 'SRCREV_meta_%s_%s = "%s"\n' % (self.machine, self.kstring, srcrev_meta) if kmeta != "" and str(kmeta) != "None": fout += 'KMETA_%s_%s = "%s"\n' % (self.machine, self.kstring, kmeta) if srcuri_meta != "" and str(srcuri_meta) != "None": fout += 'SRC_URI_%s_%s += "%s;bareclone=1;branch=${KMETA};type=kmeta;name=meta"\n' % ( self.machine, self.kstring, srcuri_meta, ) if kbranch != "" and str(kbranch) != "None": fout += 'KBRANCH_%s_%s = "%s"\n' % (self.machine, self.kstring, kbranch) if srcuri_machine != "" and str(srcuri_machine) != "None": fout += 'SRC_URI_%s_%s += "%s;bareclone=1;branch=${KBRANCH};type=machine;name=machine"\n' % ( self.machine, self.kstring, srcuri_machine, ) self.command = ["sh", "-c", "printf '" + fout + "'>> ./build/conf/auto.conf"] ShellCommand.start(self)
def start(self): _layers = ast.literal_eval(self.getProperty("custom_layers")) fout = "" for layer in _layers: layername = layer.iterkeys().next() repo = layer[layer.iterkeys().next()]["repourl"] branch = layer[layer.iterkeys().next()]["branch"] # commit=layer[layer.iterkeys().next()]['commit'] storedir = None mirrordir = None method = "clobber" mode = "full" self.workdir = "" self.description += "/n" + layername + "/n" if "poky" in layername or "oecore" in layername: workdir = "build" else: workdir = "build/" + layername log.msg(layer) fout += ( "mkdir -p " + workdir + "; cd " + workdir + "; git clone " + repo + " .;git checkout" + branch + "; cd $BASEBUILDDIR;" ) self.command = ["sh", "-c", "BASEBUILDDIR=`pwd`; rm -rf build;" + fout] ShellCommand.start(self)
def start(self): cmd = dedent( """ # Wait a bit to be sure the trigger which install the package on the # probe has been launched. sleep 3 # Wait for some "install" process in the virtual machine to be ended. # We suppose that the "install" process is the process launch by the Nova's # installator(actually, there are more processes which match this string, # but they are all related to Nova's installation). echo "Checking if the installation has ended" while true do echo "Checking if 'install' is running:" """ + FAB_CMD % { 'fab_host': 'srv4', 'fab_cmd': 'check_install_running', } + """ if [ $? = 1 ] then echo "OK, it seems no 'install' processes are running anymore!" echo break fi # Wait a bit to avoid overloading the machine sleep 1 echo done echo "Waiting for Supervisord to finish its starting job" while true do echo "Checking status of Supervisor:" """ + FAB_CMD % { 'fab_host': self.getProperty('name'), 'fab_cmd': 'supervisord', } + """ | grep "STARTING" if [ $? = 1 ] then echo "OK, it seems Supervisor tried its" \ "best to start all its subprocesses!" break fi # Wait a bit to avoid overloading the machine sleep 1 echo done """) self.setCommand(self.cmd) ShellCommand.start(self)
def start(self): cmd = FAB_CMD % { 'fab_host': self.getProperty('name'), 'fab_cmd': 'check_nova_processes', } self.setCommand(cmd) ShellCommand.start(self)
def start(self): cmd = (FAB_CMD + " --hide=running,status") % { 'fab_host': self.getProperty('name'), 'fab_cmd': 'readlink', } self.setCommand(cmd) ShellCommand.start(self)
def start(self): self._set_build_props() if self.do_make_args: self.setCommand(self.command + " " + " ".join(self._get_make_args())) ShellCommand.start(self)
def start(self): import os if str(os.environ.get('PUBLISH_BUILDS')) == "True": DEST=self.getProperty('DEST') self.command = "rm -rf " + DEST + "/../CURRENT; ln -s "+ DEST + " " + DEST+"/../CURRENT" else: self.command = "echo 'PUBLISH_BUILDS is set to False'" ShellCommand.start(self)
def start(self): datedDir = self.getLongDatedPath() latestDir = self.getLatestPath() tinderboxBuildsDir = self.getTinderboxBuildsPath() commands = [] if self.releaseToDated: # 1) Create the directory on the staging server. # 2) Upload the package(s). # 3) Fix the permissions on the package(s). # 4) Maybe adjust the group on the package(s). # 5) Symlink the longer dated directory to the shorter one. cmd = "" cmd += self.createDirCommand(datedDir) + " && " + \ self.uploadCommand(datedDir) + " && " + \ self.chmodCommand(datedDir) if self.group: cmd += " && " + self.chgrpCommand(datedDir) cmd += " && " + self.symlinkDateDirCommand(datedDir) if self.uploadCompleteMar: cmd += " && " + self.uploadCompleteMarCommand(datedDir) commands.append(cmd) if self.releaseToLatest: # 1) Create the directory on the staging server. # 2) If there was a dated release, rsync those files to the # latest-(milestone) directory. # 3) If not, upload the package(s). # 4) Fix the permissions on the package(s). # 5) Maybe adjust the group on the package(s). cmd = "" cmd += self.createDirCommand(latestDir) + " && " if self.releaseToDated: cmd += self.syncCommand(datedDir, latestDir) + " && " else: cmd += self.uploadCommand(latestDir) + " && " cmd += self.chmodCommand(latestDir) if self.group: cmd += " && " + self.chgrpCommand(latestDir) commands.append(cmd) if self.releaseToTinderboxBuilds: # 1) Create the directory on the staging server. # 2) Upload the package(s). # 3) Fix the permissions on the package(s). # 4) Maybe adjust the group on the package(s). cmd = "" cmd += self.createDirCommand(tinderboxBuildsDir) + " && " + \ self.uploadCommand(tinderboxBuildsDir) + " && " + \ self.chmodCommand(tinderboxBuildsDir) if self.group: cmd += " && " + self.chgrpCommand(tinderboxBuildsDir) commands.append(cmd) finalCommand = ' && '.join(commands) self.setCommand(finalCommand) ShellCommand.start(self)
def start(self): buildername=self.getProperty("buildername") log.msg(self.workdir) log.msg(self.layerversion) layerconf=self.workerworkdir + "/" + buildername + "/build/" + self.workdir + "/conf/layer.conf|grep LAYERVERSION_" + self.layerversion cmd = 'cat ' + layerconf self.command = cmd ShellCommand.start(self)
def start(self): self.command = ["python", "-m", "tox", "-r"] if self._systemPackages: self.command.append("--sitepackages") self.command = self.command + ["-e", self._toxEnv] + self.tests ShellCommand.start(self)
def start(self): self.layerversion_yoctobsp = self.getProperty("layerversion_yoctobsp") self.machine = self.getProperty("MACHINE") if self.layerversion_yoctobsp is not None and int(self.layerversion_yoctobsp) < 2 and self.machine is not None and self.machine == "genericx86-64": self.command = "echo 'Skipping Step.'" else: self.command = ". ./oe-init-build-env; bitbake " + self.images self.description = ["Building " + str(self.images)] ShellCommand.start(self)
def start(self): res="SUCCESS" for result in self.build.results: if result == WARNINGS and res == "SUCCESS": res = "WARNINGS" if result == FAILURE: res = "FAILURE" self.build.setProperty("status", res, "BaseShellCommand") ShellCommand.start(self)
def start(self): urlGetter = LatestFileURL(self.url, self.filenameSearchString) (self.fileURL, self.filename) = urlGetter.getLatestFilename() if self.branch: self.setProperty("fileURL", self.fileURL) self.setProperty("filename", self.filename) self.setCommand( ["wget", "-nv", "-N", "--no-check-certificate", self.fileURL]) ShellCommand.start(self)
def start(self): urlGetter = LatestFileURL(self.url, self.filenameSearchString) self.filename = urlGetter.getLatestFilename() self.fileURL = self.url + self.filename if self.branch: self.setProperty("fileURL", self.fileURL) self.setProperty("filename", self.filename) self.setCommand(["wget", "-nv", "-N", self.fileURL]) ShellCommand.start(self)
def start(self): layerversion = self.getProperty("layerversion_core") if int(layerversion) > 1: self.description = ["Building core-image-sato -c populate_sdk"] self.command = ". ./oe-init-build-env; bitbake core-image-sato -c populate_sdk" else: self.description = ["Building meta-toolchain-gmae"] self.command = ". ./oe-init-build-env; bitbake meta-toolchain-gmae" ShellCommand.start(self)
def start(self): if not self.filename: if self.branch: self.filename = self.getProperty("filename") else: return FAILURE if self.filename: self.command.append(self.filename) ShellCommand.start(self)
def start(self): if self.getProperty("custom_send_email") == 'True': web_root = os.environ.get('WEB_ROOT') web_url = os.environ.get('WEB_URL') mailto = "" mailcc = "" mailbcc = "" if os.environ.get('QA_MAIL_TO'): mailto = os.environ.get('QA_MAIL_TO') if os.environ.get('QA_MAIL_CC'): mailcc = os.environ.get('QA_MAIL_CC') if os.environ.get('QA_MAIL_BCC'): mailbcc = os.environ.get('QA_MAIL_BCC') mailsig = os.environ.get('QA_MAIL_SIG') properties = self.build.getProperties().asDict() repoprops = {} mailsubject = "Build available for QA" email_header = ''' A build identified as needing QA has finished on the autobuilder. This build is located at:\n\n %s''' % (self.getProperty('DEST').replace(web_root, web_url)) if str(self.getProperty("custom_release_me")) == "True": yocto_number = self.getProperty("custom_yocto_number") rel_name = 'yocto-'+ yocto_number email_header = ''' A release candidate build for %s is now available at:\n\n %s\n\n Please begin QA on this build as soon as possible.''' % (rel_name, self.getProperty('DEST').replace(web_root, web_url)) mailsubject = "Release Candidate Build for " + rel_name + " now available." for k, v in properties.iteritems(): if "repourl_" in k: name = k.replace("repourl_", '') repourl = str(v[0]) githash = properties["commit_"+name][0] repoprops[name]=repourl, githash email_body = '\n\nBuild hash information: \n' for k, v in repoprops.iteritems(): email_body = email_body + '%s : %s \n' % (k, v[1]) mailcmd = 'echo -e "' + email_header + '\n' + email_body + '\n' + mailsig + ' " | mail -s \'' + mailsubject + '\'' if mailcc is not None and mailcc is not "": mailcmd += " -c '" + mailcc + "' " if mailbcc is not None and mailbcc is not "": mailcmd += " -b '" + mailbcc + "' " if mailto is not None and mailto is not "": mailcmd += " '" + mailto + "' " self.command = mailcmd else: self.command = 'echo "Not a QA build"' ShellCommand.start(self)
def start(self): # Set the property of the box directory so that later steps # can use it. self.setProperty("box_dir", self.box_dir, self.name) # Set the command to be correct self.setCommand(["rake", "acceptance:boxes[%s]" % self.box_dir]) # Run the actual start method ShellCommand.start(self)
def start(self): changes = self.step_status.build.getChanges() args = parseSendchangeArguments(changes[0].files) self.command = ["cvs", "-d", self.cvsroot, "co"] if 'branch' in args: self.command.extend(["-r", args['branch']]) self.command.append("mozilla/client.mk") ShellCommand.start(self)
def start(self): changes = self.step_status.build.getChanges() when = strftime("%Y-%m-%d_%H:%M", localtime(changes[0].when)) changer = changes[0].who args = parseSendchangeArguments(changes[0].files) dir = "%s-%s-%s" % (when, changer, self.getProperty('identifier')) fullDir = path.join(self.sshDir, dir) self.setCommand(['ssh', self.sshHost, 'mkdir', fullDir]) ShellCommand.start(self)
def start(self): # removed the mkdir because this happens on the master, not the slave if not self.filename: if self.branch: self.filename = self.getProperty("filename") else: return FAILURE if self.filename: self.command.append(self.filename) ShellCommand.start(self)
def start(self): import os fout = "" buildername=self.getProperty("buildername") branch=self.getProperty("branch") workdir=self.getProperty("workdir") if self.bbtextprepend != "": fout = fout +"\n"+self.bbtextprepend if self.bbtext: if self.bbtext == "#TOASTER": fout = fout+"\n"+self.getProperty("custom_bbtext") else: fout = fout+"\n"+self.bbtext #check to see if we have a prepend #check to see if we have text override self.command = "rm -rf ./build/conf/bblayers.conf; echo '" + fout + "'>> ./build/conf/bblayers.conf" self.setProperty("BBLAYERS", fout) ShellCommand.start(self) else: fout = fout + 'LCONF_VERSION = <LCONF> \n' fout = fout + 'BBPATH = "${TOPDIR}" \n' fout = fout + 'BBFILES ?="" \n' fout = fout + 'BBLAYERS += " \ \n' if self.buildprovider == "yocto": fout = fout + workdir + "/build/meta \ \n" fout = fout + workdir + "/build/meta-yocto \ \n" fout = fout + workdir + "/build/meta-yocto-bsp \ \n" if self.x32abi == True: fout = fout + workdir + '/build/meta-x32 \ \n' elif self.buildprovider == "oe": fout = fout + workdir + "/build/meta \ \n" if self.bsplayer == True: if self.bspprovider == "intel": if list(self.layerdirs): for layer in self.layerdirs: fout = fout + workdir + '/build/' + layer + ' \ \n' else: fout = fout + workdir + '/build/meta-intel \ \n' fout = fout + workdir + '/build/meta-intel/meta-' + buildername.replace("-server", "").replace("-gladden", "").replace("-noemgd", "").replace("-lsb", "") + ' \ \n' fout = fout + workdir + '/build/meta-intel/meta-tlk \ \n' elif self.bspprovider == "fsl-ppc": fout = fout + workdir + '/build/meta-fsl-ppc \ \n' elif self.bspprovider == "fsl-arm": fout = fout + workdir + '/build/meta-fsl-arm \ \n' elif self.bsplayer == False and list(self.layerdirs): for layer in self.layerdirs: fout = fout + workdir + '/build/' + layer + ' \ \n' for layer in self.layers: if layer.iterkeys().next()=="meta-qt3": fout = fout + workdir + '/build/meta-qt3 \ \n' fout = fout + '" \n' if self.bbtextappend != "": fout = fout + self.bbtextappend self.command = "LCONF=`cat ./build/conf/bblayers.conf| grep \"LCONF_VERSION =\"|cut -d'=' -f2`; rm -rf ./build/conf/bblayers.conf; echo '" + fout + "'>> ./build/conf/bblayers.conf; sed -i \"s/<LCONF>/$LCONF/\" ./build/conf/bblayers.conf" self.setProperty("BBLAYERS", fout) ShellCommand.start(self)
def start(self): import os DEST=self.getProperty('DEST') layerversion = self.getProperty("layerversion_core") IPK_PUBLISH_DIR = os.environ.get("IPK_PUBLISH_DIR") if layerversion and int(layerversion) < 4: command = "rm -rf ipk; cp -R " + DEST + "/" + IPK_PUBLISH_DIR + " ipk;" else: command = "rm -rf ipk; ln -s " + DEST + "/" + IPK_PUBLISH_DIR + " ipk;" self.command = command ShellCommand.start(self)
def start(self): import os DEST=self.getProperty('DEST') RPM_PUBLISH_DIR = os.environ.get("RPM_PUBLISH_DIR") IPK_PUBLISH_DIR = os.environ.get("IPK_PUBLISH_DIR") # Work around for #4186 command = "rm -rf ipk; cp -R " + DEST + "/" + IPK_PUBLISH_DIR + " ipk;" # command = "rm -rf ipk; ln -s " + DEST + "/" + IPK_PUBLISH_DIR + " ipk;" # command = command + "rm -rf rpm; ln -s " + DEST + "/" + RPM_PUBLISH_DIR + " rpm" self.command = command ShellCommand.start(self)
def start(self): if not self.filename: if self.branch: self.filename = self.getProperty("filename") else: return FAILURE for i in range(len(self.command)): if self.command[i] == "$FILENAME": self.command[i] = self.filename ShellCommand.start(self)
def start(self): # now that self.build.allFiles() is nailed down, finish building the # command if self.testChanges: for f in self.build.allFiles(): if f.endswith(".py"): self.command.append("--testmodule=%s" % f) else: self.command.extend(self.tests) log.msg("Trial.start: command is", self.command) ShellCommand.start(self)
def start(self): # Always do normal clean for try slaves, since nuking confuses the Chromium # scripts' GClient sync step. if self.is_try_slave or self.build_status_oracle.LastBuildSucceeded(): self.description = ['Clean'] cmd = 'python %s ' % self.clean_script else: self.build_status_oracle.ForgetLastBuild() self.description = ['Nuke Repository', '(Previous Failed)'] cmd = 'python %s --nuke' % self.clean_script self.setCommand(cmd) ShellCommand.start(self)
def start(self): # set up self.command as a very long sh -c invocation command = [] command.append("PYTHON='%s'" % self.virtualenv_python) command.append("VE='%s'" % self.virtualenv_dir) command.append("VEPYTHON='%s/bin/python'" % self.virtualenv_dir) command.append("PKG_URL='%s'" % _PACKAGE_STASH) command.append("PYGET='import urllib, sys; urllib.urlretrieve(" "sys.argv[1], filename=sys.argv[2])'") command.append("NSP_ARG='%s'" % ('--no-site-packages' if self.no_site_packages else '')) command.append(textwrap.dedent("""\ # first, set up the virtualenv if it hasn't already been done, or if it's # broken (as sometimes happens when a slave's Python is updated) if ! test -f "$VE/bin/pip" || ! "$VE/bin/python" -c 'import math'; then echo "Setting up virtualenv $VE"; rm -rf "$VE"; test -d "$VE" && { echo "$VE couldn't be removed"; exit 1; }; mkdir -p "$VE" || exit 1; # get the prerequisites for building a virtualenv with no pypi access (including both tarballs and wheels) for prereq in virtualenv.py pip-1.5.6.tar.gz setuptools-5.8-py2.py3-none-any.whl pip-1.5.6-py2.py3-none-any.whl; do [ -f "$VE/$prereq" ] && continue echo "Fetching $PKG_URL/$prereq" $PYTHON -c "$PYGET" "$PKG_URL/$prereq" "$VE/$prereq" || exit 1; done; echo "Invoking virtualenv.py (this accesses pypi)" "$PYTHON" "$VE/virtualenv.py" --python="$PYTHON" $NSP_ARG "$VE" || exit 1 else echo "Virtualenv already exists" fi """).strip()) # now install each requested package for pkg in self.virtualenv_packages: command.append(textwrap.dedent("""\ echo "Installing %(pkg)s"; "$VE/bin/pip" install --no-index --download-cache="$PWD/../.." --find-links="$PKG_URL" %(pkg)s || exit 1 """).strip() % dict(pkg=pkg)) # make $VE/bin/trial work, even if we inherited trial from site-packages command.append(textwrap.dedent("""\ if ! test -x "$VE/bin/trial"; then echo "adding $VE/bin/trial"; ln -s `which trial` "$VE/bin/trial"; fi """).strip()) # and finally, straighten out some preferred versions command.append(textwrap.dedent("""\ echo "Checking for simplejson or json"; "$VEPYTHON" -c 'import json' 2>/dev/null || "$VEPYTHON" -c 'import simplejson' || "$VE/bin/pip" install --no-index --download-cache="$PWD/.." --find-links="$PKG_URL" simplejson || exit 1; echo "Checking for sqlite3, including pysqlite3 on Python 2.5"; "$VEPYTHON" -c 'import sqlite3, sys; assert sys.version_info >= (2,6)' 2>/dev/null || "$VEPYTHON" -c 'import pysqlite2.dbapi2' || "$VE/bin/pip" install --no-index --download-cache="$PWD/.." --find-links="$PKG_URL" pysqlite || exit 1 """).strip()) self.command = ';\n'.join(command) return ShellCommand.start(self)
def start(self): # set up self.command as a very long sh -c invocation command = [] command.append("PYTHON='%s'" % self.virtualenv_python) command.append("VE='%s'" % self.virtualenv_dir) command.append("VEPYTHON='%s/bin/python'" % self.virtualenv_dir) command.append( textwrap.dedent("""\ # first, set up the virtualenv if it hasn't already been done, or if it's # broken (as sometimes happens when a slave's Python is updated) if ! test -f "$VE/bin/pip" || ! "$VE/bin/python" -c 'import math'; then echo "Setting up virtualenv $VE"; rm -rf "$VE"; test -d "$VE" && { echo "$VE couldn't be removed"; exit 1; }; virtualenv "$VE" || exit 1; else echo "Virtualenv already exists" fi """).strip()) # make sure pip is upgraded to latest version (so that master[test] works recursively) command.append( textwrap.dedent("""\ echo "Upgrading pip"; $VE/bin/pip install -U pip """)) # now install each requested package for pkg in self.virtualenv_packages: command.append( textwrap.dedent("""\ echo "Installing %(pkg)s"; "$VE/bin/pip" install %(pkg)s || exit 1 """).strip() % dict(pkg=pkg)) # make $VE/bin/trial work, even if we inherited trial from site-packages command.append( textwrap.dedent("""\ if ! test -x "$VE/bin/trial"; then echo "adding $VE/bin/trial"; ln -s `which trial` "$VE/bin/trial"; fi """).strip()) # and finally, straighten out some preferred versions command.append( textwrap.dedent("""\ echo "Checking for simplejson or json"; "$VEPYTHON" -c 'import json' 2>/dev/null || "$VEPYTHON" -c 'import simplejson' || "$VE/bin/pip" install simplejson || exit 1; echo "Checking for sqlite3, including pysqlite3 on Python 2.5"; "$VEPYTHON" -c 'import sqlite3, sys; assert sys.version_info >= (2,6)' 2>/dev/null || "$VEPYTHON" -c 'import pysqlite2.dbapi2' || "$VE/bin/pip" install pysqlite || exit 1 """).strip()) self.command = ';\n'.join(command) return ShellCommand.start(self)
def start(self): command = ['robocopy', self.source, self.destination] if self.files: command += self.files if self.recursive: command.append('/E') if self.mirror: command.append('/MIR') if self.move: command.append('/MOVE') if self.exclude: command.append('/XF') command += self.exclude if self.verbose: command.append('/V /TS /FP') command += ['/TEE', '/NP'] self.setCommand(command) ShellCommand.start(self)
def start(self): cmd_touch = ['touch'] match = self.getProperty(PROPERTYNAME_COMPARE_JSON, "") if match == "" or match is None: self.setCommand(['echo', 'nothing todo']) else: j = json.loads(match) run_ids = [i['id'] for i in j['runs']] self.setProperty(PROPERTYNAME_RUNIDS, run_ids) bin_files = [i['binaryProtocolFile'].encode('ascii', 'ignore') for i in j['runs']] for bin_file in bin_files: self.addLogFile(os.path.basename(bin_file), bin_file) cmd_touch.append(bin_file) self.setCommand(['bash', '-c', "sleep 1; " + " ".join(cmd_touch) + "; sleep 1"]) self.setProperty(PROPERTYNAME_COMPARE_JSON, None) ShellCommand.start(self) self.setProperty(PROPERTYNAME_BINARY_PROTOCOL_FILES, self._step_status.getLogs())
def start(self): # create the command htmlFiles = {} for f in self.build.allFiles(): if f.endswith(".xhtml") and not f.startswith("sandbox/"): htmlFiles[f] = 1 # remove duplicates hlintTargets = sorted(htmlFiles.keys()) if not hlintTargets: return SKIPPED self.hlintFiles = hlintTargets c = [] if self.python: c.append(self.python) c += ["bin/lore", "-p", "--output", "lint"] + self.hlintFiles self.setCommand(c) # add an extra log file to show the .html files we're checking self.addCompleteLog("files", "\n".join(self.hlintFiles) + "\n") ShellCommand.start(self)
def start(self): pullrequestid = self.getProperty(PROPERTYNAME_JENKINSGITHUBPULLREQUEST) build_url = self.getProperty(PROPERTYNAME_JENKINSBUILDURL) mono_version = self.getProperty(PROPERTYNAME_MONOVERSION) git_commit = self.getProperty(PROPERTYNAME_JENKINSGITCOMMIT) config_name = self.getProperty('config_name') cmd1 = ['mono', 'tools/compare.exe', '--create-run-set'] if pullrequestid is not None: cmd1.append('--pull-request-url') cmd1.append('https://github.com/mono/mono/pull/%s' % str(pullrequestid)) cmd1.append('--mono-repository') cmd1.append('../mono') cmd2 = [ '--build-url', build_url, '--root', '../build/%s' % (self.install_root('/opt/' + mono_version)), '--commit', git_commit, 'tests/', 'benchmarks/', 'machines/', 'configs/%s.conf' % (config_name) ] self.setCommand(cmd1 + cmd2) ShellCommand.start(self)
def start(self): changes = self.step_status.build.getChanges() if len(changes) < 1: log.msg("No changes, not doing anything") self.step_status.setColor("yellow") self.step_status.setText(["Skipped patch step:", "no patch"]) self.finished(SKIPPED) return SKIPPED if len(changes) > 1: log.msg("Ignoring all but the first change...") args = parseSendchangeArguments(changes[0].files) if not 'patchFile' in args and self.optional: return SKIPPED self.setCommand([ "patch", "-f", "-p%d" % int(args['patchLevel']), "-i", args['patchFile'] ]) ShellCommand.start(self)
def start(self): br = self.build.requests[0] if mkdt(br.submittedAt) > ARTIFACT_LOCATION_CHANGE_DATE: artifactPath = "%s/%s_%s" % (self.build.builder.config.builddir, br.id, FormatDatetime(mkdt(br.submittedAt))) else: artifactPath = "%s_%s_%s" % (self.build.builder.config.builddir, br.id, FormatDatetime(mkdt(br.submittedAt))) if (self.artifactDirectory): artifactPath += "/%s" % self.artifactDirectory command = ["ssh", self.artifactServer] if self.artifactServerPort: command += ["-p %s" % self.artifactServerPort] command += [ "cd %s;" % self.artifactServerDir, "mkdir -p ", artifactPath ] self.setCommand(command) ShellCommand.start(self)
def start(self): br = self.build.requests[0] # this means that we are merging build requests with this one if len(self.build.requests) > 1: master = self.build.builder.botmaster.parent reuse = yield master.db.buildrequests.updateMergedBuildRequest( self.build.requests) if mkdt(br.submittedAt) > ARTIFACT_LOCATION_CHANGE_DATE: artifactPath = "%s/%s_%s" % (self.build.builder.config.builddir, br.id, FormatDatetime(mkdt(br.submittedAt))) else: artifactPath = "%s_%s_%s" % (self.build.builder.config.builddir, br.id, FormatDatetime(mkdt(br.submittedAt))) artifactServerPath = self.build.getProperty("artifactServerPath", None) if artifactServerPath is None: self.build.setProperty("artifactServerPath", self.artifactServerURL + "/" + artifactPath, "UploadArtifact") if (self.artifactDirectory): artifactPath += "/%s" % self.artifactDirectory remotelocation = getRemoteLocation(self.artifactServer, self.artifactServerDir, artifactPath, self.artifact) command = rsyncWithRetry(self, self.artifact, remotelocation, self.artifactServerPort) self.artifactURL = self.artifactServerURL + "/" + artifactPath + "/" + self.artifact self.setCommand(command) ShellCommand.start(self)