Revert "[feat][si] common function to store SI artifacts in jfrog"
This reverts commit c0987adaafca8035f2eb89254ee6e8d5d4307928.
Reason for revert: <not a good place for such function>
Change-Id: Ibbd6c873874c24699cf1a5f3be9594032c9a731e
diff --git a/src/com/mirantis/mk/Workflow.groovy b/src/com/mirantis/mk/Workflow.groovy
index ef24280..9281907 100644
--- a/src/com/mirantis/mk/Workflow.groovy
+++ b/src/com/mirantis/mk/Workflow.groovy
@@ -483,50 +483,3 @@
}
} // finally
}
-
-/**
- * Upload artifacts from SI scenario in Jfrog artifactory
- *
- * @param: entrypointDirectory (string) directory that needs to be archieved
- * @param: storeArtsInJenkins (bool) store artifacts in jenkins as well
- */
-def manageArtifacts(entrypointDirectory, storeArtsInJenkins = false) {
- def mcpArtifactory = new com.mirantis.mcp.MCPArtifactory()
- artifactoryServerName = 'mcp-ci'
- artifactoryRepoPath = "si-local/jenkins-job-artifacts/${JOB_NAME}/${BUILD_NUMBER}"
- tests_log = "${entrypointDirectory}/tests.log"
-
- if (fileExists(tests_log)) {
- try {
- size = sh([returnStdout: true, script: "stat --printf='%s' ${tests_log}"]).trim().toInteger()
- // do not archive unless it is more than 50 MB
- allowed_size = 1048576 * 50
- if (size >= allowed_size) {
- sh("gzip ${tests_log} || true")
- }
- } catch (e) {
- print("Cannot determine tests.log filesize: ${e}")
- }
- }
-
- if (storeArtsInJenkins) {
- archiveArtifacts(
- artifacts: "${entrypointDirectory}/**",
- allowEmptyArchive: true
- )
- }
- artConfig = [
- deleteArtifacts: false,
- artifactory : artifactoryServerName,
- artifactPattern: "${entrypointDirectory}/**",
- artifactoryRepo: "artifactory/${artifactoryRepoPath}",
- ]
- artDescription = mcpArtifactory.uploadArtifactsToArtifactory(artConfig)
- currentBuild.description += "${artDescription}<br>"
-
- junit(testResults: "${entrypointDirectory}/**/*.xml", allowEmptyResults: true)
-
- artifactoryServer = Artifactory.server(artifactoryServerName)
- artifactsUrl = "${artifactoryServer.getUrl()}/artifactory/${artifactoryRepoPath}"
- return artifactsUrl
-}