public String getDisplayName() { Set<SCMDescriptor<?>> descriptors = new HashSet<SCMDescriptor<?>>(); for (SCM scm : job().getSCMs()) { descriptors.add(scm.getDescriptor()); } return descriptors.size() == 1 ? Messages.SCMTrigger_getDisplayName(descriptors.iterator().next().getDisplayName()) : Messages.SCMTrigger_BuildAction_DisplayName(); }
public RepositoryBrowser get() { if (cacheGeneration == -1) { return cache; } SCMDescriptor<?> d = owner.getDescriptor(); RepositoryBrowser<?> dflt = owner.guessBrowser(); if (dflt != null) { cache = dflt; cacheGeneration = -1; return cache; } int g = d.generation; if(g!=cacheGeneration) { cacheGeneration = g; cache = infer(); } return cache; }
/** * Picks up a {@link RepositoryBrowser} that matches the * given {@link SCM} from existing other jobs. * * @return * null if no applicable configuration was found. */ private RepositoryBrowser infer() { for( AbstractProject p : Jenkins.getInstance().allItems(AbstractProject.class) ) { SCM scm = p.getScm(); if (scm!=null && scm.getClass()==owner.getClass() && scm.getBrowser()!=null && ((SCMDescriptor)scm.getDescriptor()).isBrowserReusable(scm,owner)) { return scm.getBrowser(); } } return null; } }
/** * Parses {@link SCM} configuration from the submitted form. * * @param target * The project for which this SCM is configured to. */ @SuppressWarnings("deprecation") public static SCM parseSCM(StaplerRequest req, AbstractProject target) throws FormException, ServletException { SCM scm = SCM.all().newInstanceFromRadioList(req.getSubmittedForm().getJSONObject("scm")); if (scm == null) { scm = new NullSCM(); // JENKINS-36043 workaround for AbstractMultiBranchProject.submit } scm.getDescriptor().generation++; return scm; }
List<String> scmNames = new ArrayList<>(); for (SCM s : scmItem.getSCMs()) { scmNames.add(s.getDescriptor().getDisplayName());
@Override public DescriptorImpl getDescriptor() { return (DescriptorImpl)super.getDescriptor(); }
@Override public DescriptorImpl getDescriptor() { return (DescriptorImpl) super.getDescriptor(); }
@Override public DescriptorImpl getDescriptor() { return (DescriptorImpl) super.getDescriptor(); }
@Override public DescriptorImpl getDescriptor() { return (DescriptorImpl) super.getDescriptor(); }
@Override public DescriptorImpl getDescriptor() { return (DescriptorImpl) super.getDescriptor(); }
@Override public DescriptorImpl getDescriptor() { return (DescriptorImpl) super.getDescriptor(); }
@Override public DescriptorImpl getDescriptor() { return (DescriptorImpl)super.getDescriptor(); }
@Override public DescriptorImpl getDescriptor() { return (DescriptorImpl) super.getDescriptor(); }
public @CheckForNull SCM getTypicalSCM() { SCM typical = null; for (SCM scm : getSCMs()) { if (typical == null) { typical = scm; } else if (typical.getDescriptor() != scm.getDescriptor()) { return null; } } return typical; }
public RepositoryBrowser get() { int g = owner.getDescriptor().generation; if (g != cacheGeneration) { cacheGeneration = g; cache = infer(); } return cache; }
public RepositoryBrowser get() { int g = owner.getDescriptor().generation; if(g!=cacheGeneration) { cacheGeneration = g; cache = infer(); } return cache; }
public RepositoryBrowser get() { int g = owner.getDescriptor().generation; if(g!=cacheGeneration) { cacheGeneration = g; cache = infer(); } return cache; }
public RepositoryBrowser get() { int g = owner.getDescriptor().generation; if(g!=cacheGeneration) { cacheGeneration = g; cache = infer(); } return cache; }
public String getDisplayName() { Set<SCMDescriptor<?>> descriptors = new HashSet<SCMDescriptor<?>>(); for (SCM scm : job().getSCMs()) { descriptors.add(scm.getDescriptor()); } return descriptors.size() == 1 ? Messages.SCMTrigger_getDisplayName(descriptors.iterator().next().getDisplayName()) : Messages.SCMTrigger_BuildAction_DisplayName(); }
@Override public SCMDescriptor<?> getDescriptor() { initPython(); if (pexec.isImplemented(13)) { return (SCMDescriptor) pexec.execPython("get_descriptor"); } else { return super.getDescriptor(); } }