title: Read interactive input in Jenkins pipeline to a variable
body: <p>In a Jenkins pipeline, i want to provide an option to the user to give an interactive input at run time. I want to understand how can we read the user input in the groovy script. Request to help we with a sample code:</p>
  
  <p>I'm referring to following documentation:
  <a href="https://jenkins.io/doc/pipeline/steps/pipeline-input-step/" rel="noreferrer">https://jenkins.io/doc/pipeline/steps/pipeline-input-step/</a></p>
  
  <p>EDIT-1:</p>
  
  <p>After some trials i've got this working:</p>
  
  <pre><code> pipeline {
      agent any
  
      stages {
  
          stage("Interactive_Input") {
              steps {
                  script {
                  def userInput = input(
                   id: 'userInput', message: 'Enter path of test reports:?', 
                   parameters: [
                   [$class: 'TextParameterDefinition', defaultValue: 'None', description: 'Path of config file', name: 'Config'],
                   [$class: 'TextParameterDefinition', defaultValue: 'None', description: 'Test Info file', name: 'Test']
                  ])
                  echo ("IQA Sheet Path: "+userInput['Config'])
                  echo ("Test Info file path: "+userInput['Test'])
  
                  }
              }
          }
      }
  }
  </code></pre>
  
  <p>In this example i'm able to echo (print) the user input parameters:</p>
  
  <pre><code>echo ("IQA Sheet Path: "+userInput['Config'])
  echo ("Test Info file path: "+userInput['Test'])
  </code></pre>
  
  <p>but I'm not able to write these parameters to a file or assign them to a variable. How can we achieve this?</p>