From 15113adfdbf2500ec2d5099fc9b62b21fbfcc9b8 Mon Sep 17 00:00:00 2001 From: RussTreadon-NOAA <26926959+RussTreadon-NOAA@users.noreply.github.com> Date: Fri, 10 Jan 2025 13:53:16 -0500 Subject: [PATCH] clean up stable_driver.sh (#1434) --- ci/run_ci.sh | 12 ++++++++++++ ci/stable_driver.sh | 41 ++++++++++++++++++----------------------- 2 files changed, 30 insertions(+), 23 deletions(-) diff --git a/ci/run_ci.sh b/ci/run_ci.sh index 9e67b1e12..cc39dcc63 100755 --- a/ci/run_ci.sh +++ b/ci/run_ci.sh @@ -91,6 +91,18 @@ if [[ $TEST_WORKFLOW == 1 ]]; then fi # ============================================================================== # run ctests + +# PATCH START +# MSU role-da can not use /work/noaa/stmp at present. The logic below +# modifies the stmp path used by g-w so that role-da can run g-w based +# ctests. This logic will be removed after MSU role-da is added to the +# stmp group. +if [[ "${TARGET}" = "orion" || "${TARGET}" = "hercules" ]]; then + echo "***WARNING*** apply MSU stmp patch to $workflow_dir/workflow/hosts/${TARGET}.yaml" + sed -i "s|/noaa/stmp|/noaa/da|g" $workflow_dir/workflow/hosts/${TARGET}.yaml +fi +# PATCH END + cd $gdasapp_dir/build module use $gdasapp_dir/modulefiles module load GDAS/$TARGET diff --git a/ci/stable_driver.sh b/ci/stable_driver.sh index ca51f6f7c..7bf936325 100755 --- a/ci/stable_driver.sh +++ b/ci/stable_driver.sh @@ -73,7 +73,7 @@ $gdasdir/ush/submodules/update_develop.sh $gdasdir # ============================================================================== # email information -PEOPLE="Cory.R.Martin@noaa.gov Russ.Treadon@noaa.gov Guillaume.Vernieres@noaa.gov David.New@noaa.gov" +PEOPLE="Cory.R.Martin@noaa.gov David.New@noaa.gov Russ.Treadon@noaa.gov" BODY=$stableroot/$datestr/stable_nightly # ============================================================================== @@ -84,41 +84,36 @@ total=0 if [ $ci_status -eq 0 ]; then cd $gdasdir # checkout feature/stable-nightly - git stash - total=$(($total+$?)) - if [ $total -ne 0 ]; then - echo "Unable to git stash" >> $stableroot/$datestr/output - fi git checkout feature/stable-nightly - total=$(($total+$?)) - if [ $total -ne 0 ]; then + rc=$? + total=$(($total+$rc)) + if [ $rc -ne 0 ]; then echo "Unable to checkout feature/stable-nightly" >> $stableroot/$datestr/output fi # merge in develop git merge develop - total=$(($total+$?)) - if [ $total -ne 0 ]; then + rc=$? + total=$(($total+$rc)) + if [ $rc -ne 0 ]; then echo "Unable to merge develop" >> $stableroot/$datestr/output fi # add in submodules - git stash pop - total=$(($total+$?)) - if [ $total -ne 0 ]; then - echo "Unable to git stash pop" >> $stableroot/$datestr/output - fi - $my_dir/../ush/submodules/add_submodules.sh $gdasdir - total=$(($total+$?)) - if [ $total -ne 0 ]; then + $gdasdir/ush/submodules/add_submodules.sh $gdasdir + rc=$? + total=$(($total+$rc)) + if [ $rc -ne 0 ]; then echo "Unable to add updated submodules to commit" >> $stableroot/$datestr/output fi git diff-index --quiet HEAD || git commit -m "Update to new stable build on $datestr" - total=$(($total+$?)) - if [ $total -ne 0 ]; then + rc=$? + total=$(($total+$rc)) + if [ $rc -ne 0 ]; then echo "Unable to commit" >> $stableroot/$datestr/output fi git push --set-upstream origin feature/stable-nightly - total=$(($total+$?)) - if [ $total -ne 0 ]; then + rc=$? + total=$(($total+$rc)) + if [ $rc -ne 0 ]; then echo "Unable to push" >> $stableroot/$datestr/output fi if [ $total -ne 0 ]; then @@ -152,4 +147,4 @@ mail -r "Darth Vader - NOAA Affiliate " -s "$SUBJECT" "$PE # ============================================================================== # scrub working directory for older files -find $stableroot/* -maxdepth 1 -mtime +3 -exec rm -rf {} \; +find $stableroot/* -maxdepth 1 -mtime +1 -exec rm -rf {} \;