Skip to content

Commit

Permalink
Merge pull request dotnet#22411 from BruceForstall/AlwaysArchiveLogs
Browse files Browse the repository at this point in the history
Always archive build logs
  • Loading branch information
BruceForstall authored Feb 4, 2019
2 parents 23dfb8f + 34003a5 commit 5ede2e7
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 5ede2e7

Please sign in to comment.