From b3c533757347c4fdc6f9a01fc7cb503bb838dd70 Mon Sep 17 00:00:00 2001 From: yinggzz <74112748+yinggzz@users.noreply.github.com> Date: Thu, 3 Feb 2022 13:07:41 -0500 Subject: [PATCH] Archive metadata file for AQAvit certification use case (#3316) Fixes: #3264 Signed-off-by: Ying Zhou --- buildenv/jenkins/JenkinsfileBase | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/buildenv/jenkins/JenkinsfileBase b/buildenv/jenkins/JenkinsfileBase index a99eec509d..6c9f673b94 100644 --- a/buildenv/jenkins/JenkinsfileBase +++ b/buildenv/jenkins/JenkinsfileBase @@ -691,6 +691,7 @@ def post(output_name) { junit allowEmptyResults: true, keepLongStdio: true, testResults: '**/work/**/*.jtr.xml, **/junitreports/**/*.xml, **/external_test_reports/**/*.xml' archiveSHAFile() archiveTestenvFile() + archiveAQACertFile() if (env.BUILD_LIST.startsWith('jck')) { xunit ( @@ -903,6 +904,17 @@ def archiveSHAFile() { } } +def archiveAQACertFile() { + def AQACertFile = "aqa-tests/TKG/AQACert.log"; + if (!params.ARTIFACTORY_SERVER) { + echo "ARTIFACTORY_SERVER is not set. Saving AQACert file on jenkins." + archiveArtifacts artifacts: AQACertFile, fingerprint: true, allowEmptyArchive: true + } else { + def pattern = "${env.WORKSPACE}/${AQACertFile}" + uploadToArtifactory(pattern) + } +} + def uploadToArtifactory(pattern) { if (params.ARTIFACTORY_SERVER) { def server = Artifactory.server params.ARTIFACTORY_SERVER