How can I organize the option of constructing parameterized work in Jenkins?

I have a parameterized job that takes a name, an SVN repository, and a shared directory. I need to regularly call this work with about 20 sets of these parameters. At the moment, I just created 20 tasks and each of them causes the main task.

This is a very tiring configuration and clutters up the basic look in Jenkins.

Is there a better way to solve this problem? I am open to restructuring tasks or using plugins to β€œhide” them.


More about vacancies: I actually have two types of main tasks:

  • delivery task. We deploy our application in ~ 20 different shared directories. These tasks are configured to run once a day. (Periodically create a trigger)
  • calculation task. It calculates data based on the svn repository and saves it in a shared folder. These tasks are configured every 15 minutes.
  • Work can and should be performed in parallel

What I need / need:

  • Sometimes it is required that the developer need to manually run one (or a couple) of configurations
  • Something like a matrix configuration plugin might solve my problem. If it were possible to somehow set my parameters as one axis, I would be happy
  • Multijob would be another close solution to my problem, unfortunately this β€œerror” blocks me: JENKINS-39678
+4
source share
2 answers

, @Absurd-Mind, , , . 20 , .

, .... shell script , multijob, . MultiJob Phase .

, , , , .

+1

Pipeline groovy . , 1 , , .

checkbox build options image

node: {
   stage ('set1') {
      if(env.build_set1) {
         build job: 'main_job', parameters: [[$class: 'StringParameterValue', name: 'name', value: 'Name1'], [$class: 'StringParameterValue', name: 'directory', value: 'dir1']]
      }
   }

   stage ('set2') {
      if(env.build_set2) {
         build job: 'main_job', parameters: [[$class: 'StringParameterValue', name: 'name', value: 'Name2'], [$class: 'StringParameterValue', name: 'directory', value: 'dir2']]
      }
   }
}

, .

+1

Source: https://habr.com/ru/post/1681254/


All Articles