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 for cloud autort and blstores #1887

Merged
merged 48 commits into from
Sep 18, 2023
Merged
Show file tree
Hide file tree
Changes from 40 commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
44b2f3e
Update rt.sh
zach1221 Sep 7, 2023
b760c21
Create RegressionTests_noaacloud.log
zach1221 Sep 7, 2023
4428e12
Create Jenkinsfile.noaacloud
zach1221 Sep 7, 2023
199f967
Update rt.conf
zach1221 Sep 7, 2023
be719b6
Update bl.py
zach1221 Sep 7, 2023
5ba6f78
Update rt.sh
zach1221 Sep 7, 2023
a62786a
Merge branch 'develop' into CloudRT
zach1221 Sep 7, 2023
7205661
Merge branch 'develop' into CloudRT
zach1221 Sep 11, 2023
c768e4b
Update Jenkinsfile for pass/fail
zach1221 Sep 11, 2023
a257a41
Update Jenkinsfile
zach1221 Sep 11, 2023
181bed7
Update Jenkinsfile
zach1221 Sep 11, 2023
136cc03
Update Jenkinsfile
zach1221 Sep 11, 2023
bdddd6e
Update Jenkinsfile
zach1221 Sep 11, 2023
e61780c
Update Jenkinsfile
zach1221 Sep 11, 2023
2f912e2
Update Jenkinsfile
zach1221 Sep 11, 2023
b9eb0e3
Merge branch 'develop' into CloudRT
zach1221 Sep 12, 2023
a23b80c
Update Jenkinsfile
zach1221 Sep 12, 2023
85fa89f
Update rt.conf
zach1221 Sep 12, 2023
12578f7
Update rt.conf
zach1221 Sep 12, 2023
dc7a736
Update rt.conf
zach1221 Sep 12, 2023
7a688f7
Update Jenkinsfile
zach1221 Sep 12, 2023
cb5a5db
Update rt.conf
zach1221 Sep 12, 2023
bd63a50
Update rt.conf
zach1221 Sep 12, 2023
25e8f20
Update Jenkinsfile
zach1221 Sep 13, 2023
35be3e7
Update Jenkinsfile
zach1221 Sep 13, 2023
31e3558
Update Jenkinsfile
zach1221 Sep 13, 2023
712c8bd
Update Jenkinsfile
zach1221 Sep 13, 2023
518aa91
Update Jenkinsfile
zach1221 Sep 13, 2023
4a6e818
Update Jenkinsfile
zach1221 Sep 13, 2023
e1f8041
Update Jenkinsfile
zach1221 Sep 14, 2023
4f8919d
Update Jenkinsfile
zach1221 Sep 14, 2023
3c5ef6a
Update rt.conf add datm_cdep global coupled cases
zach1221 Sep 14, 2023
f32462e
Update Jenkinsfile revert changes
zach1221 Sep 14, 2023
abaa83f
Merge branch 'develop' into CloudRT
zach1221 Sep 14, 2023
540a6ca
New add noaacloud RT logs: passed
zach1221 Sep 14, 2023
747f8a7
Update Jenkinsfile
zach1221 Sep 14, 2023
df43767
Update Jenkinsfile revert log transfer lines
zach1221 Sep 15, 2023
ae6a8bf
Update rt.conf align columns
zach1221 Sep 15, 2023
9dc2f9d
Update rt.sh revert jet changes
zach1221 Sep 15, 2023
d9e0755
Update bl.py revert jet changes
zach1221 Sep 15, 2023
04622fc
Update rt.conf fix typo
zach1221 Sep 15, 2023
2a0a92f
WCOSS2 RT Log
BrianCurtis-NOAA Sep 15, 2023
efac2c3
Acorn RT Log
BrianCurtis-NOAA Sep 15, 2023
a5012ee
Merge branch 'CloudRT' of github.com:ufs-community/ufs-weather-model …
BrianCurtis-NOAA Sep 15, 2023
4150771
add RT log orion: passed
FernandoAndrade-NOAA Sep 16, 2023
564ce02
add gaea RT log: passed
FernandoAndrade-NOAA Sep 17, 2023
759e356
add hera RT logs: passed
zach1221 Sep 18, 2023
cf38a42
add jet RT logs: passed
zach1221 Sep 18, 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
4 changes: 2 additions & 2 deletions tests/auto-jenkins/jobs/bl.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ def set_directories(job_obj):
f'emc.nemspara/FV3_RT/REGRESSION_TEST'
elif job_obj.machine == 'gaea':
workdir = '/lustre/f2/pdata/ncep/emc.nemspara/autort/pr'
blstore = '/lustre/f2/pdata/ncep_shared/emc.nemspara/RT/NEMSfv3gfs'
blstore = '/lustre/f2/pdata/ncep/role.epic/RT/NEMSfv3gfs'
rtbldir = '/lustre/f2/scratch/emc.nemspara/FV3_RT/'\
f'REGRESSION_TEST'
elif job_obj.machine == 'orion':
workdir = '/work/noaa/epic-ps/role-epic-ps/autort/tests/auto/pr'
blstore = '/work2/noaa/epic-ps/RT/NEMSfv3gfs'
blstore = '/work/noaa/epic/UFS-WM_RT/NEMSfv3gfs'
rtbldir = '/work/noaa/stmp/role-epic-ps/stmp/role-epic-ps/FV3_RT/'\
f'REGRESSION_TEST'
elif job_obj.machine == 'cheyenne':
Expand Down
20 changes: 15 additions & 5 deletions tests/ci/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,18 @@ pipeline {
overrideIndexTriggers(false)
skipDefaultCheckout(true)
}

stages {

stage('Launch SonarQube') {
steps {
script {
build job: '/ufs-weather-model/ufs-wm-sonarqube', parameters: [
string(name: 'BRANCH_NAME', value: env.CHANGE_BRANCH ?: 'develop')
], wait: false
}
}
}

stage('ORT') {
matrix {
axes {
Expand Down Expand Up @@ -81,17 +91,17 @@ pipeline {
}
}
}

post {
post {
always {
sh '''
docker rmi -f "$(docker image ls | grep -E -m1 "${IMG_NAME}" | awk '{ print $3 }')"
docker rmi -f "$(docker image ls | grep -E -m1 'noaaepic' | awk '{ print $3 }')"
'''
}
}

}
}
}
}
}

144 changes: 144 additions & 0 deletions tests/ci/Jenkinsfile.noaacloud
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
pipeline {
agent none
stages {
stage('Start Parallelworks Cluster') {
agent {
label 'built-in'
}
steps {
script {
for (label in pullRequest.labels) {
if ((label.matches("(.*)-aws-(.*)"))) {
env.CHOICE_NODE='pclusternoaav2use1'
}
else if ((label.matches("(.*)-gcp-(.*)"))) {
env.CHOICE_NODE='gclusternoaav2usc1'
}
else if ((label.matches("(.*)-azure-(.*)"))) {
env.CHOICE_NODE='azclusternoaav2use1'
}
else {
env.CHOICE_NODE='none'
}
}
// Why do I need another if..block, because it just works this way.

if (CHOICE_NODE == 'azclusternoaav2use1') {
echo "Starting up Parallelworks cluster ${CHOICE_NODE}...this might take 5-10 minutes...please be patient."
build job: 'parallel-works-jenkins-client/start-cluster', parameters: [string(name: 'PW_CLUSTER_NAME', value: 'azclusternoaav2use1'), string(name: 'PW_CLUSTER_SSH_KEY', value: '~/.ssh/pw_id_rsa'), string(name: 'JAVA_VERSION', value: '11')]

}
else if (CHOICE_NODE == 'gclusternoaav2usc1') {
echo "Starting up Parallelworks cluster ${CHOICE_NODE}...this might take 5-10 minutes...please be patient."
build job: 'parallel-works-jenkins-client/start-cluster', parameters: [string(name: 'PW_CLUSTER_NAME', value: 'gclusternoaav2usc1'), string(name: 'PW_CLUSTER_SSH_KEY', value: '~/.ssh/pw_id_rsa'), string(name: 'JAVA_VERSION', value: '11')]
}
else if (CHOICE_NODE == 'pclusternoaav2use1') {
echo "Starting up Parallelworks cluster ${CHOICE_NODE}...this might take 5-10 minutes...please be patient."
build job: 'parallel-works-jenkins-client/start-cluster', parameters: [string(name: 'PW_CLUSTER_NAME', value: 'pclusternoaav2use1'), string(name: 'PW_CLUSTER_SSH_KEY', value: '~/.ssh/pw_id_rsa'), string(name: 'JAVA_VERSION', value: '11')]
}
else {
echo "${CHOICE_NODE} is NOT a Parallelworks cluster, moving on..."
}
}
}
}
stage('Run Regression Tests script') {
agent {
label "${CHOICE_NODE}"
}
environment {
GITHUB_SSH_KEY = credentials('ParallelworksGithubPrivateKey')
ACCNR = 'epic'
GITHUB_TOKEN = credentials('zachgithubtoken')
NODE_PATH = '/lustre/'
}
steps {
script {
for (label in pullRequest.labels) {
if ((label.matches("(.*)-BL"))) {
env.CREATE_BASELINES='true'
}
else {
env.CREATE_BASELINES='false'
}
}
}
cleanWs()
checkout scm
sh '''
pwd
git submodule update --init --recursive
cd tests/
if [[ "${CREATE_BASELINES}" = true ]]
then
echo "Creating baselines for regressions tests"
./rt.sh -c -l rt.conf
echo "Sending regression test logs to $GIT_URL"
git config user.email "ecc.platform@noaa.gov"
git config user.name "epic-cicd-jenkins"
set +x
cd ${WORKSPACE}
export httpsorigin=`echo ${GIT_URL} | sed -e "s/github/$GITHUB_TOKEN@github/"` > /dev/null 2>&1
git remote -v | grep -w httpsorigin > /dev/null 2>&1 && git remote remove httpsorigin > /dev/null 2>&1
git remote add httpsorigin $httpsorigin > /dev/null 2>&1
git add tests/logs/RegressionTests_noaacloud.log
git commit -m "[AutoRT] noaacloud Job Completed.\n\n\n on-behalf-of @ufs-community <ecc.platform@noaa.gov>"
git push httpsorigin HEAD:$CHANGE_BRANCH > /dev/null 2>&1
set -x
echo "Pushed logs to $GIT_URL $CHANGE_BRANCH"
echo "Removing labels from $GIT_URL"
GIT_OWNER=$(echo $GIT_URL | cut -d '/' -f4)
GIT_REPO_NAME=$(echo $GIT_URL | cut -d '/' -f5 | cut -d '.' -f1)
curl --silent -X DELETE -H "Accept: application/vnd.github.v3+json" -H "Authorization: Bearer ${GITHUB_TOKEN}" https://api.github.com/repos/${GIT_OWNER}/${GIT_REPO_NAME}/issues/${CHANGE_ID}/labels -d '{"labels":[".*BL"]}'
else
echo "Running regression tests and NOT creating baselines."
./rt.sh -l rt.conf
echo "Sending regression test logs to $GIT_URL"
git config user.email "ecc.platform@noaa.gov"
git config user.name "epic-cicd-jenkins"
set +x
cd ${WORKSPACE}
export httpsorigin=`echo ${GIT_URL} | sed -e "s/github/$GITHUB_TOKEN@github/"` > /dev/null 2>&1
git remote -v | grep -w httpsorigin > /dev/null 2>&1 && git remote remove httpsorigin > /dev/null 2>&1
git remote add httpsorigin $httpsorigin > /dev/null 2>&1
git add tests/logs/RegressionTests_noaacloud.log
git commit -m "[AutoRT] noaacloud Job Completed.\n\n\n on-behalf-of @ufs-community <ecc.platform@noaa.gov>"
git push httpsorigin HEAD:$CHANGE_BRANCH > /dev/null 2>&1
set -x
echo "Pushed logs to $GIT_URL $CHANGE_BRANCH"
echo "Removing labels from $GIT_URL"
GIT_OWNER=$(echo $GIT_URL | cut -d '/' -f4)
GIT_REPO_NAME=$(echo $GIT_URL | cut -d '/' -f5 | cut -d '.' -f1)
curl --silent -X DELETE -H "Accept: application/vnd.github.v3+json" -H "Authorization: Bearer ${GITHUB_TOKEN}" https://api.github.com/repos/${GIT_OWNER}/${GIT_REPO_NAME}/issues/${CHANGE_ID}/labels -d '{"labels":[".*RT"]}'
fi
'''
}
}
stage('Stop Parallelworks Cluster') {
agent {
label 'built-in'
}
// Pedantic comment.
steps {
script {
if (CHOICE_NODE == 'azclusternoaav2use1') {
echo "Shutting Down Parallelworks cluster ${CHOICE_NODE}."
build job: 'parallel-works-jenkins-client/stop-cluster', parameters: [string(name: 'PW_CLUSTER_NAME', value: 'azclusternoaav2use1')]

}
else if (CHOICE_NODE == 'gclusternoaav2usc1') {
echo "Shutting Down Parallelworks cluster ${CHOICE_NODE}."
build job: 'parallel-works-jenkins-client/stop-cluster', parameters: [string(name: 'PW_CLUSTER_NAME', value: 'gclusternoaav2usc1')]
}
else if (CHOICE_NODE == 'pclusternoaav2use1') {
echo "Shutting Down Parallelworks cluster ${CHOICE_NODE}."
build job: 'parallel-works-jenkins-client/stop-cluster', parameters: [string(name: 'PW_CLUSTER_NAME', value: 'pclusternoaav2use1')]
}
else {
echo "${CHOICE_NODE} is NOT a Parallelworks cluster, moving on..."
}
}
}
}
}
}
Loading