Skip to content

Commit

Permalink
Incorporate Russ' suggestions for stable_driver.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidNew-NOAA committed Dec 9, 2024
1 parent 33539c7 commit b208ad2
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions ci/stable_driver.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ repo_url="https://github.com/NOAA-EMC/GDASApp.git"
workflow_url="https://github.com/NOAA-EMC/global-workflow.git"
stableroot=$GDAS_CI_ROOT/stable

[[ -d $stableroot/$datestr ]] && rm -rf $stableroot/$datestr
mkdir -p $stableroot/$datestr
cd $stableroot/$datestr

Expand All @@ -63,11 +64,12 @@ git clone --recursive $workflow_url
cd $stableroot/$datestr/global-workflow/sorc/gdas.cd
git checkout develop
git pull
git submodule update --init --recursive

# ==============================================================================
# update the hashes to the most recent
gdasdir=$stableroot/$datestr/global-workflow/sorc/gdas.cd
$my_dir/../ush/submodules/update_develop.sh $gdasdir
$gdasdir/ush/submodules/update_develop.sh $gdasdir

# ==============================================================================
# run the automated testing
Expand Down Expand Up @@ -115,19 +117,26 @@ if [ $ci_status -eq 0 ]; then
if [ $total -ne 0 ]; then
echo "Unable to push" >> $stableroot/$datestr/output
fi
# send email
PEOPLE="[email protected] [email protected] [email protected] [email protected]"
BODY=$stableroot/$datestr/output_stable_nightly
if [ $total -ne 0 ]; then
echo "Issue merging with develop. please manually fix"
PEOPLE="[email protected] [email protected] [email protected]"
SUBJECT="Problem updating feature/stable-nightly branch of GDASApp"
BODY=$stableroot/$datestr/output_stable_nightly
cat > $BODY << EOF
Problem updating feature/stable-nightly branch of GDASApp. Please check $stableroot/$datestr/GDASApp
EOF
mail -r "Darth Vader - NOAA Affiliate <[email protected]>" -s "$SUBJECT" "$PEOPLE" < $BODY

else
echo "Stable branch updated"
SUBJECT="Success updating feature/stable-nightly branch of GDASApp"
cat > $BODY << EOF
feature/stable-nightly branch of GDASApp updated successfully. See $stableroot/$datestr/GDASApp for details.
EOF

fi
echo $SUBJECT
mail -r "Darth Vader - NOAA Affiliate <[email protected]>" -s "$SUBJECT" "$PEOPLE" < $BODY
else
# do nothing
echo "Testing failed, stable branch will not be updated"
Expand Down

0 comments on commit b208ad2

Please sign in to comment.