Skip to content
Snippets Groups Projects
Commit e9bda4ea authored by Sam Kagan's avatar Sam Kagan
Browse files

Updated restore_cms' deliver.sh for new deliver CLI

parent 1a7d68c5
No related branches found
No related tags found
No related merge requests found
# Copyright (C) 2023 Associated Universities, Inc. Washington DC, USA.
#
# This file is part of NRAO Workspaces.
#
# Workspaces is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Workspaces is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Workspaces. If not, see <https://www.gnu.org/licenses/>.
#
"""update restore_cms' deliver call
Revision ID: 2b9f521c8fe2
Revises: 5a1e335e6c13
Create Date: 2024-06-27 08:39:14.566875
"""
from pathlib import Path
import sqlalchemy as sa
from alembic import op
# revision identifiers, used by Alembic.
revision = "2b9f521c8fe2"
down_revision = "5a1e335e6c13"
branch_labels = None
depends_on = None
def set_content(wf_name: str, filename: str) -> str:
return (Path.cwd() / "versions" / "templates" / wf_name / filename).read_text()
def upgrade():
op.execute(
f"""
UPDATE workflow_templates
SET content=E'{set_content("restore_cms", "deliver_sh_2.8.5.txt")}'
WHERE filename='restore_cms_deliver.sh'
"""
)
def downgrade():
op.execute(
f"""
UPDATE workflow_templates
SET content=E'{set_content("restore_cms", "lustre_only_deliver_sh_2.7.txt")}'
WHERE filename='restore_cms_deliver.sh'
"""
)
#!/bin/sh
set -o errexit
export HOME={{spool_dir}}
SBIN_PATH=/lustre/aoc/cluster/pipeline/$CAPO_PROFILE/workspaces/sbin
$SBIN_PATH/deliver --restore --prefix $1 $2
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment