Add uploading
This commit is contained in:
parent
85908702c9
commit
fa213e5733
|
@ -22,3 +22,14 @@ def is_test_script_available(props):
|
|||
@util.renderer
|
||||
def isnt_test_script_available(props):
|
||||
return not _is_test_script_available(props)
|
||||
|
||||
def _files_to_upload(props):
|
||||
return ','.join(props.getProperty(files_to_upload).split("\n"), default="")
|
||||
|
||||
@util_renderer
|
||||
def files_to_upload(props):
|
||||
return files_to_upload(props)
|
||||
|
||||
@util_renderer
|
||||
def no_files_to_upload(props):
|
||||
return not _files_to_upload(props)
|
||||
|
|
|
@ -69,3 +69,31 @@ def add_child_sh_steps(build_factory, directory=".buildbot"):
|
|||
hideStepIf=isnt_test_script_available,
|
||||
)
|
||||
)
|
||||
|
||||
build_factory.addStep(
|
||||
steps.SetPropertyFromCommand(
|
||||
name="Find files to upload",
|
||||
command="find out -maxdepth 0 -mindepth 0 "
|
||||
"-type f -printf {'%P\n'}",
|
||||
workdir="out",
|
||||
hideStepIf=True,
|
||||
property="files_to_upload"
|
||||
)
|
||||
)
|
||||
|
||||
build_factory.addStep(
|
||||
steps.ShellCommand(
|
||||
name="Upload files",
|
||||
workdir="out",
|
||||
doStepIf=files_to_upload,
|
||||
hideStepIf=no_files_to_upload,
|
||||
command=util.Interpolate(
|
||||
"curl -T {%s} "
|
||||
"https://buildbot@%{s}:artifacts.bitmessage.at/%s/%s/",
|
||||
files_to_upload,
|
||||
util.Secret('artifact_upload'),
|
||||
util.Property('jobname'),
|
||||
util.Property('buildnumber'),
|
||||
)
|
||||
)
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue
Block a user