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

set default value for choices in pipeline based on job name

XMLWordPrintable

    • Blue Ocean - Candidates

      I want to put choice value based on current job name. Where jenkins file will be common and their parameter value will change when the job change.

       

      For example:

      If env.job_name="abc"

      then 

      parameters([
      string(name: 'v1',defaultValue: 'df_abc', description: 'anything ?',trim: true)

      ])

      else

      parameters([
      string(name: 'v1',defaultValue: 'df_other', description: 'anything ?',trim: true)

      ])

            kinow Bruno P. Kinoshita
            jayantsinha7 Jayant Sinha
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: