From 7df4b622efb6977ccd7ba4e269ff3ef5583f8e9c Mon Sep 17 00:00:00 2001 From: Martin Krizek Date: Tue, 10 Mar 2015 13:17:34 +0000 Subject: [PATCH] buildmaster: another try on date directory --- .../templates/taskotron.master.cfg.j2 | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/roles/taskotron/buildmaster-configure/templates/taskotron.master.cfg.j2 b/roles/taskotron/buildmaster-configure/templates/taskotron.master.cfg.j2 index 954033cc59..64eeadf07c 100644 --- a/roles/taskotron/buildmaster-configure/templates/taskotron.master.cfg.j2 +++ b/roles/taskotron/buildmaster-configure/templates/taskotron.master.cfg.j2 @@ -185,6 +185,17 @@ factory.addStep(DirectoryUpload(slavesrc=Interpolate('/var/lib/taskotron/artifac factory.addStep(FileUpload(slavesrc='/var/log/taskotron/taskotron.log', masterdest=Interpolate('{{ public_artifacts_dir }}/%(prop:uuid)s/taskotron.log'), 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 %} # capture the taskotron log factory.addStep(ShellCommand(command=["cat", "/var/log/taskotron/taskotron.log"], name="cat_log",