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

Jenkins RT Pipeline #780

Merged
merged 33 commits into from
Oct 26, 2023
Merged
Show file tree
Hide file tree
Changes from 29 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
774e107
change to epic hpc-stack
FernandoAndrade-NOAA Mar 31, 2023
1a613ba
Merge branch 'NOAA-EMC:develop' into develop
FernandoAndrade-NOAA Apr 5, 2023
924b5b9
Merge branch 'NOAA-EMC:develop' into develop
FernandoAndrade-NOAA Apr 7, 2023
487875e
Merge branch 'NOAA-EMC:develop' into develop
FernandoAndrade-NOAA Apr 18, 2023
da9f273
Merge branch 'NOAA-EMC:develop' into develop
FernandoAndrade-NOAA Apr 30, 2023
b30d702
Merge branch 'NOAA-EMC:develop' into develop
FernandoAndrade-NOAA May 4, 2023
33c66ce
Merge branch 'NOAA-EMC:develop' into develop
FernandoAndrade-NOAA Jul 13, 2023
f614802
Merge branch 'NOAA-EMC:develop' into develop
FernandoAndrade-NOAA Jul 20, 2023
f854902
Merge branch 'NOAA-EMC:develop' into develop
FernandoAndrade-NOAA Aug 28, 2023
e7c30e9
Merge branch 'NOAA-EMC:develop' into develop
FernandoAndrade-NOAA Aug 31, 2023
edda240
add jenkinsfile and rt-status scripts
FernandoAndrade-NOAA Aug 31, 2023
a6234c5
Update Jenkinsfile paths
FernandoAndrade-NOAA Sep 1, 2023
df47680
Update rt-status.py fix changed results and paths
FernandoAndrade-NOAA Sep 1, 2023
dc023eb
revert node_path cd
FernandoAndrade-NOAA Sep 1, 2023
9753c37
add rt.sh and update paths
Sep 8, 2023
f6f1ca7
re-enable tests
FernandoAndrade-NOAA Sep 8, 2023
5cb5b85
update rundir paths
FernandoAndrade-NOAA Sep 8, 2023
3d5d1be
log and path cleanup
FernandoAndrade-NOAA Sep 11, 2023
6794ef6
update paths and .py inside rt.sh
FernandoAndrade-NOAA Sep 12, 2023
0593fe2
remove rundir print
FernandoAndrade-NOAA Sep 12, 2023
ef2924d
rt.sh save temp log file
FernandoAndrade-NOAA Sep 12, 2023
a5118b1
update log file names
FernandoAndrade-NOAA Sep 12, 2023
6d41c41
log refactor
FernandoAndrade-NOAA Sep 13, 2023
e6430af
Merge branch 'NOAA-EMC:develop' into jenkins-ci
FernandoAndrade-NOAA Oct 10, 2023
1e4b28b
Update rt.sh move rt log to /tests
FernandoAndrade-NOAA Oct 10, 2023
5ac9f7d
add hera 780 rt log
FernandoAndrade-NOAA Oct 13, 2023
2539478
Merge branch 'NOAA-EMC:develop' into jenkins-ci
FernandoAndrade-NOAA Oct 19, 2023
4f0aa56
orion RT log
FernandoAndrade-NOAA Oct 23, 2023
0bf0bbf
Update rt-status.py
FernandoAndrade-NOAA Oct 23, 2023
2e6b938
Merge branch 'NOAA-EMC:develop' into jenkins-ci
FernandoAndrade-NOAA Oct 26, 2023
730c892
remove WCOSS_D check and update rundir
FernandoAndrade-NOAA Oct 26, 2023
678c94b
add WCOSS2 to rt.sh
FernandoAndrade-NOAA Oct 26, 2023
da7b32f
remove WCOSS2
FernandoAndrade-NOAA Oct 26, 2023
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
120 changes: 120 additions & 0 deletions ci/Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
pipeline {
agent none
stages {
stage('UPP Regression Tests') {
agent {
label 'built-in'
}
steps {
script {
for (label in pullRequest.labels) {
if ((label.matches("orion"))) {
env.CHOICE_NODE='orion'
}
else if ((label.matches("hera"))) {
env.CHOICE_NODE='hera'
}
else if ((label.matches("hercules"))) {
env.CHOICE_NODE='hercules'
}
else if ((label.matches("jet"))) {
env.CHOICE_NODE='jet'
}
else {
env.CHOICE_NODE='none'
}
}
// Why do I need another if..block, because it just works this way.

if (CHOICE_NODE == 'orion') {
echo "Starting up orion ${CHOICE_NODE}...this might take 5-10 minutes...please be patient."
}
else if (CHOICE_NODE == 'jet') {
echo "Starting up jet ${CHOICE_NODE}...this might take 5-10 minutes...please be patient."
}
else if (CHOICE_NODE == 'hercules') {
echo "Starting up hera ${CHOICE_NODE}...this might take 5-10 minutes...please be patient."
}
else if (CHOICE_NODE == 'hera') {
echo "Starting up hera ${CHOICE_NODE}...this might take 5-10 minutes...please be patient."
}
else {
echo "${CHOICE_NODE} is NOT a platform, moving on..."
}
}
}
}
stage('Run UPP RTs on Hera') {
agent {
label "hera"
}
environment {
ACCNR = 'epic'
NODE_PATH = '/scratch2/NAGAPE/epic/UPP/jenkins-ci'
}
steps {

cleanWs()
checkout scm
sh '''
echo $(pwd)
cd ci/
./rt.sh -a ${ACCNR} -r `pwd`/rundir -t `pwd`/../
'''
}
}
stage('Run UPP RTs on Orion') {
agent {
label "orion"
}
environment {
ACCNR = 'epic'
NODE_PATH = '/work/noaa/epic/UPP/jenkins-ci/orion'
}
steps {

cleanWs()
checkout scm
sh '''
echo $(pwd)
cd ci/
./rt.sh -a ${ACCNR} -r `pwd`/rundir -t `pwd`/../
'''
}
}
stage('Run UPP RTs on Hercules') {
agent {
label "hercules"
}
environment {
ACCNR = 'epic'
NODE_PATH = '/work/noaa/epic/UPP/jenkins-ci/hercules'
}
steps {

cleanWs()
checkout scm
sh '''

'''
}
}
stage('Run UPP RTs on Jet') {
agent {
label "jet"
}
environment {
ACCNR = 'hfv3gfs'
NODE_PATH = '/mnt/lfs4/HFIP/hfv3gfs/role.epic/'
}
steps {

cleanWs()
checkout scm
sh '''

'''
}
}
}
}
59 changes: 59 additions & 0 deletions ci/rt-status.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# check the UPP RT rundir for .diff files that would indicate a change in test results

'''
Updates
Aug/29/2023 - Fernando Andrade-Maldonado: Script creation

'''

import os
import sys

# files used in result comparison
tests = [
'nmmb',
'gfs',
'fv3gefs',
'fv3r',
'rap',
'hrrr',
'fv3hafs',
'rtma'
]

# look for .diff files
# every case has its own directory in rundir
# loop through every test case sub directory and files, then match with the test name
def check_for_diff(tests):
changed = False
rundir = os.getenv('rundir')
for case_dir in os.listdir(rundir):
for file in os.listdir(rundir+'/{}'.format(case_dir)):
if file.endswith('.diff'):
diff_case = ''
for test in tests:
if test in case_dir:
diff_case = test
if case_dir.endswith('pe_test'):
# the rap pe test currently has a false positive bug with WRFPRS
if 'rap' in case_dir and file == 'WRFPRS.GrbF16.diff':
with open('{}/{}/{}'.format(rundir,case_dir, file)) as f:
data = f.readlines()
if len(data) == 1 and 'CDCON:convective cloud layer:rpn_corr=-nan:rpn_rms=undefined' in data[0]:
continue
print('There are changes in results for case {}_pe_test in {}'.format(diff_case, file.replace(".diff", "")))
else:
print('There are changes in results for case {} in {}'.format(diff_case, file.replace(".diff", "")))
changed = True
if changed:
print('Refer to .diff files in rundir: {} for details on differences in results for each case.'.format(rundir))
sys.exit(1)
else:
print('No changes in test results detected.')


def main():
check_for_diff(tests)

if __name__ == "__main__":
main()
Loading
Loading