Skip to content

Commit

Permalink
[JENKINS-33819] OrphanedItemStrategy is propagated to the Multibranch…
Browse files Browse the repository at this point in the history
… projects
  • Loading branch information
recena committed May 12, 2016
1 parent bb44e24 commit 69c7132
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pom.xml
Expand Up @@ -91,7 +91,7 @@
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>cloudbees-folder</artifactId>
<version>5.1</version>
<version>5.10-SNAPSHOT</version>
</dependency>
<!-- jenkins dependencies -->
<!-- test dependencies -->
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/jenkins/branch/OrganizationFolder.java
Expand Up @@ -163,6 +163,7 @@ public void complete() throws IllegalStateException, InterruptedException {
PersistedList<BranchSource> sourcesList = existing.getSourcesList();
sourcesList.clear();
sourcesList.addAll(createBranchSources());
existing.setOrphanedItemStrategy(getOrphanedItemStrategy());
existing.scheduleBuild();
return;
}
Expand All @@ -181,6 +182,7 @@ public void complete() throws IllegalStateException, InterruptedException {
continue;
}
if (project != null) {
project.setOrphanedItemStrategy(getOrphanedItemStrategy());
project.getSourcesList().addAll(createBranchSources());
try {
project.addTrigger(new PeriodicFolderTrigger("1d"));
Expand Down

0 comments on commit 69c7132

Please sign in to comment.