Skip to content

Commit

Permalink
#2786: update install cold with site specific config
Browse files Browse the repository at this point in the history
  • Loading branch information
Katherine Tomkins committed Sep 13, 2022
1 parent 27bb2cd commit dd2fe0c
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,14 +1,26 @@
#!/bin/bash
# Send the output from 'set -x' to 'stdout' rather than 'stderr'.
BASH_XTRACEFD=1
set -eux

# Remove source directory, if it exists.
if [[ -d ${SOURCE_DIR} ]]; then
rm -rf "${SOURCE_DIR}"
fi
printf 'This is running.'

# Checkout ESMValTool.
#git clone -b "${BRANCH}" "${ESMVALTOOL_URL}" "${SOURCE_DIR}"

# Install ESMValTool.
#cd "${SOURCE_DIR}"
#pip install . --prefix="${RRW_INSTALL_ROOT}"

SOURCE_PATH="${CYLC_WORKFLOW_RUN_DIR}/site/${SITE}-env"
TARGET_DIR="${CYLC_WORKFLOW_RUN_DIR}/bin"
ENV_FILE="rrw-env"

# Create the 'bin' directory in the installed workflow.
mkdir "${TARGET_DIR}"

# Copy the environment file to the 'bin' directory.
cp "${SOURCE_PATH}" "${TARGET_DIR}/${ENV_FILE}"
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ default = install_cold.sh
ESMVALTOOL_URL = [email protected]:ESMValGroup/ESMValTool.git
BRANCH = main
SOURCE_DIR = ${CYLC_SUITE_RUN_DIR}/src
SITE=${SITE}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!jinja2
[scheduler]
allow implicit tasks = True
[scheduling]
Expand All @@ -9,10 +10,13 @@
script = rose task-run
env-script = "eval $(rose task-env)"
[[[environment]]]
MODULE_NAME = {{ MODULE_NAME }}
USER_CONFIG_DIR = ${CYLC_WORKFLOW_RUN_DIR}/etc
USER_CONFIG_PATH = ${USER_CONFIG_DIR}/config-user.yml
RRW_INSTALL_ROOT = ${CYLC_WORKFLOW_RUN_DIR}

[[install_cold]]
platform = localhost
[[[environment]]]
SITE = {{ SITE }}

{% include 'site/' ~ SITE ~ '.cylc' %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[template variables]
SITE="metoffice"
MODULE_NAME=""
Empty file.

0 comments on commit dd2fe0c

Please sign in to comment.