Package hudson.model

Examples of hudson.model.Run$Runner$CheckpointSet


            String parentJobName = (String)bpObj;
            int buildNum = ((Integer)bnObj).intValue();
            TopLevelItem it = Jenkins.getInstance().getItem(parentJobName);
            if (it instanceof Project){
              parentProj = (Project)it;
              Run build = parentProj.getLastBuild();
              if (build != null){
                if (build.getNumber() == buildNum){
                  buildNum = buildNum;
                  log = BuildLoggerMap.get(parentJobName,buildNum);
                }
              }
            }
View Full Code Here


    public Collection<Run> getCoverageRuns() {
        LinkedList<Run> allResults = new LinkedList<Run>();

        for (Job job : getDashboard().getJobs()) {
            // Find the latest successful coverage data
            Run run = job.getLastSuccessfulBuild();
            if (run == null) {
                continue;
            }

            CoberturaBuildAction rbb = run
                    .getAction(CoberturaBuildAction.class);

            if (rbb != null) {
                allResults.add(run);
            }
View Full Code Here

    public HashMap<CoverageMetric, Ratio> getTotalCoverageRatio() {
        HashMap<CoverageMetric, Ratio> totalRatioMap = new HashMap<CoverageMetric, Ratio>();
        for (Job job : getDashboard().getJobs()) {
            // Find the latest successful coverage data
            Run run = job.getLastSuccessfulBuild();
            if (run == null) {
                continue;
            }

            CoberturaBuildAction rbb = run
                    .getAction(CoberturaBuildAction.class);

            if (rbb == null) {
                continue;
            }
View Full Code Here

    /**
     * Performs an installation.
     */
    private int install(ToolInstallation t, BuildIDs id, AbstractProject p) throws IOException, InterruptedException {

        Run b = p.getBuildByNumber(Integer.parseInt(id.number));
        if (b==null)
            throw new AbortException("No such build: "+id.number);

        Executor exec = b.getExecutor();
        if (exec==null)
            throw new AbortException(b.getFullDisplayName()+" is not building");

        Node node = exec.getOwner().getNode();

        if (t instanceof NodeSpecific) {
            NodeSpecific n = (NodeSpecific) t;
View Full Code Here

        return "Sets the result of the current build. Works only if invoked from within a build.";
    }

    @Override
    protected int run() throws Exception {
        Run r = getCurrentlyBuilding();
        r.getParent().checkPermission(Item.BUILD);
        r.setResult(result);
        return 0;
    }
View Full Code Here

   
    @Argument(metaVar="DESCRIPTION",required=true,usage="Description to be set. '=' to read from stdin.", index=2)
    public String description;

    protected int run() throws Exception {
      Run run = job.getBuildByNumber(number);
        run.checkPermission(Run.UPDATE);

        if ("=".equals(description)) {
          description = channel.call(new Callable<String,IOException>() {
        public String call() throws IOException {
          return IOUtils.toString(System.in);
        }
          });
        }
       
        run.setDescription(description);
       
        return 0;
    }
View Full Code Here

        public Map<String,String> getRecords() {
            return record;
        }

        public void onLoad() {
            Run pb = build.getPreviousBuild();
            if (pb!=null) {
                FingerprintAction a = pb.getAction(FingerprintAction.class);
                if (a!=null)
                    compact(a);
            }
        }
View Full Code Here

    public void perform(Job<?, ?> job) throws IOException, InterruptedException {
        LOGGER.log(FINE, "Running the log rotation for " + job.getFullDisplayName());

        // keep the last successful build regardless of the status
        Run lsb = job.getLastSuccessfulBuild();
        Run lstb = job.getLastStableBuild();

        List<? extends Run<?, ?>> builds = job.getBuilds();
        Calendar cal = null;
        //Delete builds
        if (-1 != numToKeep || -1 != daysToKeep) {
View Full Code Here

        if (j!=null) {
            Item job = Hudson.getInstance().getItemByFullName(j);
            binding.setProperty("currentJob", job);
            String b = getClientEnvironmentVariable("BUILD_NUMBER");
            if (b!=null && job instanceof AbstractProject) {
                Run r = ((AbstractProject) job).getBuildByNumber(Integer.parseInt(b));
                binding.setProperty("currentBuild", r);
            }
        }

        GroovyShell groovy = new GroovyShell(binding);
View Full Code Here

            Job j = Hudson.getInstance().getItemByFullName(envs[0],Job.class);
            if (j==null)    throw new CmdLineException("No such job: "+envs[0]);

            try {
                Run r = j.getBuildByNumber(Integer.parseInt(envs[1]));
                if (r==null)    throw new CmdLineException("No such build #"+envs[1]+" in "+envs[0]);
                return r;
            } catch (NumberFormatException e) {
                throw new CmdLineException("Invalid build number: "+envs[1]);
            }
View Full Code Here

TOP

Related Classes of hudson.model.Run$Runner$CheckpointSet

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.