本文整理汇总了Java中jetbrains.buildServer.serverSide.artifacts.BuildArtifactsViewMode类的典型用法代码示例。如果您正苦于以下问题:Java BuildArtifactsViewMode类的具体用法?Java BuildArtifactsViewMode怎么用?Java BuildArtifactsViewMode使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
BuildArtifactsViewMode类属于jetbrains.buildServer.serverSide.artifacts包,在下文中一共展示了BuildArtifactsViewMode类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: findArtifact
import jetbrains.buildServer.serverSide.artifacts.BuildArtifactsViewMode; //导入依赖的package包/类
@Nullable
private BuildArtifact findArtifact(@NotNull BuildMetadataEntry entry) {
final Map<String,String> metadata = entry.getMetadata();
final String storedArtifactPath = metadata.get(BuildSymbolsIndexProvider.ARTIFACT_PATH_KEY);
if(storedArtifactPath == null){
LOG.debug(String.format("Metadata stored for guid '%s' is invalid.", entry.getKey()));
return null;
}
final long buildId = entry.getBuildId();
final SBuild build = myServer.findBuildInstanceById(buildId);
if(build == null){
LOG.debug(String.format("Build not found by id %d.", buildId));
return null;
}
final BuildArtifact buildArtifact = build.getArtifacts(BuildArtifactsViewMode.VIEW_ALL_WITH_ARCHIVES_CONTENT).getArtifact(storedArtifactPath);
if(buildArtifact == null){
LOG.debug(String.format("Artifact not found by path %s for build with id %d.", storedArtifactPath, buildId));
}
return buildArtifact;
}
示例2: fillModel
import jetbrains.buildServer.serverSide.artifacts.BuildArtifactsViewMode; //导入依赖的package包/类
@Override
public void fillModel(@NotNull final Map<String, Object> model,
@NotNull final HttpServletRequest request) {
final SBuild build = BuildDataExtensionUtil.retrieveBuild(request, myServer);
if (build == null) {
return;
}
final BuildArtifact artifact = build.getArtifacts(BuildArtifactsViewMode.VIEW_HIDDEN_ONLY).getArtifact(Constants.SONAR_SERVER_URL_ARTIF_LOCATION_FULL);
if (artifact == null) {
model.put("sonar_noArtifact", Boolean.TRUE);
return;
}
if (artifact.getSize() > ABSOLUTE_FILESIZE_THRESHOLD) {
model.put("sonar_bigUrlFile", artifact.getSize());
} else {
try {
model.put("sonar_url", readUrl(artifact));
} catch (IOException e) {
model.put("sonar_IOException", e);
}
}
super.fillModel(model, request);
}
示例3: locateArtifact
import jetbrains.buildServer.serverSide.artifacts.BuildArtifactsViewMode; //导入依赖的package包/类
@Nullable
private String locateArtifact(@NotNull SBuild build, final @NotNull String artifactName) {
final AtomicReference<String> locatedArtifactPath = new AtomicReference<String>(null);
build.getArtifacts(BuildArtifactsViewMode.VIEW_ALL_WITH_ARCHIVES_CONTENT).iterateArtifacts(artifact -> {
if(artifact.getName().equals(artifactName)){
locatedArtifactPath.set(artifact.getRelativePath());
return BuildArtifacts.BuildArtifactsProcessor.Continuation.BREAK;
}
else return BuildArtifacts.BuildArtifactsProcessor.Continuation.CONTINUE;
});
return locatedArtifactPath.get();
}
示例4: fillModel
import jetbrains.buildServer.serverSide.artifacts.BuildArtifactsViewMode; //导入依赖的package包/类
@Override
protected void fillModel(Map<String, Object> model, HttpServletRequest request, SBuild build) {
//super.fillModel(model, request);
// add data here
final BuildArtifacts artifacts = build.getArtifacts(BuildArtifactsViewMode.VIEW_ALL);
final BuildArtifact artifact = artifacts.getArtifact(TodoBuildRunnerConstants.TODO_REPORTING_FILENAME);
ArrayList<TodoScanResult> todoScanResults = getTodoScanResults(artifact);
model.put(TodoBuildRunnerConstants.TODO_REPORTING_IDENTIFICATION, todoScanResults);
}
示例5: isAvailable
import jetbrains.buildServer.serverSide.artifacts.BuildArtifactsViewMode; //导入依赖的package包/类
@Override
public boolean isAvailable(@NotNull final HttpServletRequest request) {
final SBuild build = BuildDataExtensionUtil.retrieveBuild(request, myServer);
if (build == null) {
return false;
}
final BuildArtifactHolder artifact = build.getArtifacts(BuildArtifactsViewMode.VIEW_HIDDEN_ONLY).findArtifact(Constants.SONAR_SERVER_URL_ARTIF_LOCATION_FULL);
return artifact.isAvailable();
}
示例6: getArtifacts
import jetbrains.buildServer.serverSide.artifacts.BuildArtifactsViewMode; //导入依赖的package包/类
public BuildArtifacts getArtifacts(BuildArtifactsViewMode arg0) {
// TODO Auto-generated method stub
return null;
}
示例7: buildArtifactsChanged
import jetbrains.buildServer.serverSide.artifacts.BuildArtifactsViewMode; //导入依赖的package包/类
@Override
public void buildArtifactsChanged(SBuild build) {
this.myPublisher.removeArtifactsFromRepositories(build, build.getArtifacts(BuildArtifactsViewMode.VIEW_DEFAULT));
}
示例8: buildFinished
import jetbrains.buildServer.serverSide.artifacts.BuildArtifactsViewMode; //导入依赖的package包/类
@Override
public void buildFinished(SRunningBuild build) {
this.myPublisher.addArtifactsToRepositories(build, build.getArtifacts(BuildArtifactsViewMode.VIEW_DEFAULT));
}
示例9: isAvailableFor
import jetbrains.buildServer.serverSide.artifacts.BuildArtifactsViewMode; //导入依赖的package包/类
@Override
protected boolean isAvailableFor(@NotNull SBuild build) {
return build.getArtifacts(BuildArtifactsViewMode.VIEW_HIDDEN_ONLY)
.findArtifact(PluginConst.REPORT_DIRECTORY + "/" + PluginConst.REPORT_FILE).isAccessible();
}
示例10: hasBenchmarks
import jetbrains.buildServer.serverSide.artifacts.BuildArtifactsViewMode; //导入依赖的package包/类
private boolean hasBenchmarks(SBuild build) {
return build.getArtifacts(BuildArtifactsViewMode.VIEW_ALL).findArtifact(PluginConst.OUTPUT_FILE).isAccessible();
}
示例11: getArtifacts
import jetbrains.buildServer.serverSide.artifacts.BuildArtifactsViewMode; //导入依赖的package包/类
@NotNull
@Override
public BuildArtifacts getArtifacts(@NotNull BuildArtifactsViewMode buildArtifactsViewMode) {
return null;
}