Skip to content

Commit

Permalink
Merge branch 'NOAA-EMC:develop' into feature/3band_sdl_analysis
Browse files Browse the repository at this point in the history
  • Loading branch information
TravisElless-NOAA authored Apr 30, 2024
2 parents 03c9b5a + 762f040 commit a07f670
Show file tree
Hide file tree
Showing 59 changed files with 110 additions and 16,300 deletions.
65 changes: 47 additions & 18 deletions ci/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,31 +21,60 @@ pipeline {
// Each Jenknis Node is connected to said machine via an JAVA agent via an ssh tunnel
// no op 2

stage('Get Machine') {
stage('1. Get Machine') {
agent { label 'built-in' }
steps {
script {
machine = 'none'
for (label in pullRequest.labels) {
echo "Label: ${label}"
if ((label.matches('CI-Hera-Ready'))) {
machine = 'hera'
} else if ((label.matches('CI-Orion-Ready'))) {
machine = 'orion'
} else if ((label.matches('CI-Hercules-Ready'))) {
machine = 'hercules'

def causes = currentBuild.rawBuild.getCauses()
def isSpawnedFromAnotherJob = causes.any { cause ->
cause instanceof hudson.model.Cause.UpstreamCause
}

def run_nodes = []
if (isSpawnedFromAnotherJob) {
echo "machine being set to value passed to this spawned job"
echo "passed machine: ${params.machine}"
machine = params.machine
} else {
echo "This is parent job so getting list of nodes matching labels:"
for (label in pullRequest.labels) {
if (label.matches("CI-(.*?)-Ready")) {
def Machine_name = label.split('-')[1].toString()
jenkins.model.Jenkins.get().computers.each { c ->
if (c.node.selfLabel.name == "${Machine_name}-EMC") {
run_nodes.add(c.node.selfLabel.name)
}
}
}
}
} // createing a second machine varible with first letter capital
// because the first letter of the machine name is captitalized in the GitHub labels
Machine = machine[0].toUpperCase() + machine.substring(1)
// Spawning all the jobs on the nodes matching the labels
if (run_nodes.size() > 1) {
run_nodes.init().each { node ->
def machine_name = node.split('-')[0].toLowerCase()
echo "Spawning job on node: ${node} with machine name: ${machine_name}"
build job: "/global-workflow/EMC-Global-Pipeline/PR-${env.CHANGE_ID}", parameters: [
string(name: 'machine', value: machine_name),
string(name: 'Node', value: node) ],
wait: false
}
machine = run_nodes.last().split('-')[0].toLowerCase()
echo "Running parent job: ${machine}"
} else {
machine = run_nodes[0].split('-')[0].toLowerCase()
echo "Running only the parent job: ${machine}"
}
}
}
}
}

stage('Get Common Workspace') {
stage('2. Get Common Workspace') {
agent { label "${machine}-emc" }
steps {
script {
Machine = machine[0].toUpperCase() + machine.substring(1)
echo "Getting Common Workspace for ${Machine}"
ws("${custom_workspace[machine]}/${env.CHANGE_ID}") {
properties([parameters([[$class: 'NodeParameterDefinition', allowedSlaves: ['built-in', 'Hera-EMC', 'Orion-EMC'], defaultSlaves: ['built-in'], name: '', nodeEligibility: [$class: 'AllNodeEligibility'], triggerIfResult: 'allCases']])])
HOME = "${WORKSPACE}"
Expand All @@ -57,7 +86,7 @@ pipeline {
}
}

stage('Build System') {
stage('3. Build System') {
matrix {
agent { label "${machine}-emc" }
//options {
Expand Down Expand Up @@ -141,7 +170,7 @@ pipeline {
}
}

stage('Run Tests') {
stage('4. Run Tests') {
failFast false
matrix {
agent { label "${machine}-emc" }
Expand Down Expand Up @@ -216,7 +245,7 @@ pipeline {
STATUS = 'Failed'
try {
sh(script: """${GH} pr edit ${env.CHANGE_ID} --repo ${repo_url} --remove-label "CI-${Machine}-Running" --add-label "CI-${Machine}-${STATUS}" """, returnStatus: true)
sh(script: """${GH} pr comment ${env.CHANGE_ID} --repo ${repo_url} --body "Experiment ${Case} **FAILED** on ${Machine}\nin\\`${HOME}/RUNTESTS/${pslot}\\`" """)
sh(script: """${GH} pr comment ${env.CHANGE_ID} --repo ${repo_url} --body "Experiment ${Case} **FAILED** on ${Machine} in\n\\`${HOME}/RUNTESTS/${pslot}\\`" """)
} catch (Exception e) {
echo "Failed to update label from Running to ${STATUS}: ${e.getMessage()}"
}
Expand All @@ -229,7 +258,7 @@ pipeline {
}
}
}
stage( 'FINALIZE' ) {
stage( '5. FINALIZE' ) {
when {
expression {
STATUS == 'Passed'
Expand Down
1 change: 0 additions & 1 deletion ci/cases/pr/C48mx500_3DVarAOWCDA.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,4 @@ arguments:
skip_ci_on_hosts:
- wcoss2
- orion
- hera
- hercules
2 changes: 0 additions & 2 deletions ecf/scripts/gfs/atmos/post_processing/awips_g2/.gitignore

This file was deleted.

This file was deleted.

54 changes: 0 additions & 54 deletions jobs/JGFS_ATMOS_AWIPS_G2

This file was deleted.

3 changes: 2 additions & 1 deletion jobs/JGLOBAL_FORECAST
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ if [[ "${DO_OCN}" == "YES" ]]; then
YMD="${PDY}" HH="${cyc}" declare_from_tmpl -rx COM_MED_RESTART COM_OCEAN_RESTART COM_OCEAN_INPUT \
COM_OCEAN_HISTORY COM_OCEAN_ANALYSIS
RUN="${rCDUMP}" YMD="${gPDY}" HH="${gcyc}" declare_from_tmpl -rx \
COM_OCEAN_RESTART_PREV:COM_OCEAN_RESTART_TMPL
COM_OCEAN_RESTART_PREV:COM_OCEAN_RESTART_TMPL \
COM_MED_RESTART_PREV:COM_MED_RESTART_TMPL
fi

if [[ "${DO_ICE}" == "YES" ]]; then
Expand Down
58 changes: 0 additions & 58 deletions jobs/rocoto/awips_g2.sh

This file was deleted.

6 changes: 6 additions & 0 deletions parm/config/gfs/config.anal
Original file line number Diff line number Diff line change
Expand Up @@ -150,4 +150,10 @@ if [[ ${RUN_ENVIR} == "emc" ]]; then
# fi
fi

# Flag to turn on (.true.) or off (.false.) the infrared cloud and aerosol detection software
# for AIRS, CrIS, and IASI. Default is .false.
export AIRS_CADS=".false."
export CRIS_CADS=".false."
export IASI_CADS=".false."

echo "END: config.anal"
Loading

0 comments on commit a07f670

Please sign in to comment.