From 4a829b5b0fb63e1bdeee6b42104273d1e93bc29c Mon Sep 17 00:00:00 2001 From: EndrII Date: Sat, 22 Oct 2022 15:10:39 +0300 Subject: [PATCH] fix copy artefacts --- BuildBotLib/make.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/BuildBotLib/make.py b/BuildBotLib/make.py index 9be5dec..d5855f4 100644 --- a/BuildBotLib/make.py +++ b/BuildBotLib/make.py @@ -100,6 +100,13 @@ class Make(BaseModule): def destDir(self, props): return '/var/www/builds/' + self.destDirPrivate(props) + def destDirCustoArtefactFile(self, props): + + if self.isCopyArtefact(props): + return self.destDir(props) + "/" + os.path.basename(props.getProperty('copyCustomArtifact')) + + return "" + def tempDir(self, props): self.tempRepoDir = self.home + '/rTemp/' + self.tempDirPrivate(props) return self.tempRepoDir @@ -348,9 +355,7 @@ class Make(BaseModule): factory.addStep( steps.FileUpload( workersrc=util.Interpolate('%(prop:copyCustomArtifact)s'), - masterdest=self.getWraper(lambda step: - self.destDir(step) + "/" + os.path.basename(step.getProperty('copyCustomArtifact')) - ), + masterdest=self.getWraper(self.destDirCustoArtefactFile), url=self.getWraper(self.destDirUrl), doStepIf=self.getWraper(self.isCopyArtefact), name='copy custom artifact file',