Skip to content
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
8e222c1
moving role of BASH ROOT away from man ROOT dir in platformws
Feb 21, 2025
504f7d5
Added GFS_BASH_CI_ROOT into bash scripts since GFS_CI_ROOT has a high…
Feb 21, 2025
b1cbb5b
addeding documentation to custome_workspace in the config file for hera
Feb 22, 2025
5bca717
Merge branch 'NOAA-EMC:develop' into ci_jenkins_role_hera2
TerrenceMcGuinness-NOAA Mar 4, 2025
a7e040c
updated path to where CI tests run from Jenkins when using role accou…
Feb 22, 2025
d617046
updated jenkins launch script to print approprate error message when …
Mar 4, 2025
2e46425
Update config.hera to use fv3-cpu instead of nems
TerrenceMcGuinness-NOAA Mar 5, 2025
c1f850b
Update ci/platforms/config.hera
TerrenceMcGuinness-NOAA Mar 5, 2025
c9b559a
Update ci/platforms/config.orion
TerrenceMcGuinness-NOAA Mar 5, 2025
6853337
Merge branch 'NOAA-EMC:develop' into ci_jenkins_role_hera
TerrenceMcGuinness-NOAA Mar 5, 2025
4219db6
added wrapper on build_compute.sh in Jenkins to pickup HPC_ACCOUNT an…
TerrenceMcGuinness-NOAA Mar 5, 2025
c8ca9a1
replaced build_compute.sh with wrapper
TerrenceMcGuinness-NOAA Mar 5, 2025
5cbb764
updated name of GFS_BASH_CI on Gaea C6 for consistancy
TerrenceMcGuinness-NOAA Mar 5, 2025
e912916
shellnorms quoting on build_compute wrapper
TerrenceMcGuinness-NOAA Mar 5, 2025
88331a7
updated to correct path to the build_compute.sh scripts in the ci uti…
TerrenceMcGuinness-NOAA Mar 5, 2025
0a9578d
Update ci/platforms/config.hera
DavidHuber-NOAA Mar 6, 2025
4ac3798
Merge branch 'NOAA-EMC:develop' into ci_jenkins_role_hera
TerrenceMcGuinness-NOAA Mar 6, 2025
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/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ def CI_CASES = ''
def GH = 'none'
// Location of the custom workspaces for each machine in the CI system. They are persistent for each iteration of the PR.
def NodeName = [hera: 'Hera-EMC', orion: 'Orion-EMC', hercules: 'Hercules-EMC', gaea: 'Gaea', gaeac6: 'Gaeac6-EMC']
def custom_workspace = [hera: '/scratch1/NCEPDEV/global/CI', orion: '/work2/noaa/stmp/CI/ORION', hercules: '/work2/noaa/global/CI/HERCULES', gaea: '/gpfs/f5/epic/proj-shared/global/CI', gaeac6: '/gpfs/f6/drsa-precip3/proj-shared/global/CI']
def custom_workspace = [hera: '/scratch1/NCEPDEV/global/glopara/CI', orion: '/work2/noaa/stmp/CI/ORION', hercules: '/work2/noaa/global/CI/HERCULES', gaea: '/gpfs/f5/epic/proj-shared/global/CI', gaeac6: '/gpfs/f6/drsa-precip3/proj-shared/global/CI']
def repo_url = 'git@github.com:NOAA-EMC/global-workflow.git'
def STATUS = 'Passed'

Expand Down Expand Up @@ -120,7 +120,7 @@ pipeline {
def error_logs_message = ""
dir("${HOMEgfs}/sorc") {
try {
sh(script: './build_compute.sh all') // build the global-workflow executables
sh(script: "${HOMEgfs}/ci/scripts/utils/ci_utils_wrapper.sh build_compute") // build the global-workflow executables
} catch (Exception error_build) {
echo "Failed to build global-workflow: ${error_build.getMessage()}"
if ( fileExists("logs/error.logs") ) {
Expand Down
5 changes: 3 additions & 2 deletions ci/platforms/config.gaeac5
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/bash
export GFS_CI_ROOT=/gpfs/f5/ufs-ard/world-shared/global/GFS_CI_ROOT
export ICSDIR_ROOT=/gpfs/f5/ufs-ard/world-shared/global/glopara/data/ICSDI

export GFS_CI_ROOT=/gpfs/f5/epic/proj-shared/global/GFS_CI_ROOT
export ICSDIR_ROOT=/gpfs/f5/epic/proj-shared/global/glopara/data/ICSDIR
export HPC_ACCOUNT=ufs-ard
export max_concurrent_cases=5
export max_concurrent_pr=4
2 changes: 1 addition & 1 deletion ci/platforms/config.gaeac6
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export GFS_CI_ROOT=/ncrc/proj/nggps_emc/${USER}/GFS_CI_CD
export ICSDIR_ROOT=/gpfs/f6/bil-fire8/world-shared/global/glopara/data/ICSDIR

# CI BASH test directories
export GFS_BASH_CI_ROOT=${GFS_CI_ROOT}/Bash
export GFS_BASH_CI_ROOT=${GFS_CI_ROOT}/GFS_BASH_CI

# Jenkins directories
export JENKINS_AGENT_LANUCH_DIR=${GFS_CI_ROOT}/Jenkins/agent
Expand Down
18 changes: 13 additions & 5 deletions ci/platforms/config.hera
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
#!/usr/bin/bash

export GFS_CI_ROOT=/scratch1/NCEPDEV/global/Terry.McGuinness/GFS_CI_ROOT
export GFS_CI_ROOT=/scratch1/NCEPDEV/global/glopara/GFS_CI_CD
export ICSDIR_ROOT=/scratch1/NCEPDEV/global/glopara/data/ICSDIR

# Jenkins directories
export JENKINS_AGENT_LANUCH_DIR=${GFS_CI_ROOT}/Jenkins/agent
Comment thread
TerrenceMcGuinness-NOAA marked this conversation as resolved.
export JENKINS_WORK_DIR=${GFS_CI_ROOT}/Jenkins/workspace
# JENKINS cutome_workspace directory where CI jobs are run
Comment thread
DavidHuber-NOAA marked this conversation as resolved.
Outdated
# /scratch1/NCEPDEV/global/glopara/CI

# CTest functional test directories for pre stagged input data
export STAGED_TESTS_DIR=${GFS_CI_ROOT}/STAGED_TESTS_DIR
export HPC_ACCOUNT=nems

# CI BASH test directories
export GFS_BASH_CI_ROOT=${GFS_CI_ROOT}/GFS_BASH_CI

export HPC_ACCOUNT=fv3-cpu
export max_concurrent_cases=5
export max_concurrent_pr=4

export JENKINS_AGENT_LANUCH_DIR=/scratch1/NCEPDEV/global/Terry.McGuinness/Jenkins
export JENKINS_WORK_DIR=/scratch1/NCEPDEV/global/Terry.McGuinness
14 changes: 11 additions & 3 deletions ci/platforms/config.hercules
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,17 @@

export GFS_CI_ROOT=/work2/noaa/stmp/GFS_CI_ROOT/HERCULES
export ICSDIR_ROOT=/work/noaa/global/glopara/data/ICSDIR
export HPC_ACCOUNT=fv3-cpu
export max_concurrent_cases=5
export max_concurrent_pr=4

# Jenkins directories
export JENKINS_AGENT_LANUCH_DIR=/home/role-nems/GFS_CI_ROOT_JENKINS/AGENT_mterry
export JENKINS_WORK_DIR=/home/role-nems/GFS_CI_ROOT_JENKINS

# CTest functional test directories for pre stagged input data
export STAGED_TESTS_DIR=${GFS_CI_ROOT}/STAGED_TESTS_DIR

# CI BASH test directories
export GFS_BASH_CI_ROOT=${GFS_CI_ROOT}/GFS_BASH_CI

export HPC_ACCOUNT=fv3-cpu
export max_concurrent_cases=5
export max_concurrent_pr=4
13 changes: 10 additions & 3 deletions ci/platforms/config.orion
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,17 @@

export GFS_CI_ROOT=/work2/noaa/stmp/GFS_CI_ROOT/ORION
export ICSDIR_ROOT=/work/noaa/global/glopara/data/ICSDIR

# Jenkins directories
export JENKINS_AGENT_LANUCH_DIR=/home/role-nems/GFS_CI_ROOT_JENKINS/AGENT_mterry
export JENKINS_WORK_DIR=/home/role-nems/GFS_CI_ROOT_JENKINS

# CI BASH test directories
export GFS_BASH_CI_ROOT=${GFS_CI_ROOT}/GFS_BASH_CI

# CTest functional test directories for pre stagged input data
export STAGED_TESTS_DIR=/work/noaa/stmp/GFS_CI_ROOT/ORION/STAGED_TESTS_DIR

export HPC_ACCOUNT=nems
export max_concurrent_cases=5
export max_concurrent_pr=4

export JENKINS_AGENT_LANUCH_DIR=/home/role-nems/GFS_CI_ROOT_JENKINS/AGENT_mterry
export JENKINS_WORK_DIR=/home/role-nems/GFS_CI_ROOT_JENKINS
8 changes: 4 additions & 4 deletions ci/scripts/check_ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ else
echo "rocotocheck being used from ${rocotocheck}"
fi

pr_list_dbfile="${GFS_CI_ROOT}/open_pr_list.db"
pr_list_dbfile="${GFS_BASH_CI_ROOT}/open_pr_list.db"

pr_list=""
if [[ -f "${pr_list_dbfile}" ]]; then
Expand All @@ -82,10 +82,10 @@ fi

for pr in ${pr_list}; do
id=$("${GH}" pr view "${pr}" --repo "${REPO_URL}" --json id --jq '.id')
output_ci="${GFS_CI_ROOT}/PR/${pr}/output_runtime_${id}"
output_ci_single="${GFS_CI_ROOT}/PR/${pr}/output_runtime_single.log"
output_ci="${GFS_BASH_CI_ROOT}/PR/${pr}/output_runtime_${id}"
output_ci_single="${GFS_BASH_CI_ROOT}/PR/${pr}/output_runtime_single.log"
echo "Processing Pull Request #${pr} and looking for cases"
pr_dir="${GFS_CI_ROOT}/PR/${pr}"
pr_dir="${GFS_BASH_CI_ROOT}/PR/${pr}"

# If there is no RUNTESTS dir for this PR then cases have not been made yet
if [[ ! -d "${pr_dir}/RUNTESTS" ]]; then
Expand Down
14 changes: 6 additions & 8 deletions ci/scripts/driver.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export GH
# query repo and get list of open PRs with tags {machine}-CI
############################################################

pr_list_dbfile="${GFS_CI_ROOT}/open_pr_list.db"
pr_list_dbfile="${GFS_BASH_CI_ROOT}/open_pr_list.db"

if [[ ! -f "${pr_list_dbfile}" ]]; then
"${ROOT_DIR}/ci/scripts/utils/pr_list_database.py" --create --dbfile "${pr_list_dbfile}"
Expand All @@ -76,10 +76,8 @@ fi
pr_list=$(${GH} pr list --repo "${REPO_URL}" --label "CI-${MACHINE_ID^}-Ready" --state "open" | awk '{print $1}') || true

for pr in ${pr_list}; do
pr_dir="${GFS_CI_ROOT}/PR/${pr}"
if [[ ! -d "${pr_dir}" ]]; then
mkdir -p "${pr_dir}"
fi
pr_dir="${GFS_BASH_CI_ROOT}/PR/${pr}"
[[ ! -d ${pr_dir} ]] && mkdir -p "${pr_dir}"
db_list=$("${ROOT_DIR}/ci/scripts/utils/pr_list_database.py" --add_pr "${pr}" --dbfile "${pr_list_dbfile}")
output_ci_single="${pr_dir}/output_single.log"
#############################################################
Expand Down Expand Up @@ -164,9 +162,9 @@ for pr in ${pr_list}; do
continue
fi
id=$("${GH}" pr view "${pr}" --repo "${REPO_URL}" --json id --jq '.id')
pr_dir="${GFS_CI_ROOT}/PR/${pr}"
pr_dir="${GFS_BASH_CI_ROOT}/PR/${pr}"
output_ci="${pr_dir}/output_ci_${id}"
output_ci_single="${GFS_CI_ROOT}/PR/${pr}/output_single.log"
output_ci_single="${GFS_BASH_CI_ROOT}/PR/${pr}/output_single.log"
driver_build_PID=$$
driver_build_HOST=$(hostname -s)
"${GH}" pr edit --repo "${REPO_URL}" "${pr}" --remove-label "CI-${MACHINE_ID^}-Ready" --add-label "CI-${MACHINE_ID^}-Building"
Expand Down Expand Up @@ -284,4 +282,4 @@ done # looping over each open and labeled PR
# scrub working directory for older files
##########################################
#
#find "${GFS_CI_ROOT}/PR/*" -maxdepth 1 -mtime +3 -exec rm -rf {} \;
#find "${GFS_BASH_CI_ROOT}/PR/*" -maxdepth 1 -mtime +3 -exec rm -rf {} \;
4 changes: 2 additions & 2 deletions ci/scripts/driver_weekly.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ set -x
# Create a new branch from develop and move yaml files
#########################################################
branch="weekly_ci_$(date +%Y%m%d)"
develop_dir="${GFS_CI_ROOT}/develop_weekly"
develop_dir="${GFS_BASH_CI_ROOT}/develop_weekly"
echo "Creating new branch ${branch} from develop on ${MACHINE_ID} in ${develop_dir}"
rm -Rf "${develop_dir}"
mkdir -p "${develop_dir}"
Expand Down Expand Up @@ -114,5 +114,5 @@ for label in "${PULL_REQUEST_LABELS[@]}"
do
"${GH}" pr edit --add-label "${label}"
done
cd "${GFS_CI_ROOT}"
cd "${GFS_BASH_CI_ROOT}"
rm -Rf "${develop_dir}"
4 changes: 2 additions & 2 deletions ci/scripts/run_ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ else
echo "rocotorun being used from ${rocotorun}"
fi

pr_list_dbfile="${GFS_CI_ROOT}/open_pr_list.db"
pr_list_dbfile="${GFS_BASH_CI_ROOT}/open_pr_list.db"

pr_list=""
if [[ -f "${pr_list_dbfile}" ]]; then
Expand All @@ -64,7 +64,7 @@ fi

for pr in ${pr_list}; do
echo "Processing Pull Request #${pr} and looking for cases"
pr_dir="${GFS_CI_ROOT}/PR/${pr}"
pr_dir="${GFS_BASH_CI_ROOT}/PR/${pr}"
# If the directory RUNTESTS is not present then
# setupexpt.py has no been run yet for this PR
if [[ ! -d "${pr_dir}/RUNTESTS" ]]; then
Expand Down
7 changes: 7 additions & 0 deletions ci/scripts/utils/ci_utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -177,3 +177,10 @@ function cleanup_experiment() {
rm -Rf "${EXPDIR}/${pslot:?}"
rm -Rf "${STMP}/RUNDIRS/${pslot:?}"
}

function build_compute () {

source "${HOMEgfs}/ci/platforms/config.${MACHINE_ID}"
"${HOMEgfs}/sorc/build_compute.sh" -A "${HPC_ACCOUNT}" -v all

}
15 changes: 11 additions & 4 deletions ci/scripts/utils/launch_java_agent.sh
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ fi
${GH} --version
export GH

check_mark=$("${GH}" auth status -t 2>&1 | grep "Token:" | awk '{print $1}') || true
if [[ "${check_mark}" != "✓" ]]; then
check_token=$("${GH}" auth status 2>&1 | grep "Token:") || true
if [[ "${check_token}" != *"*****"* ]]; then
echo "gh not authenticating with emcbot token"
exit 1
fi
Expand All @@ -124,6 +124,7 @@ else
exit 1
fi
cd "${JENKINS_AGENT_LANUCH_DIR}"
echo "Entered directory ${PWD}"

if ! [[ -f agent.jar ]]; then
curl -sO "${controller_url}/jnlpJars/agent.jar"
Expand All @@ -134,6 +135,7 @@ if [[ ! -f "${controller_user_auth_token}" ]]; then
echo "User Jenkins authetication TOKEN to the controller for using the Remote API does not exist"
exit 1
fi

JENKINS_TOKEN=$(cat "${controller_user_auth_token}")

cat << EOF > parse.py
Expand All @@ -152,8 +154,12 @@ check_node_online() {
echo "ERROR: Jenkins controller not reachable. Exiting with error."
exit 1
fi
if [[ "${curl_response}" == *"Token expired"* ]]; then
echo "ERROR: Jenkins Token expired"
exit 1
fi
echo -n "${curl_response}" > curl_response
./parse.py curl_response
ONLINE_STATUS=$(./parse.py curl_response)
}

lauch_agent () {
Expand All @@ -170,7 +176,8 @@ if [[ "${force_launch}" == "True" ]]; then
exit
fi

offline=$(set -e; check_node_online)
check_node_online
offline="${ONLINE_STATUS}"

if [[ "${offline}" != "False" ]]; then
if [[ "${skip_wait}" != "True" ]]; then
Expand Down