@Deprecated public void onChangeLogParsed(AbstractBuild<?,?> build, BuildListener listener, ChangeLogSet<?> changelog) throws Exception { if (Util.isOverridden(SCMListener.class, getClass(), "onChangeLogParsed", Run.class, SCM.class, TaskListener.class, ChangeLogSet.class)) { onChangeLogParsed((Run) build, build.getProject().getScm(), listener, changelog); } }
@Deprecated public ChangeLogSet<? extends Entry> parse(AbstractBuild build, File changelogFile) throws IOException, SAXException { return parse((Run) build, build.getProject().getScm().getEffectiveBrowser(), changelogFile); } }
/** * Performs the pre checkout step. * * This method is called by the {@link Executor} that's carrying out the build. * * @param build * Build being in progress. Never null. * @param launcher * Allows you to launch process on the node where the build is actually running. Never null. * @param listener * Allows you to write to console output and report errors. Never null. */ public void preCheckout(AbstractBuild<?,?> build, Launcher launcher, BuildListener listener) throws IOException, InterruptedException { AbstractProject<?, ?> project = build.getProject(); if (project instanceof BuildableItemWithBuildWrappers) { BuildableItemWithBuildWrappers biwbw = (BuildableItemWithBuildWrappers) project; for (BuildWrapper bw : biwbw.getBuildWrappersList()) bw.preCheckout(build,launcher,listener); } }
public void prepareWorkspace(AbstractBuild<?,?> build, FilePath ws, final TaskListener listener) throws IOException, InterruptedException { final String name = build.getProject().getFullName(); ws.act(new PrepareWorkspace(name, listener)); } private class PrepareWorkspace extends MasterToSlaveFileCallable<Void> {
/** * Various deprecated methods in this class all need the 'current' build. This method returns * the build suitable for that purpose. * * @return An AbstractBuild for deprecated methods to use. */ private AbstractBuild getBuildForDeprecatedMethods() { Executor e = Executor.currentExecutor(); if(e!=null) { Executable exe = e.getCurrentExecutable(); if (exe instanceof AbstractBuild) { AbstractBuild b = (AbstractBuild) exe; if(b.getProject()==this) return b; } } R lb = getLastBuild(); if(lb!=null) return lb; return null; }
graph.getDownstreamDependencies(build.getProject()));
@Override public boolean perform(AbstractBuild build, Launcher launcher, BuildListener listener) { List<Job<?, ?>> jobs = new ArrayList<>(); for (Job<?, ?> job : getChildJobs(build.getProject())) { if (job instanceof AbstractProject) { continue; // taken care of by DependencyGraph
/** * Use the configuration name. */ @Override protected String getChildName(AbstractTestResultAction tr) { return tr.owner.getProject().getName(); }
/** * Use the configuration name. */ @Override protected String getChildName(AbstractTestResultAction tr) { return tr.owner.getProject().getName(); }
/** * Use the configuration name. */ @Override protected String getChildName(AbstractTestResultAction tr) { return tr.owner.getProject().getName(); }
/** * Returns whether this build is the last available build. * * @return <code>true</code> if this build is the last available build */ public final boolean isCurrent() { return owner.getProject().getLastBuild().number == owner.number; }
/** * Convenience method to create {@link PipelineBuild} from a build. * * @param build * The object to be wrapped. */ public PipelineBuild(final AbstractBuild<?, ?> build) { this(build, build.getProject(), build.getPreviousBuild()); }
@Deprecated public void onChangeLogParsed(AbstractBuild<?,?> build, BuildListener listener, ChangeLogSet<?> changelog) throws Exception { if (Util.isOverridden(SCMListener.class, getClass(), "onChangeLogParsed", Run.class, SCM.class, TaskListener.class, ChangeLogSet.class)) { onChangeLogParsed((Run) build, build.getProject().getScm(), listener, changelog); } }
private void updateSymlink(String name, AbstractBuild<?,?> newTarget) throws InterruptedException { if (newTarget != null) newTarget.createSymlink(new LogTaskListener(LOGGER, Level.WARNING), name); else new File(getProject().getBuildDir(), "../"+name).delete(); }
private FilePath getWorkspace(AbstractBuild build) { FilePath workspace = build.getWorkspace(); if (workspace == null) { workspace = build.getProject().getSomeWorkspace(); } return workspace; }
@Deprecated public ChangeLogSet<? extends Entry> parse(AbstractBuild build, File changelogFile) throws IOException, SAXException { return parse((Run) build, build.getProject().getScm().getEffectiveBrowser(), changelogFile); } }
@Override public SCMRevisionState calcRevisionsFromBuild(AbstractBuild<?, ?> build, Launcher launcher, TaskListener listener) throws IOException, InterruptedException { // exclude locations that are svn:external-ed with a fixed revision. Map<String, Long> wsRev = parseRevisionFile(build, true); for (External e : parseExternalsFile(build.getProject())) { if (e.isRevisionFixed()) { wsRev.remove(e.url); } } return new SVNRevisionState(wsRev); }
/** * Returns whether this result belongs to the last build. * * @return <code>true</code> if this result belongs to the last build */ public boolean isCurrent() { return getOwner().getProject().getLastBuild().number == getOwner().number; }
@Override public void onCompleted(AbstractBuild abstractBuild, TaskListener listener) { GitlabBuildTrigger trigger = GitlabBuildTrigger.getTrigger(abstractBuild.getProject()); if (trigger == null) { return; } trigger.getBuilder().getBuilds().onCompleted(abstractBuild); } }
@Override public void onStarted(AbstractBuild abstractBuild, TaskListener listener) { GitlabBuildTrigger trigger = GitlabBuildTrigger.getTrigger(abstractBuild.getProject()); if (trigger == null) { return; } trigger.getBuilder().getBuilds().onStarted(abstractBuild); }