Skip to content

Commit

Permalink
Always archive build logs
Browse files Browse the repository at this point in the history
Even if the build fails. Add archiving in more cases where it was missing.
  • Loading branch information
BruceForstall committed Feb 4, 2019
1 parent 9aa68da commit 34003a5
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions netci.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -2244,6 +2244,9 @@ def static calculateBuildCommands(def newJob, def scenario, def branch, def isPR
Utilities.addXUnitDotNETResults(newJob, 'bin/**/TestRun*.xml', true)
}
}

// Archive the logs, even if the build failed (which is when they are most interesting).
Utilities.addArchival(newJob, "bin/Logs/*.log,bin/Logs/*.wrn,bin/Logs/*.err", "", /* doNotFailIfNothingArchived */ true, /* archiveOnlyIfSuccessful */ false)
break
case 'arm':
case 'arm64':
Expand Down Expand Up @@ -2293,6 +2296,9 @@ def static calculateBuildCommands(def newJob, def scenario, def branch, def isPR
// Add archival.
Utilities.addArchival(newJob, "bin/Product/**,bin/tests/tests.zip", "bin/Product/**/.nuget/**")
}

// Archive the logs, even if the build failed (which is when they are most interesting).
Utilities.addArchival(newJob, "bin/Logs/*.log,bin/Logs/*.wrn,bin/Logs/*.err", "", /* doNotFailIfNothingArchived */ true, /* archiveOnlyIfSuccessful */ false)
break
default:
println("Unknown architecture: ${architecture}");
Expand Down Expand Up @@ -2414,6 +2420,9 @@ def static calculateBuildCommands(def newJob, def scenario, def branch, def isPR
Utilities.addXUnitDotNETResults(newJob, "${workspaceRelativeFxRoot}/artifacts/bin/**/testResults.xml")
}
}

// Archive the logs, even if the build failed (which is when they are most interesting).
Utilities.addArchival(newJob, "bin/Logs/*.log,bin/Logs/*.wrn,bin/Logs/*.err", "", /* doNotFailIfNothingArchived */ true, /* archiveOnlyIfSuccessful */ false)
break
case 'armem':
// Emulator cross builds for ARM runs on Tizen currently
Expand Down Expand Up @@ -2537,8 +2546,8 @@ def static calculateBuildCommands(def newJob, def scenario, def branch, def isPR
Utilities.addArchival(newJob, "${testArtifactsTgzFileName}", "")
}

// Archive the build logs from both product and test builds.
Utilities.addArchival(newJob, "bin/Logs/*.log,bin/Logs/*.wrn,bin/Logs/*.err", "")
// Archive the logs, even if the build failed (which is when they are most interesting).
Utilities.addArchival(newJob, "bin/Logs/*.log,bin/Logs/*.wrn,bin/Logs/*.err", "", /* doNotFailIfNothingArchived */ true, /* archiveOnlyIfSuccessful */ false)

// We need to clean up the build machines; the docker build leaves newly built files with root permission, which
// the cleanup task in Jenkins can't remove.
Expand Down

0 comments on commit 34003a5

Please sign in to comment.