Search in sources :

Example 1 with TeamscaleUploader

use of com.teamscale.jacoco.agent.upload.teamscale.TeamscaleUploader in project teamscale-jacoco-agent by cqse.

the class AgentOptions method createNwdiTeamscaleUploader.

private IUploader createNwdiTeamscaleUploader(Instrumentation instrumentation) {
    DelayedSapNwdiMultiUploader uploader = new DelayedSapNwdiMultiUploader((commit, application) -> new TeamscaleUploader(teamscaleServer.withProjectAndCommit(application.getTeamscaleProject(), commit)));
    instrumentation.addTransformer(new NwdiMarkerClassLocatingTransformer(uploader, getLocationIncludeFilter(), sapNetWeaverJavaApplications.getApplications()));
    return uploader;
}
Also used : DelayedSapNwdiMultiUploader(com.teamscale.jacoco.agent.options.sapnwdi.DelayedSapNwdiMultiUploader) TeamscaleUploader(com.teamscale.jacoco.agent.upload.teamscale.TeamscaleUploader) NwdiMarkerClassLocatingTransformer(com.teamscale.jacoco.agent.commit_resolution.sapnwdi.NwdiMarkerClassLocatingTransformer)

Example 2 with TeamscaleUploader

use of com.teamscale.jacoco.agent.upload.teamscale.TeamscaleUploader 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;
}
Also used : GitPropertiesLocatingTransformer(com.teamscale.jacoco.agent.commit_resolution.git_properties.GitPropertiesLocatingTransformer) TeamscaleUploader(com.teamscale.jacoco.agent.upload.teamscale.TeamscaleUploader) GitPropertiesLocatorUtils(com.teamscale.jacoco.agent.commit_resolution.git_properties.GitPropertiesLocatorUtils) GitPropertiesLocator(com.teamscale.jacoco.agent.commit_resolution.git_properties.GitPropertiesLocator) DelayedUploader(com.teamscale.jacoco.agent.upload.delay.DelayedUploader)

Example 3 with TeamscaleUploader

use of com.teamscale.jacoco.agent.upload.teamscale.TeamscaleUploader 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;
}
Also used : GitMultiProjectPropertiesLocator(com.teamscale.jacoco.agent.commit_resolution.git_properties.GitMultiProjectPropertiesLocator) GitPropertiesLocatingTransformer(com.teamscale.jacoco.agent.commit_resolution.git_properties.GitPropertiesLocatingTransformer) DelayedTeamscaleMultiProjectUploader(com.teamscale.jacoco.agent.upload.teamscale.DelayedTeamscaleMultiProjectUploader) TeamscaleUploader(com.teamscale.jacoco.agent.upload.teamscale.TeamscaleUploader)

Aggregations

TeamscaleUploader (com.teamscale.jacoco.agent.upload.teamscale.TeamscaleUploader)3 GitPropertiesLocatingTransformer (com.teamscale.jacoco.agent.commit_resolution.git_properties.GitPropertiesLocatingTransformer)2 GitMultiProjectPropertiesLocator (com.teamscale.jacoco.agent.commit_resolution.git_properties.GitMultiProjectPropertiesLocator)1 GitPropertiesLocator (com.teamscale.jacoco.agent.commit_resolution.git_properties.GitPropertiesLocator)1 GitPropertiesLocatorUtils (com.teamscale.jacoco.agent.commit_resolution.git_properties.GitPropertiesLocatorUtils)1 NwdiMarkerClassLocatingTransformer (com.teamscale.jacoco.agent.commit_resolution.sapnwdi.NwdiMarkerClassLocatingTransformer)1 DelayedSapNwdiMultiUploader (com.teamscale.jacoco.agent.options.sapnwdi.DelayedSapNwdiMultiUploader)1 DelayedUploader (com.teamscale.jacoco.agent.upload.delay.DelayedUploader)1 DelayedTeamscaleMultiProjectUploader (com.teamscale.jacoco.agent.upload.teamscale.DelayedTeamscaleMultiProjectUploader)1