Skip to content
Browse files
[FIXED JENKINS-18678] - Update builds location in RunMap after the jo…
…b's renaming

This change resolve the issue with missing builds after the jobs renaming and further cleanup of cache.
Finally, the cache's directory location will be updated after the each job renaming.

Signed-off-by: Oleg Nenashev <>
(cherry picked from commit 568ccba)
  • Loading branch information
oleg-nenashev authored and olivergondza committed Jan 9, 2014
1 parent 412befc commit 65502e1cd928e5f3bdaff505313ab8e7cb64350c
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
@@ -1659,6 +1659,13 @@ void addToList( T item, List<T> collection ) throws IOException {

public void renameTo(String newName) throws IOException {
// Update locations inside builds cache
builds.updateBaseDir(getBuildDir(), false);

protected final synchronized <T extends Describable<T>>
void removeFromList(Descriptor<T> item, List<T> collection) throws IOException {
final Iterator<T> iCollection = collection.iterator();
@@ -2102,6 +2109,7 @@ public HttpResponse doEnable() throws IOException, ServletException {
return new HttpRedirect(".");

* RSS feed for changes in this project.
@@ -210,6 +210,17 @@ public final boolean baseDirInitialized() {
return dir != null;

* Updates base directory location after directory changes.
* This method should be used on jobs renaming, etc.
* @param dir Directory location
* @param reloadBuilds Purges cache after the directory update
public final void updateBaseDir(File dir, boolean reloadBuilds) {
this.dir = dir;

* Let go of all the loaded references.

0 comments on commit 65502e1

Please sign in to comment.