| |
@@ -285,3 +285,21 @@
|
| |
echo 'Failed to sent the test result to ResultsDB.'
|
| |
}
|
| |
}
|
| |
+
|
| |
+ /**
|
| |
+ * Send message with container testing results.
|
| |
+ * @param project Openshift project with pods logs to archive.
|
| |
+ */
|
| |
+ def archiveContainersLogs(String project) {
|
| |
+ dir('logs'){
|
| |
+ echo "Gathering logs from Openshift project ${project}"
|
| |
+ openshift.withCluster() {
|
| |
+ openshift.withProject(project) {
|
| |
+ openshift.selector('pods').withEach {
|
| |
+ writeFile(file: it.name().minus('pod/'), text: openshift.raw("logs --all-containers ${it.name()}").out)
|
| |
+ }
|
| |
+ }
|
| |
+ }
|
| |
+ }
|
| |
+ archiveArtifacts "logs/**"
|
| |
+ }
|
| |
Archives logs from all containers in selected openshift project.