• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java BuildArtifacts类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中jetbrains.buildServer.serverSide.artifacts.BuildArtifacts的典型用法代码示例。如果您正苦于以下问题:Java BuildArtifacts类的具体用法?Java BuildArtifacts怎么用?Java BuildArtifacts使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



BuildArtifacts类属于jetbrains.buildServer.serverSide.artifacts包,在下文中一共展示了BuildArtifacts类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: announceBuildArtifactsTest

import jetbrains.buildServer.serverSide.artifacts.BuildArtifacts; //导入依赖的package包/类
public void announceBuildArtifactsTest() {
  Path path = Paths.get("tmp");
  Mockery m = new Mockery();
  BuildArtifacts buildArtifacts = m.mock(BuildArtifacts.class);
  ArtifactsCollector artifactsCollector = m.mock(ArtifactsCollector.class);
  ArtifactProcessor artifactProcessor = m.mock(ArtifactProcessor.class);
  UnusedTorrentFilesRemover unusedTorrentFilesRemover = m.mock(UnusedTorrentFilesRemover.class);
  List<BuildArtifact> artifactsCollectorResult = Collections.emptyList();
  m.checking(new Expectations() {{
    one(artifactProcessor).processArtifacts(with(artifactsCollectorResult));
    one(artifactsCollector).collectArtifacts(with(buildArtifacts)); will(returnValue(artifactsCollectorResult));
    one(unusedTorrentFilesRemover).removeUnusedTorrents(with(artifactsCollectorResult), with(path));
  }});
  myTorrentsSeeder.announceBuildArtifacts(path, buildArtifacts, artifactsCollector, artifactProcessor, unusedTorrentFilesRemover);
  m.assertIsSatisfied();
}
 
开发者ID:JetBrains,项目名称:teamcity-torrent-plugin,代码行数:17,代码来源:ServerTorrentsSeederTest.java


示例2: removeArtifactsFromRepositories

import jetbrains.buildServer.serverSide.artifacts.BuildArtifacts; //导入依赖的package包/类
@Override
public void removeArtifactsFromRepositories(SBuild build, BuildArtifacts buildArtifacts) {
	// Get a list of configs for this build.
	Set<DebRepositoryConfiguration> configs = this.myDepRepositoryConfigManager.findConfigurationsForBuildType(build.getBuildTypeId());
	Loggers.SERVER.info("DebRepositoryBuildArtifactsPublisherImpl#removeArtifactsFromRepositories :: found " + configs.size() + " repos interested in " + build.getFullName());
	List<DebPackage> entities = new ArrayList<>();
	
	BuildArtifactsProcessor  processor = new MyBuildArtifactsProcessor(build, entities);
	buildArtifacts.iterateArtifacts(processor);
	
	Loggers.SERVER.info("DebRepositoryBuildArtifactsPublisherImpl#removeArtifactsFromRepositories :: found " + entities.size() + " artifacts in " + build.getFullName() + " # " + String.valueOf(build.getBuildId()));
	for (DebRepositoryConfiguration config : configs) {
		myDepRepositoryManager.removeBuildPackages(new DebPackageRemovalBean(config, build.getBuildTypeId(), build.getBuildId(), entities));
	}
}
 
开发者ID:tcplugins,项目名称:tcDebRepository,代码行数:16,代码来源:DebRepositoryBuildArtifactsPublisherImpl.java


示例3: locateArtifact

import jetbrains.buildServer.serverSide.artifacts.BuildArtifacts; //导入依赖的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();
}
 
开发者ID:JetBrains,项目名称:teamcity-symbol-server,代码行数:13,代码来源:BuildSymbolsIndexProvider.java


示例4: fillModel

import jetbrains.buildServer.serverSide.artifacts.BuildArtifacts; //导入依赖的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);
}
 
开发者ID:rvdginste,项目名称:todo-teamcity-plugin,代码行数:10,代码来源:TodoLogTab.java


示例5: collectArtifacts

import jetbrains.buildServer.serverSide.artifacts.BuildArtifacts; //导入依赖的package包/类
@Override
@NotNull
public List<BuildArtifact> collectArtifacts(@NotNull BuildArtifacts buildArtifacts) {
  final List<BuildArtifact> result = new ArrayList<>();
  buildArtifacts.iterateArtifacts(artifact -> handleArtifact(result, artifact));
  return result;
}
 
开发者ID:JetBrains,项目名称:teamcity-torrent-plugin,代码行数:8,代码来源:ArtifactsCollectorImpl.java


示例6: handleArtifact

import jetbrains.buildServer.serverSide.artifacts.BuildArtifacts; //导入依赖的package包/类
@NotNull
private BuildArtifacts.BuildArtifactsProcessor.Continuation handleArtifact(List<BuildArtifact> result, BuildArtifact artifact) {
  if (artifact.getName().equals(ArtifactsConstants.TEAMCITY_ARTIFACTS_DIR)) {
    return BuildArtifacts.BuildArtifactsProcessor.Continuation.SKIP_CHILDREN;
  }
  if (artifact.isFile()) {
    result.add(artifact);
  }
  return BuildArtifacts.BuildArtifactsProcessor.Continuation.CONTINUE;
}
 
开发者ID:JetBrains,项目名称:teamcity-torrent-plugin,代码行数:11,代码来源:ArtifactsCollectorImpl.java


示例7: announceBuildArtifacts

import jetbrains.buildServer.serverSide.artifacts.BuildArtifacts; //导入依赖的package包/类
void announceBuildArtifacts(@NotNull final Path torrentsDir,
                            @NotNull final BuildArtifacts buildArtifacts,
                            @NotNull final ArtifactsCollector artifactsCollector,
                            @NotNull final ArtifactProcessor artifactProcessor,
                            @NotNull final UnusedTorrentFilesRemover torrentFilesRemover) {
  List<BuildArtifact> artifactList = artifactsCollector.collectArtifacts(buildArtifacts);
  artifactProcessor.processArtifacts(artifactList);
  torrentFilesRemover.removeUnusedTorrents(artifactList, torrentsDir);
}
 
开发者ID:JetBrains,项目名称:teamcity-torrent-plugin,代码行数:10,代码来源:ServerTorrentsDirectorySeeder.java


示例8: getArtifacts

import jetbrains.buildServer.serverSide.artifacts.BuildArtifacts; //导入依赖的package包/类
public BuildArtifacts getArtifacts(BuildArtifactsViewMode arg0) {
	// TODO Auto-generated method stub
	return null;
}
 
开发者ID:spyder007,项目名称:teamcity-msteams-notifier,代码行数:5,代码来源:MockSRunningBuild.java


示例9: addArtifactsToRepositories

import jetbrains.buildServer.serverSide.artifacts.BuildArtifacts; //导入依赖的package包/类
@Override
public void addArtifactsToRepositories(SBuild build, BuildArtifacts buildArtifacts) {
	Loggers.SERVER.debug("DebRepositoryBuildArtifactsPublisherImpl :: Processing build: " + build.getBuildTypeName());
	if (build.isArtifactsExists()) {
		List<DebPackage> entities = new ArrayList<>();
		
		BuildArtifactsProcessor  processor = new MyBuildArtifactsProcessor(build, entities);
		buildArtifacts.iterateArtifacts(processor);
		
		ParametersProvider provider = build.getParametersProvider();
		ReferenceResolver resolver = new ReferenceResolver();
		
		
		// Get a list of configs for this build.
		Set<DebRepositoryConfiguration> configs = this.myDepRepositoryConfigManager.findConfigurationsForBuildType(build.getBuildTypeId());
		// iterate of the list of configs and check the filters match.
		for (DebRepositoryConfiguration config : configs) {
			List<DebPackage> packagesToAdd = new ArrayList<>();
			for (DebRepositoryBuildTypeConfig bt : config.getBuildTypes()) {
				if (build.getBuildType().getBuildTypeId().equals(bt.getBuildTypeId())){
					for (Filter filter : bt.getDebFilters()) {
						for (DebPackage entity : entities) {
							if (!"".equals(entity.getFilename().trim()) && filter.matches(entity.getFilename())) {
								DebPackage newEntity = populateEntity(entity, myDebFileReaderFactory.createFileReader(build));
								/* TODO: Support for dist and component being variables.
								if (ReferencesResolverUtil.containsReference(filter.getComponent())) {
									String component = filter.getComponent();
									
									newEntity.setComponent(resolver.resolve(filter.getComponent(), value, parameters).);
								} else {*/
									newEntity.setComponent(filter.getComponent());
									newEntity.setDist(filter.getDist());
								/*}*/
								newEntity.buildUri();	
								packagesToAdd.add(newEntity);
							}
						}
					}
				}
			}
			// If we have some matches, pass them all to the manager and add/persist them.
			if (! packagesToAdd.isEmpty()) {
				try {
					this.myDepRepositoryManager.addBuildPackages(config, packagesToAdd);
				} catch (NonExistantRepositoryException e) {
					Loggers.SERVER.warn("DebRepositoryBuildArtifactsPublisherImpl#addArtifactsToRepositories :: Failed to add " + packagesToAdd.size() + " packages to non-existant repository " + config.getRepoName() + " (" + config.getUuid().toString() + ")");
				}
			}
		}
	}
}
 
开发者ID:tcplugins,项目名称:tcDebRepository,代码行数:52,代码来源:DebRepositoryBuildArtifactsPublisherImpl.java


示例10: getArtifacts

import jetbrains.buildServer.serverSide.artifacts.BuildArtifacts; //导入依赖的package包/类
@NotNull
@Override
public BuildArtifacts getArtifacts(@NotNull BuildArtifactsViewMode buildArtifactsViewMode) {
    return null;
}
 
开发者ID:GoogleCloudPlatform,项目名称:appengine-tck,代码行数:6,代码来源:ReportsMain.java


示例11: collectArtifacts

import jetbrains.buildServer.serverSide.artifacts.BuildArtifacts; //导入依赖的package包/类
/**
 * Method for create collection with any conditions from buildArtifacts object
 *
 * @param buildArtifacts artifacts for creating collection
 * @return list of selected artifacts
 */
@NotNull List<BuildArtifact> collectArtifacts(@NotNull BuildArtifacts buildArtifacts);
 
开发者ID:JetBrains,项目名称:teamcity-torrent-plugin,代码行数:8,代码来源:ArtifactsCollector.java


示例12: addArtifactsToRepositories

import jetbrains.buildServer.serverSide.artifacts.BuildArtifacts; //导入依赖的package包/类
public abstract void addArtifactsToRepositories(SBuild build, BuildArtifacts buildArtifacts); 
开发者ID:tcplugins,项目名称:tcDebRepository,代码行数:2,代码来源:DebRepositoryBuildArtifactsPublisher.java


示例13: removeArtifactsFromRepositories

import jetbrains.buildServer.serverSide.artifacts.BuildArtifacts; //导入依赖的package包/类
public abstract void removeArtifactsFromRepositories(SBuild build, BuildArtifacts buildArtifacts); 
开发者ID:tcplugins,项目名称:tcDebRepository,代码行数:2,代码来源:DebRepositoryBuildArtifactsPublisher.java



注:本文中的jetbrains.buildServer.serverSide.artifacts.BuildArtifacts类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java Task类代码示例发布时间:2022-05-23
下一篇:
Java AclFeatureProto类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap