Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-62049

BlueOcean ignoring defaultValue of password parameter type

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Component/s: blueocean-plugin
    • Labels:
      None
    • Environment:
    • Similar Issues:

      Description

      Example pipeline:

      pipeline {
         agent any
          parameters {
            password(name: 'env_db_password', defaultValue: '123456', description: 'Database password')
          }
         stages {
            stage('Use password') {
               steps {
        
      			sh label:"Test Params",script:'''
      			        echo ${env_db_password} > ./.env
      			        cat ./.env
                          '''
               }
            }
         }
      }
      

      If you run this pipeline from classic UI input will contain masked default value, and pipeline works correct.

      But if you use BlueOceanUI, input will be empty and pipeline starting with empty value instead  default.

       

      My version is 1.23.0 · Core 2.204.2 · 1115daf  · 20th April 2020 11:55 PM

       

        Attachments

          Activity

          Hide
          jey_patronum Evgenii Galkin added a comment -

          Found in blueocean-core-js.js:56366

           _createClass(Password, [{
                  key: 'render',
                  value: function render() {
                      // const debugging = React.createElement(DebugRender, this.props);
                      // FIXME: defaultValue does not contain the value we wait for
                      var _props = this.props,
                          value = _props.defaultParameterValue.value,
                          description = _props.description,
                          name = _props.name,
                          onChange = _props.onChange;
          

          That is the reason of my ticket I guess. Have you any information about fix date? or workaround?

          Show
          jey_patronum Evgenii Galkin added a comment - Found in blueocean-core-js.js:56366 _createClass(Password, [{ key: 'render' , value: function render() { // const debugging = React.createElement(DebugRender, this .props); // FIXME: defaultValue does not contain the value we wait for var _props = this .props, value = _props.defaultParameterValue.value, description = _props.description, name = _props.name, onChange = _props.onChange; That is the reason of my ticket I guess. Have you any information about fix date? or workaround?
          Hide
          ymal Yevgen Malovannyy added a comment -

          Caught the same bug, as workaround is possible to use `withCreds`, however this gives access to the stored password for all the jobs and this is not an option for my project.

          Show
          ymal Yevgen Malovannyy added a comment - Caught the same bug, as workaround is possible to use `withCreds`, however this gives access to the stored password for all the jobs and this is not an option for my project.

            People

            • Assignee:
              Unassigned
              Reporter:
              jey_patronum Evgenii Galkin
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: