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

Updates to CI to clarify HOMEgfs #1931

Merged
merged 9 commits into from
Oct 17, 2023
Merged
Show file tree
Hide file tree
Changes from 7 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
4 changes: 2 additions & 2 deletions ci/cases/pr/C48_ATM.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
experiment:
type: gfs
system: gfs
mode: forecast-only

arguments:
Expand All @@ -10,4 +10,4 @@ arguments:
expdir: ${RUNTESTS}/EXPDIR
idate: 2021032312
edate: 2021032312
yaml: ${HOMEgfs_PR}/ci/platforms/gfs_defaults_ci-updates.yaml
yaml: ${HOMEgfs}/ci/platforms/gfs_defaults_ci.yaml
4 changes: 2 additions & 2 deletions ci/cases/pr/C48_S2SA_gefs.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
experiment:
type: gefs
system: gefs
mode: forecast-only

arguments:
Expand All @@ -14,4 +14,4 @@ arguments:
icsdir: ${ICSDIR_ROOT}/C48C48mx500
idate: 2021032312
edate: 2021032312
yaml: ${HOMEgfs_PR}/ci/platforms/gefs_ci_defaults.yaml
yaml: ${HOMEgfs}/ci/platforms/gefs_ci_defaults.yaml
4 changes: 2 additions & 2 deletions ci/cases/pr/C48_S2SW.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
experiment:
type: gfs
system: gfs
mode: forecast-only

arguments:
Expand All @@ -10,4 +10,4 @@ arguments:
expdir: ${RUNTESTS}/EXPDIR
idate: 2021032312
edate: 2021032312
yaml: ${HOMEgfs_PR}/ci/platforms/gfs_defaults_ci-updates.yaml
yaml: ${HOMEgfs}/ci/platforms/gfs_defaults_ci.yaml
4 changes: 2 additions & 2 deletions ci/cases/pr/C96C48_hybatmDA.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
experiment:
type: gfs
system: gfs
mode: cycled

arguments:
Expand All @@ -15,4 +15,4 @@ arguments:
nens: 2
gfs_cyc: 1
start: cold
yaml: ${HOMEgfs_PR}/ci/platforms/gfs_defaults_ci-updates.yaml
yaml: ${HOMEgfs}/ci/platforms/gfs_defaults_ci.yaml
4 changes: 2 additions & 2 deletions ci/cases/pr/C96_atm3DVar.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
experiment:
type: gfs
system: gfs
mode: cycled

arguments:
Expand All @@ -14,4 +14,4 @@ arguments:
nens: 0
gfs_cyc: 1
start: cold
yaml: ${HOMEgfs_PR}/ci/platforms/gfs_defaults_ci-updates.yaml
yaml: ${HOMEgfs}/ci/platforms/gfs_defaults_ci.yaml
4 changes: 2 additions & 2 deletions ci/cases/weekly/C384C192_hybatmda.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
experiment:
type: gfs
system: gfs
mode: cycled

arguments:
Expand All @@ -15,4 +15,4 @@ arguments:
nens: 2
gfs_cyc: 1
start: cold
yaml: ${HOMEgfs_PR}/ci/platforms/gfs_defaults_ci-updates.yaml
yaml: ${HOMEgfs}/ci/platforms/gfs_defaults_ci.yaml
4 changes: 2 additions & 2 deletions ci/cases/weekly/C384_S2SWA.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
experiment:
type: gfs
system: gfs
mode: forecast-only

arguments:
Expand All @@ -10,4 +10,4 @@ arguments:
expdir: ${RUNTESTS}/EXPDIR
idate: 2016070100
edate: 2016070100
yaml: ${HOMEgfs_PR}/ci/platforms/gfs_defaults_ci-updates.yaml
yaml: ${HOMEgfs}/ci/platforms/gfs_defaults_ci.yaml
4 changes: 2 additions & 2 deletions ci/cases/weekly/C384_atm3DVar.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
experiment:
type: gfs
system: gfs
mode: cycled

arguments:
Expand All @@ -15,4 +15,4 @@ arguments:
nens: 0
gfs_cyc: 1
start: cold
yaml: ${HOMEgfs_PR}/ci/platforms/gfs_defaults_ci-updates.yaml
yaml: ${HOMEgfs}/ci/platforms/gfs_defaults_ci.yaml
24 changes: 12 additions & 12 deletions ci/scripts/check_ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
set -eux
#####################################################################################
#
# Script description: BASH script for checking for cases in a given PR and
# Script description: BASH script for checking for cases in a given PR and
# running rocotostat on each to determine if the experiment has
# succeeded or faild. This script is intended
# to run from within a cron job in the CI Managers account
#####################################################################################

HOMEgfs="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." >/dev/null 2>&1 && pwd )"
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." >/dev/null 2>&1 && pwd )"
scriptname=$(basename "${BASH_SOURCE[0]}")
echo "Begin ${scriptname} at $(date -u)" || true
export PS4='+ $(basename ${BASH_SOURCE})[${LINENO}]'
Expand All @@ -20,20 +20,20 @@ REPO_URL="https://github.com/NOAA-EMC/global-workflow.git"
# Set up runtime environment varibles for accounts on supproted machines
#########################################################################

source "${HOMEgfs}/ush/detect_machine.sh"
source "${ROOT_DIR}/ush/detect_machine.sh"
case ${MACHINE_ID} in
hera | orion)
echo "Running Automated Testing on ${MACHINE_ID}"
source "${HOMEgfs}/ci/platforms/config.${MACHINE_ID}"
source "${ROOT_DIR}/ci/platforms/config.${MACHINE_ID}"
;;
*)
echo "Unsupported platform. Exiting with error."
exit 1
;;
esac
set +x
source "${HOMEgfs}/ush/module-setup.sh"
module use "${HOMEgfs}/modulefiles"
source "${ROOT_DIR}/ush/module-setup.sh"
module use "${ROOT_DIR}/modulefiles"
module load "module_gwsetup.${MACHINE_ID}"
module list
set -x
Expand All @@ -56,7 +56,7 @@ pr_list_dbfile="${GFS_CI_ROOT}/open_pr_list.db"

pr_list=""
if [[ -f "${pr_list_dbfile}" ]]; then
pr_list=$("${HOMEgfs}/ci/scripts/pr_list_database.py" --dbfile "${pr_list_dbfile}" --display | grep -v Failed | grep Running | awk '{print $1}') || true
pr_list=$("${ROOT_DIR}/ci/scripts/pr_list_database.py" --dbfile "${pr_list_dbfile}" --display | grep -v Failed | grep Running | awk '{print $1}') || true
fi
if [[ -z "${pr_list+x}" ]]; then
echo "no PRs open and ready to run cases on .. exiting"
Expand Down Expand Up @@ -85,7 +85,7 @@ for pr in ${pr_list}; do
"${GH}" pr edit --repo "${REPO_URL}" "${pr}" --remove-label "CI-${MACHINE_ID^}-Running" --add-label "CI-${MACHINE_ID^}-Passed"
sed -i "s/\`\`\`//2g" "${GFS_CI_ROOT}/PR/${pr}/output_${id}"
"${GH}" pr comment "${pr}" --repo "${REPO_URL}" --body-file "${GFS_CI_ROOT}/PR/${pr}/output_${id}"
"${HOMEgfs}/ci/scripts/pr_list_database.py" --remove_pr "${pr}" --dbfile "${pr_list_dbfile}"
"${ROOT_DIR}/ci/scripts/pr_list_database.py" --remove_pr "${pr}" --dbfile "${pr_list_dbfile}"
# Check to see if this PR that was opened by the weekly tests and if so close it if it passed on all platforms
weekly_labels=$(${GH} pr view "${pr}" --repo "${REPO_URL}" --json headRefName,labels,author --jq 'select(.author.login | contains("emcbot")) | select(.headRefName | contains("weekly_ci")) | .labels[].name ') || true
if [[ -n "${weekly_labels}" ]]; then
Expand All @@ -103,8 +103,8 @@ for pr in ${pr_list}; do
fi
# Completely remove the PR and its cloned repo on sucess
# of all cases on this platform
rm -Rf "${pr_dir}"
continue
rm -Rf "${pr_dir}"
continue
fi

for pslot_dir in "${pr_dir}/RUNTESTS/EXPDIR/"*; do
Expand Down Expand Up @@ -134,10 +134,10 @@ for pr in ${pr_list}; do
{
echo "Error logs:"
echo "${error_logs}"
} >> "${GFS_CI_ROOT}/PR/${pr}/output_${id}"
} >> "${GFS_CI_ROOT}/PR/${pr}/output_${id}"
sed -i "s/\`\`\`//2g" "${GFS_CI_ROOT}/PR/${pr}/output_${id}"
"${GH}" pr comment "${pr}" --repo "${REPO_URL}" --body-file "${GFS_CI_ROOT}/PR/${pr}/output_${id}"
"${HOMEgfs}/ci/scripts/pr_list_database.py" --remove_pr "${pr}" --dbfile "${pr_list_dbfile}"
"${ROOT_DIR}/ci/scripts/pr_list_database.py" --remove_pr "${pr}" --dbfile "${pr_list_dbfile}"
for kill_cases in "${pr_dir}/RUNTESTS/"*; do
pslot=$(basename "${kill_cases}")
sacct --format=jobid,jobname%35,WorkDir%100,stat | grep "${pslot}" | grep "PR\/${pr}\/RUNTESTS" | awk '{print $1}' | xargs scancel || true
Expand Down
4 changes: 2 additions & 2 deletions ci/scripts/clone-build_ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ usage() {
echo
echo "Usage: $0 -p <PR#> -d <directory> -o <output> -h"
echo
echo " -p PR nunber to clone and build"
echo " -d Full path of <directory> of were to clone and build PR"
echo " -p PR number to clone and build"
echo " -d Full path of <directory> of where to clone and build PR"
echo " -o Full path to output message file detailing results of CI tests"
echo " -h display this message and quit"
echo
Expand Down
Loading