@Override protected MatrixRun newBuild() throws IOException { // for every MatrixRun there should be a parent MatrixBuild MatrixBuild lb = getParent().getLastBuild(); MatrixRun lastBuild = new MatrixRun(this, lb.getTimestamp()); lastBuild.number = lb.getNumber(); builds.put(lastBuild); return lastBuild; }
@Override protected MatrixRun newBuild() throws IOException { // for every MatrixRun there should be a parent MatrixBuild MatrixBuild lb = getParent().getLastBuild(); MatrixRun lastBuild = new MatrixRun(this, lb.getTimestamp()); lastBuild.number = lb.getNumber(); builds.put(lastBuild); return lastBuild; }
@Override protected MatrixRun newBuild() throws IOException { // for every MatrixRun there should be a parent MatrixBuild MatrixBuild lb = getParent().getLastBuild(); MatrixRun lastBuild = new MatrixRun(this, lb.getTimestamp()); lastBuild.number = lb.getNumber(); builds.put(lastBuild); return lastBuild; }
@Override protected MatrixRun newBuild() throws IOException { // for every MatrixRun there should be a parent MatrixBuild MatrixBuild lb = getParent().getLastBuild(); MatrixRun lastBuild = new MatrixRun(this, lb.getTimestamp()); lastBuild.number = lb.getNumber(); builds.put(lastBuild); return lastBuild; }
/** * Build numbers are always synchronized with the parent. * * <p> Computing this is bit tricky. Several considerations: * * <ol> <li>A new configuration build #N is started while the parent build * #N is building, and when that happens we want to return N. <li>But the * configuration build #N is done before the parent build #N finishes, and * when that happens we want to return N+1 because that's going to be the * next one. <li>Configuration builds might skip some numbers if the parent * build is aborted before this configuration is built. <li>If nothing is * building right now and the last build of the parent is #N, then we want * to return N+1. </ol> */ @Override public int getNextBuildNumber() { AbstractBuild lb = getParent().getLastBuild(); if (lb == null) { return 0; } int n = lb.getNumber(); if (!lb.isBuilding()) { n++; } lb = getLastBuild(); if (lb != null) { n = Math.max(n, lb.getNumber() + 1); } return n; }
/** * Build numbers are always synchronized with the parent. * * <p> * Computing this is bit tricky. Several considerations: * * <ol> * <li>A new configuration build #N is started while the parent build #N is building, * and when that happens we want to return N. * <li>But the configuration build #N is done before the parent build #N finishes, * and when that happens we want to return N+1 because that's going to be the next one. * <li>Configuration builds might skip some numbers if the parent build is aborted * before this configuration is built. * <li>If nothing is building right now and the last build of the parent is #N, * then we want to return N+1. * </ol> */ @Override public int getNextBuildNumber() { AbstractBuild lb = getParent().getLastBuild(); if(lb==null) return 0; int n=lb.getNumber(); if(!lb.isBuilding()) n++; lb = getLastBuild(); if(lb!=null) n = Math.max(n,lb.getNumber()+1); return n; }
/** * Build numbers are always synchronized with the parent. * * <p> * Computing this is bit tricky. Several considerations: * * <ol> * <li>A new configuration build #N is started while the parent build #N is building, * and when that happens we want to return N. * <li>But the configuration build #N is done before the parent build #N finishes, * and when that happens we want to return N+1 because that's going to be the next one. * <li>Configuration builds might skip some numbers if the parent build is aborted * before this configuration is built. * <li>If nothing is building right now and the last build of the parent is #N, * then we want to return N+1. * </ol> */ @Override public int getNextBuildNumber() { AbstractBuild lb = getParent().getLastBuild(); if(lb==null) return 0; int n=lb.getNumber(); if(!lb.isBuilding()) n++; lb = getLastBuild(); if(lb!=null) n = Math.max(n,lb.getNumber()+1); return n; }
/** * Build numbers are always synchronized with the parent. * * <p> * Computing this is bit tricky. Several considerations: * * <ol> * <li>A new configuration build #N is started while the parent build #N is building, * and when that happens we want to return N. * <li>But the configuration build #N is done before the parent build #N finishes, * and when that happens we want to return N+1 because that's going to be the next one. * <li>Configuration builds might skip some numbers if the parent build is aborted * before this configuration is built. * <li>If nothing is building right now and the last build of the parent is #N, * then we want to return N+1. * </ol> */ @Override public int getNextBuildNumber() { AbstractBuild lb = getParent().getLastBuild(); if(lb==null) return 0; int n=lb.getNumber(); if(!lb.isBuilding()) n++; lb = getLastBuild(); if(lb!=null) n = Math.max(n,lb.getNumber()+1); return n; }
lb = getParent().getLastBuild(); if (lb == null) { LOGGER.log(Level.WARNING, "cannot start a build of {0} since its parent has no builds at all", getFullName());