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

Fix issue with deployments push on spack packages #829

Merged
merged 1 commit into from
Jan 16, 2025
Merged
Show file tree
Hide file tree
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
8 changes: 6 additions & 2 deletions lib/ramble/ramble/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -668,8 +668,12 @@ def __init__(
self.action_string = "Pushing deployment of"
self.require_inventory = True
self.create_tar = create_tar
expanded_url = workspace_expander.expand_var(upload_url)
self.upload_url = ramble.util.path.normalize_path_or_url(expanded_url)

if upload_url:
expanded_url = workspace_expander.expand_var(upload_url)
self.upload_url = ramble.util.path.normalize_path_or_url(expanded_url)
else:
self.upload_url = None

if deployment_name:
expanded_name = workspace_expander.expand_var(deployment_name)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -408,13 +408,12 @@ def _clean_hash_variables(self, workspace, variables):
super()._clean_hash_variables(workspace, variables)

register_phase(
"deploy_artifacts",
"deploy_spack_artifacts",
pipeline="pushdeployment",
run_after=["software_create_env"],
run_after=["software_create_env", "deploy_artifacts"],
)

def _deploy_artifacts(self, workspace, app_inst=None):
super()._deploy_artifacts(workspace, app_inst=app_inst)
def _deploy_spack_artifacts(self, workspace, app_inst=None):
env_path = self.app_inst.expander.env_path

try:
Expand Down Expand Up @@ -1269,7 +1268,9 @@ def package_definitions(self):
for pkg in self.env_contents:
args = location_args.copy()
args.append(pkg)
path = self.execute(self.spack, args, return_output=True)

path = self.execute(self.spack, args, return_output=True).rstrip()

if path is not None:
yield pkg, os.path.join(path, package_def_name)

Expand Down
Loading