Nahshon paz
Nahshon paz

Reputation: 4583

Jenkins GUI to set time - is there a way to pass parameters from the "build with parameters" screen to the a schedule

I have a couple of jobs with parameters, that let developers choose params from the "build with params" screen.

Now these jobs need to run nightly. BUT -

  1. The nightly parameters' values must be changed every couple of weeks, by some developers.
  2. The developers who must change these values can't have permissions to edit the jobs, just to build them.

So I'm wondering if I could pass some parameters to either the "build periodically" or to the "build periodically with parameters", such that would enable the developers to set the time of a build from the "build with params" screen. Parameters like "minute", "hour" and so on, that will be written in the build periodically" like so: ${minute} ${hour} ${DOM} ${Month} ${DOW}.

This will enable the devs to set a nightly build on their own, or even an afternoonly or morningly, without editing the jobs... What do you say?

I see that the the "build peri" gives an error for adding ${minute} (invalid input). Could this be done in some other way?

Upvotes: 1

Views: 241

Answers (1)

Nahshon paz
Nahshon paz

Reputation: 4583

I ended up giving the dev team a multijob that's built periodically, runs the jobs with predefined parameters, and is editable by the devs.

That gives them an not-really-GUI-place in which to set params and a schedule to the jobs without editing the jobs themselves. Doesn't look like much but it solves my problem.

Upvotes: 1

Related Questions