Skip to content

Commit

Permalink
Turn GEFS CI test on for Hera (NOAA-EMC#2442)
Browse files Browse the repository at this point in the history
Re-enabling gefs case to test gefs system builds in Jenkins on Hera.

Co-authored-by: TerrenceMcGuinness-NOAA <terry.mcguinness@noaa.gov>
Co-authored-by: terrance.mcguinness <terrance.mcguinness@noaa.gov>
Co-authored-by: Walter.Kolczynski <Walter.Kolczynski@noaa.gov>
  • Loading branch information
4 people authored Mar 29, 2024
1 parent ba6a9d5 commit 20635b0
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 14 deletions.
23 changes: 12 additions & 11 deletions ci/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ pipeline {
}
} else {
checkout scm
def gist_url = ""
def error_logs = ""
def error_logs_message = ""
def builds_file = readYaml file: 'ci/cases/yamls/build.yaml'
Expand All @@ -93,29 +94,29 @@ pipeline {
sh(script: "${build_args}")
} catch (Exception error_build) {
echo "Failed to build system: ${error_build.getMessage()}"
if ( fileExists("logs/error_log.logs") ) {
def fileContent = readFile 'logs/error_log.logs'
if ( fileExists("logs/error.logs") ) {
def fileContent = readFile 'logs/error.logs'
def lines = fileContent.readLines()
for (line in lines) {
echo "archiving: ${line}"
if (fileExists("sorc/logs/${line}") && readFile("sorc/logs/${line}").length() > 0 ){
if (fileExists("${line}") && readFile("${line}").length() > 0 ){
try {
archiveArtifacts artifacts: "${line}", fingerprint: true
error_logs = error_logs + "${HOMEgfs}/sorc/logs/${line} "
error_logs_message = error_logs_message + "${HOMEgfs}/sorc/logs/${line}\n"
error_logs = error_logs + "${HOMEgfs}/sorc/${line} "
error_logs_message = error_logs_message + "${HOMEgfs}/sorc/${line}\n"
}
catch (Exception error_arch) { echo "Failed to archive error log ${line}: ${error_arch.getMessage()}" }
}
}
repo_url=sh(script: "${HOMEgfs}/ci/scripts/utils/publish_logs.py --file ${error_logs} --repo PR_BUILD_${env.CHANGE_ID}", returnStdout: true).trim()
gist_url=sh(script: "${HOMEgfs}/ci/scripts/utils/publish_logs.py --file ${error_logs} --gist PR_BUILD_${env.CHANGE_ID}", returnStdout: true).trim()
try {
pullRequest.comment("Build failed on **${Machine}** with error logs:${error_logs_message}\n\nFollow link here to view the contents of the above file(s): [(link)](${gist_url})")
} catch (Exception error_comment) {
echo "Failed to comment on PR: ${error_comment.getMessage()}"
}
error("Failed to build system on ${Machine}")
}
try {
pullRequest.comment("Build failed on **${Machine}** with error logs:\n\n```${error_logs_message}```\n\nFollow link here to view the contents of the above file(s): [(link)](${gist_url})")
} catch (Exception error_comment) {
echo "Failed to comment on PR: ${error_comment.getMessage()}"
}
error("Failed to build system on ${Machine}")
}
sh(script: './link_workflow.sh')
// sh(script: "echo ${HOMEgfs} > BUILT_semaphor")
Expand Down
2 changes: 0 additions & 2 deletions ci/cases/pr/C48_S2SWA_gefs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,3 @@ arguments:
edate: 2021032312
yaml: {{ HOMEgfs }}/ci/cases/yamls/gefs_ci_defaults.yaml

skip_ci_on_hosts:
- hera

0 comments on commit 20635b0

Please sign in to comment.