Skip to content
Permalink
Browse files
[FIXED JENKINS-37644] - Update Folders Plugin dependency to fix the c…
…ompatibility issue (#33)

[FIXED JENKINS-37644] - Update Folders Plugin dependency to fix the compatibility issue
  • Loading branch information
escoem authored and oleg-nenashev committed Sep 28, 2016
1 parent fbba7ab commit 6ec664bb85420dd937c086aa86c61a89bdeaa49a
Showing with 8 additions and 7 deletions.
  1. +1 −1 pom.xml
  2. +7 −6 src/main/java/jenkins/advancedqueue/jobinclusion/strategy/FolderPropertyLoader.java
@@ -73,7 +73,7 @@
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>cloudbees-folder</artifactId>
<version>4.2</version>
<version>5.0</version>
<optional>true</optional>
</dependency>
<dependency>
@@ -23,14 +23,15 @@
*/
package jenkins.advancedqueue.jobinclusion.strategy;

import com.cloudbees.hudson.plugins.folder.AbstractFolder;
import com.cloudbees.hudson.plugins.folder.AbstractFolderProperty;
import com.cloudbees.hudson.plugins.folder.AbstractFolderPropertyDescriptor;
import hudson.model.ItemGroup;
import hudson.model.Job;
import hudson.model.TopLevelItem;
import hudson.util.DescribableList;
import jenkins.advancedqueue.DecisionLogger;

import com.cloudbees.hudson.plugins.folder.FolderProperty;
import com.cloudbees.hudson.plugins.folder.FolderPropertyDescriptor;
import com.cloudbees.hudson.plugins.folder.Folder;

/**
@@ -43,11 +44,11 @@ static public String getJobGroupName(DecisionLogger decisionLogger, Job<?, ?> jo
ItemGroup<?> parent = job.getParent();
decisionLogger.addDecisionLog(2, "Checking for Cloudbees Folder inclusion ...");
while(parent != null) {
if(parent instanceof Folder) {
Folder folder = (Folder) parent;
if(parent instanceof AbstractFolder) {
AbstractFolder folder = (AbstractFolder) parent;
decisionLogger.addDecisionLog(3, "Evaluating Folder [" + folder.getFullName() + "] ...");
DescribableList<FolderProperty<?>,FolderPropertyDescriptor> properties = folder.getProperties();
for(FolderProperty<?> property : properties) {
DescribableList<AbstractFolderProperty<?>,AbstractFolderPropertyDescriptor> properties = folder.getProperties();
for(AbstractFolderProperty<?> property : properties) {
if(property instanceof JobInclusionFolderProperty) {
JobInclusionFolderProperty incProperty = (JobInclusionFolderProperty) property;
if(incProperty.isUseJobGroup()) {

0 comments on commit 6ec664b

Please sign in to comment.