Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

track archive upload url on filesystem #654

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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