Coder Social home page Coder Social logo

jenkinsci / extensible-choice-parameter-plugin Goto Github PK

View Code? Open in Web Editor NEW
18.0 98.0 36.0 594 KB

Jenkins plugin to define choice build parameters where the way to provide choices can be extended.

Home Page: https://plugins.jenkins.io/extensible-choice-parameter/

Java 95.59% JavaScript 1.38% HTML 3.03%
adopt-this-plugin

extensible-choice-parameter-plugin's Introduction

Extensible Choice Parameter plugin

Older versions of this plugin may not be safe to use. Please review the following warnings before using an older version:

This plugin adds "Extensible Choice" as a build parameter.You can select how to retrieve choices, including the way to share choices among all jobs.

Note

For pipeline users:

Editable Choice plugin is available and designed pipeline friendly. Please try that for pipelines.

Extensible Choice Parameter plugin is designed for GUI-based jobs like freestyle projects, matrix projects and so on. It’s not planned to support pipeline syntaxes.

What’s this?

This plugin provides a Extensible Choice parameter:

  • When building, the value can be selected with a dropdown like a built-in Choice parameter.

  • The choices can be provided in several ways:

    • Global Choice Parameter: defines choices in the Configure System page.

      • Choices can be shared by multiple jobs.

      • Updating the choices in the Configure System, every job can immediately refer the updated choices.

    • Textarea Choice Parameter: writes choices in a textarea, just like a built-in Choice parameter.

    • System Groovy Script Choice Parameter: runs a System Groovy script to determine the list of choices

    • File Choice Parameter: lists files in a directory.

  • Checking Editable checkbox allows you to specify any value, even one not in the choices.

    • Edited values can be added to the choice used next time automatically by checking "Add Edited Value".

  • You can add a new way to provide choices with Extension Points.

Disabling providers

Some choice providers may cause security issues in your system:

Choice Provider Security Issue Note

File Choice Parameter

Any users with project configuration privilege can list files in the OS with the privilege of the OS user Jenkins run with.

Users can do that also with "Execute shell" or "Execute Windows Batch" build step.

You can disable specific providers in system configuration page:

Global configuration

In the above screen, System Groovy Script Choice Parameter (unchecked one) is disabled.

Screenshots

  • "Extensible Choice" is added as a type of build parameters.
    Add Parameter

  • You can select the way to define choices of the parameter.
    Choice Provider

    • A new way to provide choices can be added with Extension Points.

  • Selecting "Textarea Choice Parameter", you can define choices like the built-in Choice parameter.
    Textarea Choice Parameter

  • "Global Choice Parameter" enables you to select a set of choices from the ones defined in System Configuration page.

    • Defining in System Configuration page:
      Global Choice Parameter in System Configuration

    • Select which set of choices to use:
      Global Choice Parameter

  • "System Groovy Choice Parameter" generate choices with a Groovy script:
    System Groovy Choice Parameter

  • "File Choice Parameter" enables select a file in a specified directory:
    File Choice Parameter

  • You can specify its default value. This is useful with Global Choice Parameter to specify different default values in jobs:
    Default Choice

  • Checking "Editable" enables you to input a value not in choices at build time:
    Editable

    • Textarea Choice Parameter and Global Choice Parameter provides "Add Edited Value", which automatically adds a value not in the choice list:
      Add Edited Value

Extension point

A new way to provide choices can be added with extending ChoiceListProvider, overriding the following method:

abstract public List<String> getChoiceList()

Issues

To report a bug or request an enhancement to this plugin please create a ticket in JIRA (you need to login or to sign up for an account). Also have a look on How to report an issue

extensible-choice-parameter-plugin's People

Contributors

albundy83 avatar basil avatar cupsadarius avatar daniel-beck avatar daniel-beck-bot avatar dependabot[bot] avatar derfunk avatar gounthar avatar ikedam avatar jlleitschuh avatar mcmics avatar mrumpf avatar oleg-nenashev avatar phoenix384 avatar smokris avatar strangelookingnerd avatar vshih avatar wadeck avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.