public RangeSet getRangeSet(Job job) { return getRangeSet(job.getFullName()); }
/** * Gets the dependency relationship from this build (as the sink) * and that project (as the source.) * * @return * Build number of the upstream build that feed into this build, * or -1 if no record is available (for example if there is no {@link FingerprintAction}, even if there is an {@link Cause.UpstreamCause}). */ public int getUpstreamRelationship(AbstractProject that) { FingerprintAction f = getAction(FingerprintAction.class); if (f==null) return -1; int n = -1; // look for fingerprints that point to the given project as the source, and merge them all for (Fingerprint e : f.getFingerprints().values()) { if (upstreamCulprits) { // With upstreamCulprits, we allow upstream relationships // from intermediate jobs Fingerprint.RangeSet rangeset = e.getRangeSet(that); if (!rangeset.isEmpty()) { n = Math.max(n, rangeset.listNumbersReverse().iterator().next()); } } else { BuildPtr o = e.getOriginal(); if (o!=null && o.belongsTo(that)) n = Math.max(n,o.getNumber()); } } return n; }
/** * Gets the dependency relationship from this build (as the source) * and that project (as the sink.) * * @return * range of build numbers that represent which downstream builds are using this build. * The range will be empty if no build of that project matches this (or there is no {@link FingerprintAction}), but it'll never be null. */ public RangeSet getDownstreamRelationship(AbstractProject that) { RangeSet rs = new RangeSet(); FingerprintAction f = getAction(FingerprintAction.class); if (f==null) return rs; // look for fingerprints that point to this build as the source, and merge them all for (Fingerprint e : f.getFingerprints().values()) { if (upstreamCulprits) { // With upstreamCulprits, we allow downstream relationships // from intermediate jobs rs.add(e.getRangeSet(that)); } else { BuildPtr o = e.getOriginal(); if (o!=null && o.is(this)) rs.add(e.getRangeSet(that)); } } return rs; }
public RangeSet getRangeSet(Job job) { return getRangeSet(job.getFullName()); }
public RangeSet getRangeSet(Job job) { return getRangeSet(job.getFullName()); }
public RangeSet getRangeSet(Job job) { return getRangeSet(job.getFullName()); }
public RangeSet getRangeSet(Job job) { return getRangeSet(job.getFullName()); }
public RangeSet getRangeSet(Job job) { return getRangeSet(job.getFullName()); }
/** * Gets the dependency relationship from this build (as the sink) * and that project (as the source.) * * @return * Build number of the upstream build that feed into this build, * or -1 if no record is available. */ public int getUpstreamRelationship(AbstractProject that) { FingerprintAction f = getAction(FingerprintAction.class); if (f==null) return -1; int n = -1; // look for fingerprints that point to the given project as the source, and merge them all for (Fingerprint e : f.getFingerprints().values()) { if (upstreamCulprits) { // With upstreamCulprits, we allow upstream relationships // from intermediate jobs Fingerprint.RangeSet rangeset = e.getRangeSet(that); if (!rangeset.isEmpty()) { n = Math.max(n, rangeset.listNumbersReverse().iterator().next()); } } else { BuildPtr o = e.getOriginal(); if (o!=null && o.belongsTo(that)) n = Math.max(n,o.getNumber()); } } return n; }
/** * Gets the dependency relationship from this build (as the sink) * and that project (as the source.) * * @return * Build number of the upstream build that feed into this build, * or -1 if no record is available. */ public int getUpstreamRelationship(AbstractProject that) { FingerprintAction f = getAction(FingerprintAction.class); if (f==null) return -1; int n = -1; // look for fingerprints that point to the given project as the source, and merge them all for (Fingerprint e : f.getFingerprints().values()) { if (upstreamCulprits) { // With upstreamCulprits, we allow upstream relationships // from intermediate jobs Fingerprint.RangeSet rangeset = e.getRangeSet(that); if (!rangeset.isEmpty()) { n = Math.max(n, rangeset.listNumbersReverse().iterator().next()); } } else { BuildPtr o = e.getOriginal(); if (o!=null && o.belongsTo(that)) n = Math.max(n,o.getNumber()); } } return n; }
/** * Gets the dependency relationship from this build (as the source) * and that project (as the sink.) * * @return * range of build numbers that represent which downstream builds are using this build. * The range will be empty if no build of that project matches this (or there is no {@link FingerprintAction}), but it'll never be null. */ public RangeSet getDownstreamRelationship(AbstractProject that) { RangeSet rs = new RangeSet(); FingerprintAction f = getAction(FingerprintAction.class); if (f==null) return rs; // look for fingerprints that point to this build as the source, and merge them all for (Fingerprint e : f.getFingerprints().values()) { if (upstreamCulprits) { // With upstreamCulprits, we allow downstream relationships // from intermediate jobs rs.add(e.getRangeSet(that)); } else { BuildPtr o = e.getOriginal(); if (o!=null && o.is(this)) rs.add(e.getRangeSet(that)); } } return rs; }
/** * Gets the dependency relationship from this build (as the source) * and that project (as the sink.) * * @return * range of build numbers that represent which downstream builds are using this build. * The range will be empty if no build of that project matches this, but it'll never be null. */ public RangeSet getDownstreamRelationship(AbstractProject that) { RangeSet rs = new RangeSet(); FingerprintAction f = getAction(FingerprintAction.class); if (f==null) return rs; // look for fingerprints that point to this build as the source, and merge them all for (Fingerprint e : f.getFingerprints().values()) { if (upstreamCulprits) { // With upstreamCulprits, we allow downstream relationships // from intermediate jobs rs.add(e.getRangeSet(that)); } else { BuildPtr o = e.getOriginal(); if (o!=null && o.is(this)) rs.add(e.getRangeSet(that)); } } return rs; }
Fingerprint.RangeSet rangeset = e.getRangeSet(that); if (!rangeset.isEmpty()) { n = Math.max(n, rangeset.listNumbersReverse().iterator().next());
/** * Gets the dependency relationship from this build (as the sink) * and that project (as the source.) * * @return * Build number of the upstream build that feed into this build, * or -1 if no record is available (for example if there is no {@link FingerprintAction}, even if there is an {@link Cause.UpstreamCause}). */ public int getUpstreamRelationship(AbstractProject that) { FingerprintAction f = getAction(FingerprintAction.class); if (f==null) return -1; int n = -1; // look for fingerprints that point to the given project as the source, and merge them all for (Fingerprint e : f.getFingerprints().values()) { if (upstreamCulprits) { // With upstreamCulprits, we allow upstream relationships // from intermediate jobs Fingerprint.RangeSet rangeset = e.getRangeSet(that); if (!rangeset.isEmpty()) { n = Math.max(n, rangeset.listNumbersReverse().iterator().next()); } } else { BuildPtr o = e.getOriginal(); if (o!=null && o.belongsTo(that)) n = Math.max(n,o.getNumber()); } } return n; }
/** * Gets the dependency relationship from this build (as the sink) * and that project (as the source.) * * @return * Build number of the upstream build that feed into this build, * or -1 if no record is available. */ public int getUpstreamRelationship(AbstractProject that) { FingerprintAction f = getAction(FingerprintAction.class); if (f==null) return -1; int n = -1; // look for fingerprints that point to the given project as the source, and merge them all for (Fingerprint e : f.getFingerprints().values()) { if (upstreamCulprits) { // With upstreamCulprits, we allow upstream relationships // from intermediate jobs Fingerprint.RangeSet rangeset = e.getRangeSet(that); if (!rangeset.isEmpty()) { n = Math.max(n, rangeset.listNumbersReverse().iterator().next()); } } else { BuildPtr o = e.getOriginal(); if (o!=null && o.belongsTo(that)) n = Math.max(n,o.getNumber()); } } return n; }
/** * Gets the dependency relationship from this build (as the source) * and that project (as the sink.) * * @return * range of build numbers that represent which downstream builds are using this build. * The range will be empty if no build of that project matches this, but it'll never be null. */ public RangeSet getDownstreamRelationship(AbstractProject that) { RangeSet rs = new RangeSet(); FingerprintAction f = getAction(FingerprintAction.class); if (f==null) return rs; // look for fingerprints that point to this build as the source, and merge them all for (Fingerprint e : f.getFingerprints().values()) { if (upstreamCulprits) { // With upstreamCulprits, we allow downstream relationships // from intermediate jobs rs.add(e.getRangeSet(that)); } else { BuildPtr o = e.getOriginal(); if (o!=null && o.is(this)) rs.add(e.getRangeSet(that)); } } return rs; }
/** * Gets the dependency relationship from this build (as the source) * and that project (as the sink.) * * @return * range of build numbers that represent which downstream builds are using this build. * The range will be empty if no build of that project matches this, but it'll never be null. */ public RangeSet getDownstreamRelationship(AbstractProject that) { RangeSet rs = new RangeSet(); FingerprintAction f = getAction(FingerprintAction.class); if (f==null) return rs; // look for fingerprints that point to this build as the source, and merge them all for (Fingerprint e : f.getFingerprints().values()) { if (upstreamCulprits) { // With upstreamCulprits, we allow downstream relationships // from intermediate jobs rs.add(e.getRangeSet(that)); } else { BuildPtr o = e.getOriginal(); if (o!=null && o.is(this)) rs.add(e.getRangeSet(that)); } } return rs; }
/** * Gets the dependency relationship from this build (as the source) and that * project (as the sink.) * * @return range of build numbers that represent which downstream builds are * using this build. The range will be empty if no build of that project * matches this, but it'll never be null. */ public RangeSet getDownstreamRelationship(AbstractProject that) { RangeSet rs = new RangeSet(); FingerprintAction f = getAction(FingerprintAction.class); if (f == null) { return rs; } // look for fingerprints that point to this build as the source, and merge them all for (Fingerprint e : f.getFingerprints().values()) { if (upstreamCulprits) { // With upstreamCulprits, we allow downstream relationships // from intermediate jobs rs.add(e.getRangeSet(that)); } else { BuildPtr o = e.getOriginal(); if (o != null && o.is(this)) { rs.add(e.getRangeSet(that)); } } } return rs; }