Skip to content

Commit

Permalink
track archive upload url on filesystem
Browse files Browse the repository at this point in the history
  • Loading branch information
rfbgo committed Sep 19, 2024
1 parent ca92d44 commit a0b664d
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion lib/ramble/ramble/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,6 @@ def _prepare(self):
" Make sure your workspace is setup with\n"
" ramble workspace setup"
)

super()._construct_hash()
super()._prepare()

Expand Down Expand Up @@ -411,11 +410,23 @@ def _complete(self):
logger.debug(f"Archive url: {archive_url}")

if archive_url:
# Perform Upload
tar_path = self.workspace.latest_archive_path + tar_extension
remote_tar_path = archive_url + "/" + self.workspace.latest_archive + tar_extension
_upload_file(tar_path, remote_tar_path)
logger.all_msg(f"Archive Uploaded to {remote_tar_path}")

# Record upload URL to the filesystem
url_extension = ".url"
tar_url_path = tar_path + url_extension
with open(tar_url_path, "w") as f:
f.write(remote_tar_path)

tar_url_path_latest = os.path.join(
self.workspace.archive_dir, "archive.latest" + url_extension
)
self.create_simlink(tar_url_path, tar_url_path_latest)


class MirrorPipeline(Pipeline):
"""Class for the mirror pipeline"""
Expand Down

0 comments on commit a0b664d

Please sign in to comment.