Skip to content

Commit

Permalink
Remove JF command from a freestyle project as it is confusing
Browse files Browse the repository at this point in the history
  • Loading branch information
EyalDelarea committed Sep 9, 2024
1 parent 8377109 commit f54af5c
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/main/java/io/jenkins/plugins/jfrog/JfStep.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,7 @@
import hudson.Extension;
import hudson.FilePath;
import hudson.Launcher;
import hudson.model.AbstractProject;
import hudson.model.Job;
import hudson.model.Run;
import hudson.model.TaskListener;
import hudson.model.*;
import hudson.tasks.BuildStepDescriptor;
import hudson.tasks.Builder;
import hudson.util.ArgumentListBuilder;
Expand Down Expand Up @@ -291,7 +288,8 @@ public String getDisplayName() {

@Override
public boolean isApplicable(Class<? extends AbstractProject> jobType) {
return true;
// Return false to hide it in Freestyle jobs
return !FreeStyleProject.class.isAssignableFrom(jobType);
}
}
}

0 comments on commit f54af5c

Please sign in to comment.