How can we access S3Publisher artifacts via REST or python lib like jenkinsapi?
I guess, I can do something like this but then I'll need to handle auth whereas all the other jenkinsapi calls have auth baked in already.
from jenkinsapi.build import Build
def get_build_url(self, build: Build):
"""url for build page"""
return build.get_result_url().split(str(build.get_number()))[0]
def get_s3_artifact(self, build: Build, artifact_name:str):
url = "{}/s3/download/{}".format(self.get_build_url(build))
wget.download(url)