Skip to content

Commit

Permalink
bugfix: dependency trigger is not visible anymore in configuration pa…
Browse files Browse the repository at this point in the history
…ge (#601)

regression since #517
  • Loading branch information
bguerin authored Mar 7, 2023
1 parent 5d0f1e0 commit 5d71111
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import hudson.model.listeners.ItemListener;
import jenkins.model.Jenkins;
import org.jenkinsci.plugins.pipeline.maven.GlobalPipelineMavenConfig;
import org.jenkinsci.plugins.workflow.flow.FlowExecutionOwner;
import org.jenkinsci.plugins.workflow.flow.BlockableResume;

import javax.inject.Inject;
import java.util.logging.Level;
Expand All @@ -26,7 +26,7 @@ public class DatabaseSyncItemListener extends ItemListener {

@Override
public void onDeleted(Item item) {
if (item instanceof FlowExecutionOwner.Executable) {
if (item instanceof BlockableResume) {
LOGGER.log(Level.FINE, "onDeleted({0})", item);
globalPipelineMavenConfig.getDao().deleteJob(item.getFullName());
} else {
Expand All @@ -36,7 +36,7 @@ public void onDeleted(Item item) {

@Override
public void onRenamed(Item item, String oldName, String newName) {
if (item instanceof FlowExecutionOwner.Executable) {
if (item instanceof BlockableResume) {
LOGGER.log(Level.FINE, "onRenamed({0}, {1}, {2})", new Object[]{item, oldName, newName});

String oldFullName;
Expand All @@ -55,7 +55,7 @@ public void onRenamed(Item item, String oldName, String newName) {

@Override
public void onLocationChanged(Item item, String oldFullName, String newFullName) {
if (item instanceof FlowExecutionOwner.Executable) {
if (item instanceof BlockableResume) {
LOGGER.log(Level.FINE, "onLocationChanged({0}, {1}, {2})", new Object[]{item, oldFullName, newFullName});
globalPipelineMavenConfig.getDao().renameJob(oldFullName, newFullName);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import jenkins.branch.MultiBranchProject;
import jenkins.branch.OrganizationFolder;
import org.jenkinsci.Symbol;
import org.jenkinsci.plugins.workflow.flow.FlowExecutionOwner;
import org.jenkinsci.plugins.workflow.flow.BlockableResume;
import org.kohsuke.stapler.DataBoundConstructor;

/**
Expand All @@ -25,7 +25,7 @@ public WorkflowJobDependencyTrigger(){
public static class DescriptorImpl extends TriggerDescriptor {
@Override
public boolean isApplicable(Item item) {
return item instanceof FlowExecutionOwner.Executable || item instanceof MultiBranchProject || item instanceof OrganizationFolder;
return item instanceof BlockableResume || item instanceof MultiBranchProject || item instanceof OrganizationFolder;
}

public String getDisplayName() {
Expand Down

0 comments on commit 5d71111

Please sign in to comment.