From 3a2ca287584cb30454d30c5da62e1165b9b6d416 Mon Sep 17 00:00:00 2001 From: Tim Flink Date: Thu, 26 Feb 2015 14:57:07 +0000 Subject: [PATCH 1/3] changing dir creation to be on the master, as it should be --- .../buildmaster-configure/templates/taskotron.master.cfg.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/taskotron/buildmaster-configure/templates/taskotron.master.cfg.j2 b/roles/taskotron/buildmaster-configure/templates/taskotron.master.cfg.j2 index 1e907bfbb7..a9b8fa5a6d 100644 --- a/roles/taskotron/buildmaster-configure/templates/taskotron.master.cfg.j2 +++ b/roles/taskotron/buildmaster-configure/templates/taskotron.master.cfg.j2 @@ -173,7 +173,7 @@ factory.addStep(ShellCommand(command=["runtask", '-i', {% if deployment_type == 'dev' %} # create artifacts task_output directory -factory.addStep(ShellCommand(command=['mkdir', '-p', '{{ public_artifacts_dir }}/%(prop:uuid)s/task_output'])) +factory.addStep(MasterShellCommand(command=['mkdir', '-p', '{{ public_artifacts_dir }}/%(prop:uuid)s/task_output'])) # copy artifacts to master factory.addStep(DirectoryUpload(slavesrc=Interpolate('/var/lib/taskotron/artifacts/%(prop:uuid)s/'), From 6ab16c2c98e5d8fb5cc175f6743841d48a4989cd Mon Sep 17 00:00:00 2001 From: Tim Flink Date: Thu, 26 Feb 2015 14:58:44 +0000 Subject: [PATCH 2/3] importing the MasterShellCommand helps to make the step work --- .../buildmaster-configure/templates/taskotron.master.cfg.j2 | 1 + 1 file changed, 1 insertion(+) diff --git a/roles/taskotron/buildmaster-configure/templates/taskotron.master.cfg.j2 b/roles/taskotron/buildmaster-configure/templates/taskotron.master.cfg.j2 index a9b8fa5a6d..5433452f65 100644 --- a/roles/taskotron/buildmaster-configure/templates/taskotron.master.cfg.j2 +++ b/roles/taskotron/buildmaster-configure/templates/taskotron.master.cfg.j2 @@ -143,6 +143,7 @@ from buildbot.steps.shell import ShellCommand from buildbot.process.properties import Property, Interpolate from buildbot.steps.slave import RemoveDirectory from buildbot.steps.transfer import DirectoryUpload, FileUpload +from buildbot.steps.master import MasterShellCommand factory = BuildFactory() From dd6497f6c0faed197c0ea964386a2425e7754673 Mon Sep 17 00:00:00 2001 From: Martin Krizek Date: Thu, 26 Feb 2015 15:11:33 +0000 Subject: [PATCH 3/3] buildmaster: we don't need to mkdir artifacts dir after all Also change permissions --- .../templates/taskotron.master.cfg.j2 | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/roles/taskotron/buildmaster-configure/templates/taskotron.master.cfg.j2 b/roles/taskotron/buildmaster-configure/templates/taskotron.master.cfg.j2 index 5433452f65..a8eec3ed99 100644 --- a/roles/taskotron/buildmaster-configure/templates/taskotron.master.cfg.j2 +++ b/roles/taskotron/buildmaster-configure/templates/taskotron.master.cfg.j2 @@ -143,7 +143,6 @@ from buildbot.steps.shell import ShellCommand from buildbot.process.properties import Property, Interpolate from buildbot.steps.slave import RemoveDirectory from buildbot.steps.transfer import DirectoryUpload, FileUpload -from buildbot.steps.master import MasterShellCommand factory = BuildFactory() @@ -173,16 +172,15 @@ factory.addStep(ShellCommand(command=["runtask", '-i', {% if deployment_type == 'dev' %} -# create artifacts task_output directory -factory.addStep(MasterShellCommand(command=['mkdir', '-p', '{{ public_artifacts_dir }}/%(prop:uuid)s/task_output'])) - # copy artifacts to master factory.addStep(DirectoryUpload(slavesrc=Interpolate('/var/lib/taskotron/artifacts/%(prop:uuid)s/'), - masterdest=Interpolate('{{ public_artifacts_dir }}/%(prop:uuid)s/task_output'))) + masterdest=Interpolate('{{ public_artifacts_dir }}/%(prop:uuid)s/task_output'), + mode=0775)) # copy taskotron log to master 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=0755)) {% else %} # capture the taskotron log factory.addStep(ShellCommand(command=["cat", "/var/log/taskotron/taskotron.log"], name="cat_log",