/** * 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; }
@Override public void checkout(Run<?,?> build, Launcher launcher, FilePath workspace, TaskListener listener, File changelogFile, SCMRevisionState baseline) throws IOException, InterruptedException { if (changelogFile != null) { createEmptyChangeLog(changelogFile, listener, "log"); } }
@Override public void onLoad(ItemGroup<? extends Item> parent, String name) throws IOException { super.onLoad(parent, name); if (buildMixIn == null) { buildMixIn = createBuildMixIn(); } buildMixIn.onLoad(parent, name); builds = buildMixIn.getRunMap(); triggers().setOwner(this); for (Trigger t : triggers()) { try { t.start(this, Items.currentlyUpdatingByXml()); } catch (Throwable e) { LOGGER.log(Level.WARNING, "could not start trigger while loading project '" + getFullName() + "'", e); } } if(scm==null) scm = new NullSCM(); // perhaps it was pointing to a plugin that no longer exists. if(transientActions==null) transientActions = new Vector<Action>(); // happens when loaded from disk updateTransientActions(); }
@Override public void checkout(Run<?,?> build, Launcher launcher, FilePath workspace, TaskListener listener, File changelogFile, SCMRevisionState baseline) throws IOException, InterruptedException { if (changelogFile != null) { createEmptyChangeLog(changelogFile, listener, "log"); } }
/** * {@inheritDoc} */ @Override public SCM getDefaultValue() { return new NullSCM(); }
public boolean checkout(AbstractBuild<?,?> build, Launcher launcher, FilePath remoteDir, BuildListener listener, File changeLogFile) throws IOException, InterruptedException { return createEmptyChangeLog(changeLogFile, listener, "log"); }
/** * {@inheritDoc} */ @Override public SCM getDefaultValue() { return new NullSCM(); }
public boolean checkout(AbstractBuild<?, ?> build, Launcher launcher, FilePath remoteDir, BuildListener listener, File changeLogFile) throws IOException, InterruptedException { return createEmptyChangeLog(changeLogFile, listener, "log"); }
@Override public SCM newInstance(StaplerRequest req, JSONObject formData) throws FormException { return new NullSCM(); } }
public boolean checkout(AbstractBuild<?,?> build, Launcher launcher, FilePath remoteDir, BuildListener listener, File changeLogFile) throws IOException, InterruptedException { return createEmptyChangeLog(changeLogFile, listener, "log"); }
/** * {@inheritDoc} */ @Override public SCM getDefaultValue() { return new NullSCM(); }
public boolean checkout(AbstractBuild<?,?> build, Launcher launcher, FilePath remoteDir, BuildListener listener, File changeLogFile) throws IOException, InterruptedException { return createEmptyChangeLog(changeLogFile, listener, "log"); }
@Override public SCM newInstance(StaplerRequest req, JSONObject formData) throws FormException { return new NullSCM(); } }
/** * {@inheritDoc} */ @Override public SCM getDefaultValue() { return new NullSCM(); }
@Override public SCM newInstance(StaplerRequest req, JSONObject formData) throws FormException { return new NullSCM(); } }
@Override public SCM newInstance(StaplerRequest req, JSONObject formData) throws FormException { return new NullSCM(); } }
@Override protected SCM reduceFromFullInheritance(Deque<SCM> list) { if (list == null || list.isEmpty()) { return new NullSCM(); } //Return the SCM that was defined last and is not a NullSCM Iterator<SCM> iter = list.descendingIterator(); while (iter.hasNext()) { SCM scm = iter.next(); if (scm != null && !(scm instanceof NullSCM)) { return scm; } } //All SCMs are NullSCMs; so it does not matter which one to return return list.peekLast(); } };
@Override protected SCM reduceFromFullInheritance(Deque<SCM> list) { if (list == null || list.isEmpty()) { return new NullSCM(); } //Return the SCM that was defined last and is not a NullSCM Iterator<SCM> iter = list.descendingIterator(); while (iter.hasNext()) { SCM scm = iter.next(); if (scm != null && !(scm instanceof NullSCM)) { return scm; } } //All SCMs are NullSCMs; so it does not matter which one to return return list.peekLast(); } };