buildmaster: another try on date directory

This commit is contained in:
Martin Krizek 2015-03-10 13:17:34 +00:00
parent df50e45448
commit 7df4b622ef

View file

@ -185,6 +185,17 @@ factory.addStep(DirectoryUpload(slavesrc=Interpolate('/var/lib/taskotron/artifac
factory.addStep(FileUpload(slavesrc='/var/log/taskotron/taskotron.log', factory.addStep(FileUpload(slavesrc='/var/log/taskotron/taskotron.log',
masterdest=Interpolate('{{ public_artifacts_dir }}/%(prop:uuid)s/taskotron.log'), masterdest=Interpolate('{{ public_artifacts_dir }}/%(prop:uuid)s/taskotron.log'),
mode=0644)) mode=0644))
import datetime
from buildbot.process.properties import renderer
@renderer
def today(props):
return datetime.datetime.now().strftime("%Y%m%d%H%M%S")
# move artifacts dir
factory.addStep(MasterShellCommand(command=["mkdir", '-p', '-m', '0755', Interpolate('{{ public_artifacts_dir }}/%(kw:today)s', today=today), '&&', 'mv', Interpolate('{{ public_artifacts_dir }}/%(prop:uuid)s/'), Interpolate('{{ public_artifacts_dir }}/%(kw:today)s/', today=today)],
descriptionDone=['Move artifacs dir']))
{% else %} {% else %}
# capture the taskotron log # capture the taskotron log
factory.addStep(ShellCommand(command=["cat", "/var/log/taskotron/taskotron.log"], name="cat_log", factory.addStep(ShellCommand(command=["cat", "/var/log/taskotron/taskotron.log"], name="cat_log",