Code Monkey home page Code Monkey logo

validating-string-parameter-plugin's Introduction

Validating String Parameter Plugin

Jenkins Jenkins Plugin GitHub release

The validating string parameter plugin contributes a new parameter type to Jenkins that supports regular expression validation of the user's entered parameter.

Usage

This plugin is used wherever build parameter selection is available, most commonly in the job configuration page by enabling parameterized builds (this parameter type will also be available as release parameters using the release plugin).

Configure the parameter by entering a name, regular expression to validate the entered value and optionally a default value, an error message shown when the user entered value fails the regular expression check and a parameter description.

When a build is requested, the user will be prompted with the parameters to enter. Users enter the parameter as normal, but will now be prompted with an error message if the entered value does not meet the regular expression.

Once the entered value meets the configured regular expression, the error message is no longer displayed.

Pipeline Examples

pipeline {
    agent any

    parameters {
        validatingString(
            name: 'param1', 
            defaultValue: '', 
            regex: /^[0-9]+$/, 
            failedValidationMessage: '', 
            description: 'Numbers only parameter example'
        )
    }

    stages {
        stage("Check") {
            steps {
                echo "${params.param1}"
            }
        }
    }
}

validating-string-parameter-plugin's People

Contributors

daniel-beck avatar dependabot[bot] avatar fredg02 avatar herocc avatar jlelli avatar larrys avatar martinda avatar mig82 avatar ndeloof avatar petehayes avatar redsolo avatar res0nance avatar sghill-rewrite avatar sgrillon14 avatar slide avatar sschuberth avatar vlatombe avatar yunir avatar zealotous avatar

Stargazers

 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

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.