jenkins.tasks.SimpleBuildStep Java Examples

The following examples show how to use jenkins.tasks.SimpleBuildStep. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: PipelineMetadataService.java    From blueocean-plugin with MIT License 5 votes vote down vote up
private <T extends Describable<T>,D extends Descriptor<T>> void populateMetaSteps(List<Descriptor<?>> r, Class<T> c) {
    Jenkins j = Jenkins.getInstance();
    for (Descriptor<?> d : j.getDescriptorList(c)) {
        if (SimpleBuildStep.class.isAssignableFrom(d.clazz) && symbolForObject(d) != null) {
            r.add(d);
        } else if (SimpleBuildWrapper.class.isAssignableFrom(d.clazz) && symbolForObject(d) != null) {
            r.add(d);
        }
    }
}
 
Example #2
Source File: DotCiExtensionsHelper.java    From DotCi with MIT License 5 votes vote down vote up
private <T extends Describable<T>, D extends Descriptor<T>> List<Descriptor<?>> getClassList(Class<T> c) {
    ArrayList<Descriptor<?>> r = new ArrayList<Descriptor<?>>();
    if (jenkins == null) {
        return new ArrayList<Descriptor<?>>();
    }
    for (Descriptor<?> d : jenkins.getDescriptorList(c)) {
        if (SimpleBuildStep.class.isAssignableFrom(d.clazz)) {
            r.add(d);
        }
    }
    return r;
}
 
Example #3
Source File: GenericSimpleBuildStepPlugin.java    From DotCi with MIT License 5 votes vote down vote up
private SimpleBuildStep getPlugin() {
    try {
        return DescribableHelper.instantiate(pluginDescriptor.clazz, (Map<String, ?>) options);
    } catch (Exception e) {
        throw new RuntimeException(e);
    }
}
 
Example #4
Source File: GenericSimpleBuildStepPlugin.java    From DotCi with MIT License 4 votes vote down vote up
public GenericSimpleBuildStepPlugin(Descriptor<?> pluginDescriptor, Object options) {
    super("");
    this.pluginDescriptor = (Descriptor<? extends SimpleBuildStep>) pluginDescriptor;
    this.options = options;
}