use of com.teamscale.jacoco.agent.commit_resolution.git_properties.GitPropertiesLocatingTransformer in project teamscale-jacoco-agent by cqse.
the class AgentOptions method createDelayedTeamscaleUploader.
private IUploader createDelayedTeamscaleUploader(Instrumentation instrumentation) {
DelayedUploader<ProjectRevision> uploader = new DelayedUploader<>(projectRevision -> {
if (!StringUtils.isEmpty(projectRevision.getProject()) && !teamscaleServer.project.equals(projectRevision.getProject())) {
logger.warn("Teamscale project '{}' specified in the agent configuration is not the same as the Teamscale project '{}' specified in git.properties file(s). Proceeding to upload to the" + " Teamscale project '{}' specified in the agent configuration.", teamscaleServer.project, projectRevision.getProject(), teamscaleServer.project);
}
teamscaleServer.revision = projectRevision.getRevision();
return new TeamscaleUploader(teamscaleServer);
}, outputDirectory);
GitPropertiesLocator<ProjectRevision> locator = new GitPropertiesLocator<>(uploader, GitPropertiesLocatorUtils::getProjectRevisionFromGitProperties);
instrumentation.addTransformer(new GitPropertiesLocatingTransformer(locator, getLocationIncludeFilter()));
return uploader;
}
use of com.teamscale.jacoco.agent.commit_resolution.git_properties.GitPropertiesLocatingTransformer in project teamscale-jacoco-agent by cqse.
the class AgentOptions method createDelayedMultiProjectTeamscaleUploader.
private IUploader createDelayedMultiProjectTeamscaleUploader(Instrumentation instrumentation) {
DelayedTeamscaleMultiProjectUploader uploader = new DelayedTeamscaleMultiProjectUploader((project, revision) -> new TeamscaleUploader(teamscaleServer.withProjectAndRevision(project, revision)));
GitMultiProjectPropertiesLocator locator = new GitMultiProjectPropertiesLocator(uploader);
instrumentation.addTransformer(new GitPropertiesLocatingTransformer(locator, getLocationIncludeFilter()));
return uploader;
}
use of com.teamscale.jacoco.agent.commit_resolution.git_properties.GitPropertiesLocatingTransformer in project teamscale-jacoco-agent by cqse.
the class AgentOptions method createDelayedArtifactoryUploader.
private IUploader createDelayedArtifactoryUploader(Instrumentation instrumentation) {
DelayedUploader<ArtifactoryConfig.CommitInfo> uploader = new DelayedUploader<>(commitInfo -> {
artifactoryConfig.commitInfo = commitInfo;
return new ArtifactoryUploader(artifactoryConfig, additionalMetaDataFiles);
}, outputDirectory);
GitPropertiesLocator<ArtifactoryConfig.CommitInfo> locator = new GitPropertiesLocator<>(uploader, (file, isJarFile) -> ArtifactoryConfig.parseGitProperties(file, artifactoryConfig.gitPropertiesCommitTimeFormat));
instrumentation.addTransformer(new GitPropertiesLocatingTransformer(locator, getLocationIncludeFilter()));
return uploader;
}
Aggregations