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

set default value for choices in pipeline based on job name

    XMLWordPrintable

    Details

    • Sprint:
      Blue Ocean - Candidates
    • Similar Issues:

      Description

      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)

      ])

        Attachments

          Activity

          There are no comments yet on this issue.

            People

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

              Dates

              • Created:
                Updated: