diff --git a/platform/build-scripts/groovy/org/jetbrains/intellij/build/impl/compilation/CompilationOutputsUploader.groovy b/platform/build-scripts/groovy/org/jetbrains/intellij/build/impl/compilation/CompilationOutputsUploader.groovy index ab82006c6b8a..5235030229ba 100644 --- a/platform/build-scripts/groovy/org/jetbrains/intellij/build/impl/compilation/CompilationOutputsUploader.groovy +++ b/platform/build-scripts/groovy/org/jetbrains/intellij/build/impl/compilation/CompilationOutputsUploader.groovy @@ -29,7 +29,6 @@ class CompilationOutputsUploader { private static final String COMMIT_HISTORY_FILE = "commit_history.json" private static final int COMMITS_LIMIT = 200 - private final String agentPersistentStorage private final CompilationContext context private final BuildMessages messages private final String remoteCacheUrl @@ -53,9 +52,8 @@ class CompilationOutputsUploader { return commitHashBuilder.toString() }() - CompilationOutputsUploader(CompilationContext context, String remoteCacheUrl, Map remotePerCommitHash, - String agentPersistentStorage, String tmpDir, boolean updateCommitHistory) { - this.agentPersistentStorage = agentPersistentStorage + CompilationOutputsUploader(CompilationContext context, String remoteCacheUrl, Map remotePerCommitHash, String tmpDir, + boolean updateCommitHistory) { this.tmpDir = tmpDir this.remoteCacheUrl = remoteCacheUrl this.messages = context.messages @@ -100,11 +98,6 @@ class CompilationOutputsUploader { messages.reportStatisticValue("Total outputs", String.valueOf(sourcesStateProcessor.getAllCompilationOutputs(currentSourcesState).size())) messages.reportStatisticValue("Uploaded outputs", String.valueOf(uploadedOutputsCount.get())) - // Publish metadata file - def metadataFile = new File("$agentPersistentStorage/metadata.json") - FileUtil.rename(sourceStateFile, metadataFile) - messages.artifactBuilt(metadataFile.absolutePath) - if (updateCommitHistory) { updateCommitHistory(uploader) } @@ -208,12 +201,9 @@ class CompilationOutputsUploader { // Upload and publish file with commits history def jsonAsString = new Gson().toJson(commitHistory) - def file = new File("$agentPersistentStorage/$COMMIT_HISTORY_FILE") - file.write(jsonAsString) - messages.artifactBuilt(file.absolutePath) - uploader.upload(COMMIT_HISTORY_FILE, file) - File commitHistoryFileCopy = new File(tmpDir, COMMIT_HISTORY_FILE) - FileUtil.rename(file, commitHistoryFileCopy) + File commitHistoryFile = new File(tmpDir, COMMIT_HISTORY_FILE) + commitHistoryFile.write(jsonAsString) + uploader.upload(COMMIT_HISTORY_FILE, commitHistoryFile) } @CompileStatic diff --git a/platform/build-scripts/groovy/org/jetbrains/intellij/build/impl/compilation/PortableCompilationCache.groovy b/platform/build-scripts/groovy/org/jetbrains/intellij/build/impl/compilation/PortableCompilationCache.groovy index 838b52c67b79..9c51e01219b5 100644 --- a/platform/build-scripts/groovy/org/jetbrains/intellij/build/impl/compilation/PortableCompilationCache.groovy +++ b/platform/build-scripts/groovy/org/jetbrains/intellij/build/impl/compilation/PortableCompilationCache.groovy @@ -107,7 +107,6 @@ class PortableCompilationCache { else { def remoteCacheUrl = require('intellij.jps.remote.cache.upload.url', "JPS remote cache upload url") def syncFolder = require("jps.caches.aws.sync.folder", "AWS sync folder") - def agentPersistentStorage = require("agent.persistent.cache", "Agent persistent storage") def commitHash = require("build.vcs.number", "Repository commit") context.messages.buildStatus(commitHash) def updateCommitHistory = System.getProperty('intellij.jps.remote.cache.updateHistory')?.toBoolean() ?: true @@ -116,8 +115,7 @@ class PortableCompilationCache { Map remotePerCommitHash = [:] remotePerCommitHash[remoteGitUrl] = commitHash new CompilationOutputsUploader( - context, remoteCacheUrl, remotePerCommitHash, - agentPersistentStorage, syncFolder, updateCommitHistory + context, remoteCacheUrl, remotePerCommitHash, syncFolder, updateCommitHistory ).upload(publishTeamCityArtifacts) } }