set default value for choices in pipeline based on job name

XMLWordPrintable

      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)

      ])

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

              Created:
              Updated: