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

Java SelectPrevBuildPolicy类代码示例

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

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



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

示例1: getLastChange

import jetbrains.buildServer.vcs.SelectPrevBuildPolicy; //导入依赖的package包/类
/**
 * This is a less glorious method than getListFromBuildType() but it's useful when all you need is to find the last
 * change for a build. For that job, calling getListFromBuildType() would be an overkill because
 * 1) it iterates the full history and this is not needed (as explained by JetBrains in
 *    https://devnet.jetbrains.com/message/5561032)
 * 2) it also collects the changeDeltas which is more expensive (it requires that you *finish* the iteration of the
 *    full history - whereas finding the last change can terminate the iteration prematurely)
 * @param build the build for which to find the last change
 * @return the last change that went into the build
 */
static SVcsModification getLastChange(SFinishedBuild build) {
    BuildPromotion buildPromotion = build.getBuildPromotion();
    while (buildPromotion != null && buildPromotion.getContainingChanges().isEmpty())
        buildPromotion = buildPromotion.getPreviousBuildPromotion(SelectPrevBuildPolicy.SINCE_LAST_BUILD);

    if (buildPromotion == null)
        return null;

    return buildPromotion.getContainingChanges().get(0);
}
 
开发者ID:sferencik,项目名称:SinCity,代码行数:21,代码来源:FinishedBuildWithChanges.java


示例2: changesInBuild

import jetbrains.buildServer.vcs.SelectPrevBuildPolicy; //导入依赖的package包/类
@SuppressWarnings("unchecked")
private List<? extends VcsModification> changesInBuild(Optional<? extends Build> latestBuild) {
    if (latestBuild.isPresent()) {
        return latestBuild.get().getChanges(SelectPrevBuildPolicy.SINCE_LAST_SUCCESSFULLY_FINISHED_BUILD, true);
    } else {
        return Lists.newArrayList();
    }
}
 
开发者ID:timomeinen,项目名称:team-piazza,代码行数:9,代码来源:BuildTypeMonitorViewState.java


示例3: getChanges

import jetbrains.buildServer.vcs.SelectPrevBuildPolicy; //导入依赖的package包/类
public List<SVcsModification> getChanges(SelectPrevBuildPolicy arg0,
		boolean arg1) {
	// TODO Auto-generated method stub
	return null;
}
 
开发者ID:spyder007,项目名称:teamcity-msteams-notifier,代码行数:6,代码来源:MockSRunningBuild.java


示例4: getCommitters

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


示例5: getChanges

import jetbrains.buildServer.vcs.SelectPrevBuildPolicy; //导入依赖的package包/类
private List<SVcsModification> getChanges() throws Exception {
    // use a linked set to avoid duplicates and to keep the changes in descending order
    Set<SVcsModification> changeList = new LinkedHashSet<SVcsModification>();
    BuildPromotion buildPromotion = newBuild.getBuildPromotion();

    // find oldBuildchange, the changelist of oldBuild; in the while loop below, reaching oldBuildChange will be our
    // terminating condition
    // NB: oldBuildChange will be null if oldBuild was executed before any VCS was attached to the build
    // configuration; otherwise oldBuild really should have a change associated with it
    SVcsModification oldBuildChange = null;
    if (oldBuild != null) {
        oldBuildChange = FinishedBuildWithChanges.getLastChange(oldBuild);
    }

    while (true) {
        if (oldBuildChange == null) {
            // we are supposed to search all the way to Big Bang
            if (buildPromotion == null) {
                // we have reached Big Bang
                return new ArrayList<SVcsModification>(changeList);
            }
            else {
                // keep going; we haven't reached Big Bang yet
            }
        }
        else {
            // we should only go as far as oldBuildChange
            if (buildPromotion == null) {
                // we have reached Big Bang and never found oldBuildChange
                throw new Exception("Could not find changes between " + oldBuild + " and " + newBuild);
            }
            else if (buildPromotion.getContainingChanges().contains(oldBuildChange)) {
                // we have reached oldBuildChange
                changeList.addAll(buildPromotion.getContainingChanges().subList(0, buildPromotion.getContainingChanges().indexOf(oldBuildChange)));
                return new ArrayList<SVcsModification>(changeList);
            }
            else {
                // keep going; we haven't seen oldBuildChange yet
            }
        }

        Loggers.SERVER.debug("[SinCity] build promotion " + buildPromotion);
        Loggers.SERVER.debug("[SinCity] changes " + buildPromotion.getContainingChanges());
        changeList.addAll(buildPromotion.getContainingChanges());
        buildPromotion = buildPromotion.getPreviousBuildPromotion(SelectPrevBuildPolicy.SINCE_LAST_BUILD);
    }
}
 
开发者ID:sferencik,项目名称:SinCity,代码行数:48,代码来源:CulpritFinder.java


示例6: changesInBuild

import jetbrains.buildServer.vcs.SelectPrevBuildPolicy; //导入依赖的package包/类
@SuppressWarnings("unchecked")
private List<? extends VcsModification> changesInBuild(Build latestBuild) {
    return latestBuild.getChanges(SelectPrevBuildPolicy.SINCE_LAST_SUCCESSFULLY_FINISHED_BUILD, true);
}
 
开发者ID:mironych,项目名称:Team-Piazza,代码行数:5,代码来源:BuildTypeMonitorViewState.java


示例7: getChanges

import jetbrains.buildServer.vcs.SelectPrevBuildPolicy; //导入依赖的package包/类
@NotNull
@Override
public List<SVcsModification> getChanges(SelectPrevBuildPolicy selectPrevBuildPolicy, boolean b) {
    return null;
}
 
开发者ID:GoogleCloudPlatform,项目名称:appengine-tck,代码行数:6,代码来源:ReportsMain.java


示例8: getCommitters

import jetbrains.buildServer.vcs.SelectPrevBuildPolicy; //导入依赖的package包/类
@Override
public UserSet<SUser> getCommitters(SelectPrevBuildPolicy selectPrevBuildPolicy) {
    return null;
}
 
开发者ID:GoogleCloudPlatform,项目名称:appengine-tck,代码行数:5,代码来源:ReportsMain.java


示例9: getBuildChanges

import jetbrains.buildServer.vcs.SelectPrevBuildPolicy; //导入依赖的package包/类
public List<SVcsModification> getBuildChanges() {
    buildInfo.getChanges(SelectPrevBuildPolicy.SINCE_LAST_BUILD, true);
    return buildInfo.getContainingChanges();
}
 
开发者ID:trevleyb,项目名称:TeamCityRallyIntegration,代码行数:5,代码来源:RallyBuild.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
Java DefaultOutputPort类代码示例发布时间:2022-05-23
下一篇:
Java IShapedCraftingRecipeWrapper类代码示例发布时间: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