Search code examples
jenkinsjenkins-pipeline

Using text editor for configuring Jenkins job's UI elements


Is it possible to edit/save the code of "Job Configuration" (the structure and order of UI elements) ?

The pipeline job get the pipeline code from git, but this occurs only AFTER the job started. I want to edit the UI of job parameters (BEFORE user press "build")

Its necessary for 2 reasons :

  1. its much easier to cut/paste text lines, than move elements up/down with the mouse.
  2. can be saved and deployed easily on a new Jenkins machine

Solution

  • You can edit the configuration before the job is run to add the initial build parameters. If you then have the build parameters also defined in the pipeline, the parameters will be overwritten with the ones defined in the pipeline.

    However, for that first build, if the build parameters defined in the job configuration and the ones in the pipeline match, the build parameter values will be used in that initial run.