Skip to content

Commit

Permalink
Job.fastUpdateNextBuildNumber (#9019)
Browse files Browse the repository at this point in the history
  • Loading branch information
jglick authored Mar 10, 2024
1 parent 434bf2b commit 2dca2b1
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions core/src/main/java/hudson/model/Job.java
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@
import org.jfree.ui.RectangleInsets;
import org.jvnet.localizer.Localizable;
import org.kohsuke.accmod.Restricted;
import org.kohsuke.accmod.restrictions.Beta;
import org.kohsuke.accmod.restrictions.DoNotUse;
import org.kohsuke.accmod.restrictions.NoExternalUse;
import org.kohsuke.args4j.Argument;
Expand Down Expand Up @@ -426,6 +427,16 @@ public synchronized void updateNextBuildNumber(int next) throws IOException {
}
}

/**
* Unconditionally sets the value of {@link #getNextBuildNumber}.
* Unlike {@link #updateNextBuildNumber} this does not save the number on disk,
* and does not check {@link #getLastBuild}.
*/
@Restricted(Beta.class)
public void fastUpdateNextBuildNumber(int nextBuildNumber) {
this.nextBuildNumber = nextBuildNumber;
}

/**
* Returns the configured build discarder for this job, via {@link BuildDiscarderProperty}, or null if none.
*/
Expand Down

0 comments on commit 2dca2b1

Please sign in to comment.