当前位置: 首页>>代码示例>>Java>>正文


Java Queue.Task方法代码示例

本文整理汇总了Java中hudson.model.Queue.Task方法的典型用法代码示例。如果您正苦于以下问题:Java Queue.Task方法的具体用法?Java Queue.Task怎么用?Java Queue.Task使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在hudson.model.Queue的用法示例。


在下文中一共展示了Queue.Task方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: isUpstreamBuildVisibleByDownstreamBuildAuth

import hudson.model.Queue; //导入方法依赖的package包/类
protected boolean isUpstreamBuildVisibleByDownstreamBuildAuth(@Nonnull WorkflowJob upstreamPipeline, @Nonnull Queue.Task downstreamPipeline) {
    Authentication auth = Tasks.getAuthenticationOf(downstreamPipeline);
    Authentication downstreamPipelineAuth;
    if (auth.equals(ACL.SYSTEM) && !QueueItemAuthenticatorConfiguration.get().getAuthenticators().isEmpty()) {
        downstreamPipelineAuth = Jenkins.ANONYMOUS; // cf. BuildTrigger
    } else {
        downstreamPipelineAuth = auth;
    }

    try (ACLContext _ = ACL.as(downstreamPipelineAuth)) {
        WorkflowJob upstreamPipelineObtainedAsImpersonated = Jenkins.getInstance().getItemByFullName(upstreamPipeline.getFullName(), WorkflowJob.class);
        boolean result = upstreamPipelineObtainedAsImpersonated != null;
        LOGGER.log(Level.FINE, "isUpstreamBuildVisibleByDownstreamBuildAuth({0}, {1}): taskAuth: {2}, downstreamPipelineAuth: {3}, upstreamPipelineObtainedAsImpersonated:{4}, result: {5}",
                new Object[]{upstreamPipeline, downstreamPipeline, auth, downstreamPipelineAuth, upstreamPipelineObtainedAsImpersonated, result});
        return result;
    }
}
 
开发者ID:jenkinsci,项目名称:pipeline-maven-plugin,代码行数:18,代码来源:DownstreamPipelineTriggerRunListener.java

示例2: taskCompleted

import hudson.model.Queue; //导入方法依赖的package包/类
@Override
public void taskCompleted(Executor executor, Queue.Task task, long durationMS) {
    LOG.debug("Computer {} taskCompleted", this);

    // May take the slave offline and remove it, in which case getNode()
    // above would return null and we'd not find our DockerSlave anymore.
    super.taskCompleted(executor, task, durationMS);
}
 
开发者ID:KostyaSha,项目名称:yet-another-docker-plugin,代码行数:9,代码来源:DockerComputer.java

示例3: taskCompleted

import hudson.model.Queue; //导入方法依赖的package包/类
@Override
public void taskCompleted(Executor executor, Queue.Task task, long durationMS) {
    LOGGER.log(Level.FINE, " Computer " + this + " taskCompleted");

    // May take the agent offline and remove it, in which case getNode()
    // above would return null and we'd not find our DockerSlave anymore.
    super.taskCompleted(executor, task, durationMS);
}
 
开发者ID:carlossg,项目名称:jenkins-kubernetes-plugin,代码行数:9,代码来源:KubernetesComputer.java

示例4: map

import hudson.model.Queue; //导入方法依赖的package包/类
@Override
public MappingWorksheet.Mapping map(Queue.Task task, MappingWorksheet worksheet) {
    LOG.log(FINER, "map({0}, {1}])", new Object[]{task.getFullDisplayName(), worksheet.works.size()});

    if (task instanceof AbstractProject) {
        return map((AbstractProject) task, worksheet);
    } else {
        return _fallback.map(task, worksheet);
    }
}
 
开发者ID:dump247,项目名称:jenkins-docker-build-plugin,代码行数:11,代码来源:DockerJobLoadBalancer.java

示例5: shouldSchedule

import hudson.model.Queue; //导入方法依赖的package包/类
@Override
public boolean shouldSchedule(Queue.Task p, List<Action> actions) {
    JenkinsMetricProviderImpl instance = instance();
    if (instance != null && instance.jenkinsJobScheduleRate != null) {
        instance.jenkinsJobScheduleRate.mark();
    }
    return true;
}
 
开发者ID:jenkinsci,项目名称:metrics-plugin,代码行数:9,代码来源:JenkinsMetricProviderImpl.java

示例6: taskAccepted

import hudson.model.Queue; //导入方法依赖的package包/类
@Override
public void taskAccepted(Executor executor, Queue.Task task) {
    super.taskAccepted(executor, task);
    LOGGER.log(Level.INFO, " Computer " + this + ": task accepted");
}
 
开发者ID:iverberk,项目名称:jenkins-nomad,代码行数:6,代码来源:NomadComputer.java

示例7: taskCompleted

import hudson.model.Queue; //导入方法依赖的package包/类
@Override
public void taskCompleted(Executor executor, Queue.Task task, long durationMS) {
    super.taskCompleted(executor, task, durationMS);
    LOGGER.log(Level.INFO, " Computer " + this + ": task completed");
}
 
开发者ID:iverberk,项目名称:jenkins-nomad,代码行数:6,代码来源:NomadComputer.java

示例8: taskCompletedWithProblems

import hudson.model.Queue; //导入方法依赖的package包/类
@Override
public void taskCompletedWithProblems(Executor executor, Queue.Task task, long durationMS, Throwable problems) {
    super.taskCompletedWithProblems(executor, task, durationMS, problems);
    LOGGER.log(Level.WARNING, " Computer " + this + " task completed with problems");
}
 
开发者ID:iverberk,项目名称:jenkins-nomad,代码行数:6,代码来源:NomadComputer.java

示例9: shouldSchedule

import hudson.model.Queue; //导入方法依赖的package包/类
@Override
public boolean shouldSchedule(Queue.Task p, List<Action> actions) {
    if (p instanceof WorkflowJob && !isOpenShiftBuildCause(actions)) {
        WorkflowJob wj = (WorkflowJob) p;
        BuildConfigProjectProperty buildConfigProjectProperty = wj
                .getProperty(BuildConfigProjectProperty.class);
        if (buildConfigProjectProperty != null
                && StringUtils.isNotBlank(buildConfigProjectProperty
                        .getNamespace())
                && StringUtils.isNotBlank(buildConfigProjectProperty
                        .getName())) {

            String namespace = buildConfigProjectProperty.getNamespace();
            String jobURL = joinPaths(
                    getJenkinsURL(getAuthenticatedOpenShiftClient(),
                            namespace), wj.getUrl());

            Build ret = getAuthenticatedOpenShiftClient()
                    .buildConfigs()
                    .inNamespace(namespace)
                    .withName(buildConfigProjectProperty.getName())
                    .instantiate(
                            new BuildRequestBuilder()
                                    .withNewMetadata()
                                    .withName(
                                            buildConfigProjectProperty
                                                    .getName())
                                    .and()
                                    .addNewTriggeredBy()
                                    .withMessage(
                                            "Triggered by Jenkins job at "
                                                    + jobURL).and().build());

            ParametersAction params = dumpParams(actions);
            if (LOGGER.isLoggable(Level.FINE)) {
                LOGGER.fine("ParametersAction: " + params.toString());
            }
            if (params != null && ret != null)
                BuildToActionMapper.addParameterAction(ret.getMetadata()
                        .getName(), params);

            CauseAction cause = dumpCause(actions);
            if (LOGGER.isLoggable(Level.FINE)) {
                LOGGER.fine("get CauseAction: " + cause.getDisplayName());
                for (Cause c : cause.getCauses()) {
                    LOGGER.fine("Cause: " + c.getShortDescription());
                }
            }
            if (cause != null && ret != null)
                BuildToActionMapper.addCauseAction(ret.getMetadata()
                        .getName(), cause);

            return false;
        }
    }

    return true;
}
 
开发者ID:jenkinsci,项目名称:openshift-sync-plugin,代码行数:59,代码来源:BuildDecisionHandler.java

示例10: taskAccepted

import hudson.model.Queue; //导入方法依赖的package包/类
@Override
public void taskAccepted(Executor executor, Queue.Task task) {
    super.taskAccepted(executor, task);
    LOG.debug("Computer {} taskAccepted", this);
}
 
开发者ID:KostyaSha,项目名称:yet-another-docker-plugin,代码行数:6,代码来源:DockerComputer.java

示例11: taskCompletedWithProblems

import hudson.model.Queue; //导入方法依赖的package包/类
@Override
public void taskCompletedWithProblems(Executor executor, Queue.Task task, long durationMS, Throwable problems) {
    LOG.debug("Computer {} taskCompletedWithProblems", this);
    super.taskCompletedWithProblems(executor, task, durationMS, problems);
}
 
开发者ID:KostyaSha,项目名称:yet-another-docker-plugin,代码行数:6,代码来源:DockerComputer.java

示例12: taskAccepted

import hudson.model.Queue; //导入方法依赖的package包/类
@Override
public void taskAccepted(Executor executor, Queue.Task task) {
}
 
开发者ID:KostyaSha,项目名称:yet-another-docker-plugin,代码行数:4,代码来源:DockerOnceRetentionStrategy.java

示例13: taskCompleted

import hudson.model.Queue; //导入方法依赖的package包/类
@Override
public void taskCompleted(Executor executor, Queue.Task task, long durationMS) {
    done(executor);
}
 
开发者ID:KostyaSha,项目名称:yet-another-docker-plugin,代码行数:5,代码来源:DockerOnceRetentionStrategy.java

示例14: taskCompletedWithProblems

import hudson.model.Queue; //导入方法依赖的package包/类
@Override
public void taskCompletedWithProblems(Executor executor, Queue.Task task, long durationMS, Throwable problems) {
    done(executor);
}
 
开发者ID:KostyaSha,项目名称:yet-another-docker-plugin,代码行数:5,代码来源:DockerOnceRetentionStrategy.java

示例15: taskAccepted

import hudson.model.Queue; //导入方法依赖的package包/类
@Override
public void taskAccepted(Executor executor, Queue.Task task) {
    super.taskAccepted(executor, task);
    LOGGER.fine(" Computer " + this + " taskAccepted");
}
 
开发者ID:carlossg,项目名称:jenkins-kubernetes-plugin,代码行数:6,代码来源:KubernetesComputer.java


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