Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try to save a stable build with symlink #1042

Draft
wants to merge 3 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions ci/rm_stable.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash

stablefile=$1
olddir=$2

stabledate=`cat $stablefile`

base=`basename $2`

if [[ $base -ne $stabledate ]]; then
rm -rf $2
fi
16 changes: 10 additions & 6 deletions ci/stable_driver.sh
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,10 @@ if [ $ci_status -eq 0 ]; then
fi
# add in submodules
git stash pop
total=$(($total+$?))
if [ $total -ne 0 ]; then
echo "Unable to git stash pop" >> $stableroot/$datestr/output
fi
#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
Expand All @@ -117,7 +117,7 @@ if [ $ci_status -eq 0 ]; then
fi
if [ $total -ne 0 ]; then
echo "Issue merging with develop. please manually fix"
PEOPLE="[email protected] [email protected] [email protected]"
PEOPLE="[email protected] [email protected] [email protected] [email protected]"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Disapprove 😂

SUBJECT="Problem updating feature/stable-nightly branch of GDASApp"
BODY=$stableroot/$datestr/output_stable_nightly
cat > $BODY << EOF
Expand All @@ -127,6 +127,10 @@ EOF
mail -r "Darth Vader - NOAA Affiliate <[email protected]>" -s "$SUBJECT" "$PEOPLE" < $BODY
else
echo "Stable branch updated"
unlink $stableroot/latest-stable
ln -sf $stableroot/$datestr $stableroot/latest-stable
rm -rf $stableroot/latest-stable-date
echo $datestr > $stableroot/latest-stable-date
fi
else
# do nothing
Expand All @@ -138,4 +142,4 @@ fi

# ==============================================================================
# scrub working directory for older files
find $stableroot/* -maxdepth 1 -mtime +3 -exec rm -rf {} \;
find $stableroot/* -maxdepth 0 -mtime +3 -exec $my_dir/rm_stable.sh $stableroot/latest-stable-date {} \;
Loading