diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d20a0d28baf..d79f74c94c9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -147,6 +147,18 @@ include: echo "Setting up build environment for ${machine^}..." echo "Using build directory ${GW_HOMEgfs}" + + # TEMPORARY: Use custom Rocoto build with dryrun feature for testing + # TODO: Remove this when upstream Rocoto PR is merged + # Load platform-specific configuration first + source "${HOMEgfs}/dev/ci/platforms/config.${MACHINE_ID}" + if [[ -n "${ROCOTO_TEST_PATH:-}" && -d "${ROCOTO_TEST_PATH}" ]]; then + export PATH="${ROCOTO_TEST_PATH}:$PATH" + echo "Using custom Rocoto build at: $(which rocotorun 2>/dev/null || echo 'NOT FOUND')" + else + echo "ROCOTO_TEST_PATH not set or directory not found, using system Rocoto" + fi + git submodule status # When GFS_CI_RUN_TYPE is set to "nightly", we use the develop branch # It should be set when configuring the scheculed nightly pipeline diff --git a/dev/ci/gitlab-ci-cases.yml b/dev/ci/gitlab-ci-cases.yml index d4018eb59f9..49c32dafbc6 100644 --- a/dev/ci/gitlab-ci-cases.yml +++ b/dev/ci/gitlab-ci-cases.yml @@ -30,6 +30,18 @@ script: - | echo "Using build directory ${GW_HOMEgfs} (dated ${DATE})" + + # TEMPORARY: Use custom Rocoto build with dryrun feature for testing + # TODO: Remove this when upstream Rocoto PR is merged + # Load platform-specific configuration first + source "${GW_HOMEgfs}/dev/ci/platforms/config.${machine}" + if [[ -n "${ROCOTO_TEST_PATH:-}" && -d "${ROCOTO_TEST_PATH}" ]]; then + export PATH="${ROCOTO_TEST_PATH}:$PATH" + echo "Using custom Rocoto build at: $(which rocotorun 2>/dev/null || echo 'NOT FOUND')" + else + echo "ROCOTO_TEST_PATH not set or directory not found, using system Rocoto" + fi + pslot=$("${GW_HOMEgfs}/dev/ci/scripts/utils/ci_utils.sh" get_pslot "${RUNTESTS_DIR}" "${caseName}") "${GW_HOMEgfs}/dev/ci/scripts/run_check_gitlab_ci.sh" "${GW_RUN_PATH}" "${pslot}" global-workflow exit $? diff --git a/dev/ci/gitlab-ci-ctests.yml b/dev/ci/gitlab-ci-ctests.yml index 6f08629fa19..622432987c7 100644 --- a/dev/ci/gitlab-ci-ctests.yml +++ b/dev/ci/gitlab-ci-ctests.yml @@ -30,6 +30,18 @@ stage: setup_tests script: | echo "Setting up for ctests pipeline building in ${GW_HOMEgfs} on ${machine}" + + # TEMPORARY: Use custom Rocoto build with dryrun feature for testing + # TODO: Remove this when upstream Rocoto PR is merged + # Load platform-specific configuration first + source "${GW_HOMEgfs}/dev/ci/platforms/config.${machine}" + if [[ -n "${ROCOTO_TEST_PATH:-}" && -d "${ROCOTO_TEST_PATH}" ]]; then + export PATH="${ROCOTO_TEST_PATH}:$PATH" + echo "Using custom Rocoto build at: $(which rocotorun 2>/dev/null || echo 'NOT FOUND')" + else + echo "ROCOTO_TEST_PATH not set or directory not found, using system Rocoto" + fi + source "${GW_HOMEgfs}/dev/ush/gw_setup.sh" source "${GW_HOMEgfs}/dev/ci/platforms/config.${machine}" cd "${GW_HOMEgfs}/dev/ctests" || exit 1 @@ -52,7 +64,17 @@ stage: run_tests script: | echo "Using build directory ${GW_HOMEgfs} for running CTests" + source "${GW_HOMEgfs}/dev/ush/gw_setup.sh" + # Platform config loaded by gw_setup.sh, now check for custom Rocoto + # TEMPORARY: Use custom Rocoto build with dryrun feature for testing + # TODO: Remove this when upstream Rocoto PR is merged + if [[ -n "${ROCOTO_TEST_PATH:-}" && -d "${ROCOTO_TEST_PATH}" ]]; then + export PATH="${ROCOTO_TEST_PATH}:$PATH" + echo "Using custom Rocoto build at: $(which rocotorun 2>/dev/null || echo 'NOT FOUND')" + else + echo "ROCOTO_TEST_PATH not set or directory not found, using system Rocoto" + fi cd "${GW_HOMEgfs}/dev/ctests/build" || exit 1 echo "Running CTests with label: ${CTEST_NAME} in ${PWD}" num=$(ctest -N | grep "Total Tests" | awk "{print \$3}") diff --git a/dev/ci/platforms/config.gaeac6 b/dev/ci/platforms/config.gaeac6 index 5bd18751e59..d21974e79ec 100644 --- a/dev/ci/platforms/config.gaeac6 +++ b/dev/ci/platforms/config.gaeac6 @@ -61,3 +61,16 @@ export max_concurrent_pr=4 # number of concurrent pull requests # HPC account information - For job submission export HPC_ACCOUNT=${HPC_ACCOUNT:-drsa-precip3} + +######################################################################### +# System-specific settings +# Platform-specific paths and utilities for CI/CD operations +######################################################################### + +# Utilities path for custom builds and role account tools +export UTIL_PATH="${GFS_CI_ROOT}/utils" + +# Custom Rocoto build path for testing (temporary) +# TODO: Remove when upstream Rocoto PR is merged +# and Rocoto with dry_run support is available in Gaea C6 modules +export ROCOTO_TEST_PATH="${UTIL_PATH}/rocoto_forked/bin" diff --git a/dev/ci/platforms/config.hera b/dev/ci/platforms/config.hera index b498b5c011f..52a40efaf7d 100644 --- a/dev/ci/platforms/config.hera +++ b/dev/ci/platforms/config.hera @@ -67,3 +67,16 @@ export max_concurrent_pr=4 # HPC account which overides the default account export HPC_ACCOUNT=${HPC_ACCOUNT:-fv3-cpu} + +######################################################################### +# System-specific settings +# Platform-specific paths and utilities for CI/CD operations +######################################################################### + +# Utilities path for custom builds and role account tools +# TODO: Populate with actual role account path for this machine +export UTIL_PATH="/path/to/role/account/utils" + +# Custom Rocoto build path for testing (temporary) +# TODO: Remove when upstream Rocoto PR is merged +export ROCOTO_TEST_PATH="${UTIL_PATH}/Rocoto/bin" diff --git a/dev/ci/platforms/config.hercules b/dev/ci/platforms/config.hercules index 59d5dbdabee..39e1e6e9b3c 100644 --- a/dev/ci/platforms/config.hercules +++ b/dev/ci/platforms/config.hercules @@ -49,4 +49,17 @@ export GITLAB_BUILDS_DIR=${GFS_CI_ROOT}/BUILDS/GITLAB export GITLAB_RUNNER_DIR="${GFS_CI_ROOT}/GitLab/Runner" # HPC account which overides the default account -export HPC_ACCOUNT=${HPC_ACCOUNT:-fv3-cpu} +export HPC_ACCOUNT=${HPC_ACCOUNT:-epic-ps} + +######################################################################### +# System-specific settings +# Platform-specific paths and utilities for CI/CD operations +######################################################################### + +# Utilities path for custom builds and role account tools +# TODO: Populate with actual role account path for this machine +export UTIL_PATH="/path/to/role/account/utils" + +# Custom Rocoto build path for testing (temporary) +# TODO: Remove when upstream Rocoto PR is merged +export ROCOTO_TEST_PATH="${UTIL_PATH}/Rocoto/bin" diff --git a/dev/ci/platforms/config.orion b/dev/ci/platforms/config.orion index 2f7fc614831..c29f761eeac 100644 --- a/dev/ci/platforms/config.orion +++ b/dev/ci/platforms/config.orion @@ -50,3 +50,16 @@ export GITLAB_RUNNER_DIR="${GFS_CI_ROOT}/GitLab/Runner" # HPC account which overides the default account export HPC_ACCOUNT=${HPC_ACCOUNT:-fv3-cpu} + +######################################################################### +# System-specific settings +# Platform-specific paths and utilities for CI/CD operations +######################################################################### + +# Utilities path for custom builds and role account tools +# TODO: Populate with actual role account path for this machine +export UTIL_PATH="/path/to/role/account/utils" + +# Custom Rocoto build path for testing (temporary) +# TODO: Remove when upstream Rocoto PR is merged +export ROCOTO_TEST_PATH="${UTIL_PATH}/Rocoto/bin" diff --git a/dev/ci/platforms/config.ursa b/dev/ci/platforms/config.ursa index 4d396c3a65c..f67c505e5f0 100644 --- a/dev/ci/platforms/config.ursa +++ b/dev/ci/platforms/config.ursa @@ -67,3 +67,14 @@ export max_concurrent_pr=4 # HPC account which overides the default account export HPC_ACCOUNT=${HPC_ACCOUNT:-fv3-cpu} + +######################################################################### +# System-specific settings +# Platform-specific paths and utilities for CI/CD operations +######################################################################### + +# Utilities path for custom builds and role account tools +export UTIL_PATH="/scratch3/NCEPDEV/global/role.glopara/utils" + +# Custom Rocoto build path for testing (temporary) +export ROCOTO_TEST_PATH="${UTIL_PATH}/src/rocoto-1.3.7-dryrun_update/bin" diff --git a/dev/ci/platforms/config.wcoss2 b/dev/ci/platforms/config.wcoss2 index 43c804fb13c..5d91ae2db3a 100644 --- a/dev/ci/platforms/config.wcoss2 +++ b/dev/ci/platforms/config.wcoss2 @@ -2,6 +2,20 @@ export GFS_CI_ROOT=/lfs/h2/emc/global/noscrub/globalworkflow.ci/GFS_CI_ROOT export ICSDIR_ROOT=/lfs/h2/emc/global/noscrub/emc.global/data/ICSDIR +# HPC account which overides the default account export HPC_ACCOUNT=${HPC_ACCOUNT:-GFS-DEV} + +######################################################################### +# System-specific settings +# Platform-specific paths and utilities for CI/CD operations +######################################################################### + +# Utilities path for custom builds and role account tools +# TODO: Populate with actual role account path for this machine +export UTIL_PATH="/path/to/role/account/utils" + +# Custom Rocoto build path for testing (temporary) +# TODO: Remove when upstream Rocoto PR is merged +export ROCOTO_TEST_PATH="${UTIL_PATH}/Rocoto/bin" export max_concurrent_cases=5 export max_concurrent_pr=4 diff --git a/dev/ctests/scripts/execute.sh.in b/dev/ctests/scripts/execute.sh.in index abb6d172889..e17ae0e00c4 100755 --- a/dev/ctests/scripts/execute.sh.in +++ b/dev/ctests/scripts/execute.sh.in @@ -8,13 +8,26 @@ TEST_NAME=$("${HOMEgfs}/dev/ci/scripts/utils/ci_utils.sh" get_pslot "@CMAKE_CURR JOB=${2:?"Job name is required"} idate=$3 -rocotoboot_dryrun=$(command -v rocotoboot_dryrun) || true +# Use standard rocotoboot with --dryrun flag CASEDIR="@CMAKE_CURRENT_BINARY_DIR@/RUNTESTS/EXPDIR/${TEST_NAME}" cd "${CASEDIR}" rm -f ./*.db -rm -f ./jobcard +rm -f ./jobcard -yes | "${rocotoboot_dryrun}" --dryrun -d "${TEST_NAME}.db" -w "${TEST_NAME}.xml" -v 10 -c "${idate}00" -t "${JOB}" 2> jobcard || true +# TEMPORARY: Use custom Rocoto build with dryrun feature for testing +# TODO: Remove this when upstream Rocoto PR is merged +# Load platform-specific configuration first + +source "${HOMEgfs}/ush/detect_machine.sh" +source "${HOMEgfs}/dev/ci/platforms/config.${MACHINE_ID}" +if [[ -n "${ROCOTO_TEST_PATH:-}" && -d "${ROCOTO_TEST_PATH}" ]]; then + export PATH="${ROCOTO_TEST_PATH}:$PATH" + echo "Using custom Rocoto build at: $(which rocotorun 2>/dev/null || echo 'NOT FOUND')" +else + echo "ROCOTO_TEST_PATH not set or directory not found, using system Rocoto" +fi + +yes | rocotoboot --dryrun -d "${TEST_NAME}.db" -w "${TEST_NAME}.xml" -v 10 -c "${idate}00" -t "${JOB}" 2> jobcard || true # Rocoto outputs the job card inside of {{}}. Strip all other output to get just the job card. sed -n '/^{{/,/^}}/p' < jobcard | sed '1d;$d' > "${TEST_NAME}.sub" || true