def download(self, step, buildIdFile, tgzFile):
if not self.canDownloadJenkins():
return ""
return "\n" + textwrap.dedent("""\
if [[ ! -e {RESULT} ]] ; then
BOB_DOWNLOAD_BID="$(hexdump -ve '/1 "%02x"' {BUILDID}){GEN}"
BOB_DOWNLOAD_FILE="{DIR}/${{BOB_DOWNLOAD_BID:0:2}}/${{BOB_DOWNLOAD_BID:2:2}}/${{BOB_DOWNLOAD_BID:4}}{SUFFIX}"
cp "$BOB_DOWNLOAD_FILE" {RESULT} || echo Download failed: $?
fi
""".format(DIR=self.__basePath, BUILDID=quote(buildIdFile), RESULT=quote(tgzFile),
GEN=ARCHIVE_GENERATION, SUFFIX=ARTIFACT_SUFFIX))
评论列表
文章目录