fix copy artefacts

This commit is contained in:
Andrei Yankovich 2022-10-22 15:10:39 +03:00
parent a484bfc68e
commit 4a829b5b0f

View File

@ -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',