Skip to content

Commit

Permalink
Merge pull request idaholab#28088 from loganharbour/27091_apptainer_t…
Browse files Browse the repository at this point in the history
…o_project_suffix

Properly use --to-project-suffix in push action
  • Loading branch information
loganharbour authored Jul 10, 2024
2 parents 059769c + adfacfa commit 7de74ce
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/apptainer_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,13 +288,13 @@ def apptainer_pull(self, project: str, name: str, tag: str, args=None):
self.run(command)
return file

def apptainer_push(self, project: str, name: str, from_tag: str, to_tag=None):
def apptainer_push(self, project: str, name: str, from_tag: str, to_tag=None, project_suffix=None):
"""
Pushes the given image via apptainer
"""
if to_tag is None:
to_tag = from_tag
oras_uri = self.oras_uri(project, name, to_tag)
oras_uri = self.oras_uri(project, name, to_tag, project_suffix=project_suffix)
file = self.container_path(name, from_tag)
self.print(f'Pushing {file}')
command = ['apptainer', 'push', file, oras_uri]
Expand Down Expand Up @@ -762,7 +762,7 @@ def _action_push(self):
else:
self.error(f'Tag {uri} already exists')

self.apptainer_push(self.project, self.name, from_tag, to_tag)
self.apptainer_push(self.project, self.name, from_tag, to_tag, project_suffix=self.args.to_project_suffix)

def _action_path(self):
"""
Expand Down

0 comments on commit 7de74ce

Please sign in to comment.