[JJB] Jenkins Job Builder - any users here?

49 views
Skip to first unread message

Adam Romanek

unread,
Feb 18, 2022, 4:08:39 AM2/18/22
to Jenkins Users
Hi Jenkins community!

Any Jenkins Job Builder users here? Would be good to know how many of you are reading this, so please leave a comment. There is a dedicated discussion group for JJB but it seems really few people are subscribed. Anyway please leave a comment here if you use JJB.

For those who are not familiar, Jenkins Job Builder is a project written in Python which allows describing jobs in a YAML format. It's really mature, it has a long history and supports pretty advanced use cases but my feeling is few people actually know about it and use it. There are probably many reasons for this. Hopefully we can improve this over time.

Recently I started a thread on dropping support for Python 2 in JJB. It would be nice to hear your opinions, especially if you still rely on Python 2.

Looking forward to your feedback.

Best regards,
Adam Romanek

Luca Milanesio

unread,
Feb 18, 2022, 5:00:19 AM2/18/22
to 'Björn Pedersen' via Jenkins Users, Luca Milanesio

On 18 Feb 2022, at 07:51, Adam Romanek <romane...@gmail.com> wrote:

Hi Jenkins community!

Any Jenkins Job Builder users here? Would be good to know how many of you are reading this, so please leave a comment. There is a dedicated discussion group for JJB but it seems really few people are subscribed. Anyway please leave a comment here if you use JJB.

We do use it and we like it :-)

Luca.


For those who are not familiar, Jenkins Job Builder is a project written in Python which allows describing jobs in a YAML format. It's really mature, it has a long history and supports pretty advanced use cases but my feeling is few people actually know about it and use it. There are probably many reasons for this. Hopefully we can improve this over time.

Recently I started a thread on dropping support for Python 2 in JJB. It would be nice to hear your opinions, especially if you still rely on Python 2.

Looking forward to your feedback.

Best regards,
Adam Romanek

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/18266eb4-7b74-469a-8dcd-767daaeed3cen%40googlegroups.com.

Weihong Xu

unread,
Sep 9, 2022, 12:11:48 AM9/9/22
to Jenkins Users
I have plan to try it in our projects, but it is still a little bit difficult for me to choose between Job DSL and it. I am try to find a tool with which I can create a meta job in Jenkins that allows users to fill there git url and then it will checkout the code and read some .yml file to create / update a job automatically.

Dirk Heinrichs

unread,
Sep 9, 2022, 1:39:24 AM9/9/22
to jenkins...@googlegroups.com
Am Donnerstag, dem 08.09.2022 um 19:15 -0700 schrieb Weihong Xu:

> I have plan to try it in our projects, but it is still a little bit
> difficult for me to choose between Job DSL and it. I am try to find a
> tool with which I can create a meta job in Jenkins that allows users
> to fill there git url and then it will checkout the code and read
> some .yml file to create / update a job automatically.

What you want are (Multibranch-) Pipeline jobs.

HTH...

Dirk
--
Dirk Heinrichs
Senior Systems Engineer, Delivery Pipeline
OpenText ™ Discovery | Recommind
Phone: +49 2226 15966 18
Email: dhei...@opentext.com
Website: www.recommind.de
Recommind GmbH, Von-Liebig-Straße 1, 53359 Rheinbach
Vertretungsberechtigte Geschäftsführer Gordon Davies, Madhu
Ranganathan, Christian Waida, Registergericht Amtsgericht Bonn,
Registernummer HRB 10646
This e-mail may contain confidential and/or privileged information. If
you are not the intended recipient (or have received this e-mail in
error) please notify the sender immediately and destroy this e-mail.
Any unauthorized copying, disclosure or distribution of the material in
this e-mail is strictly forbidden
Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte
Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-
Mail irrtümlich erhalten haben, informieren Sie bitte sofort den
Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie
die unbefugte Weitergabe dieser Mail sind nicht gestattet.

Weihong Xu

unread,
Sep 9, 2022, 2:15:51 AM9/9/22
to Jenkins Users
Not exactly. I have already used Jenkins pipeline to define the CI/CD workflow. The problem is I still need to create Jenkins job manually in the web UI to run those pipeline scripts. I hope this could also be automated. In the end users just need to tell the meta job where their repos are, and the meta job will created the pipeline Job automatically by reading some .yml file in the repos they provided.

Dirk Heinrichs

unread,
Sep 9, 2022, 2:43:39 AM9/9/22
to jenkins...@googlegroups.com
Am Donnerstag, dem 08.09.2022 um 23:15 -0700 schrieb Weihong Xu:

Not exactly. I have already used Jenkins pipeline to define the CI/CD workflow. The problem is I still need to create Jenkins job manually in the web UI to run those pipeline scripts. I hope this could also be automated. In the end users just need to tell the meta job where their repos are, and the meta job will created the pipeline Job automatically by reading some .yml file in the repos they provided.

Ah, OK. Got it now.

I guess then it's best to use Job-DSL. You can create a seed job which reads some Job-DSL code along with a configuration file from a repository (or even separate ones). The DSL code then just iterates over the entries in the configuration file and creates a job for each one, maybe like (in YAML):

---
jobs:
  - name: job_1
    repository:
      credentials: <credentials id>
      url: <ssh or https repo url>
    type: <either pipeline or multibranch pipeline>
  - name: folder/job2
    repository:
      ...

This way users can update the file, issue a merge request, which triggers your seed job after merge...

HTH...

Dirk
-- 
Dirk Heinrichs
Senior Systems Engineer, Delivery Pipeline
OpenText ™ Discovery | Recommind
Recommind GmbH, Von-Liebig-Straße 1, 53359 Rheinbach
Vertretungsberechtigte Geschäftsführer Gordon Davies, Madhu Ranganathan, Christian Waida, Registergericht Amtsgericht Bonn, Registernummer HRB 10646
This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden
Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail sind nicht gestattet.

Weihong Xu

unread,
Sep 9, 2022, 2:56:30 AM9/9/22
to Jenkins Users
Yes, I think that's how it should be.  But the Job DSL document only shows how to use freestyle job as a seed job. I am wondering is their any example showing how to use a pipeline job as a seed job.  Meanwhile Jenkins Job Builder can do the similar thing via command line. That's why I feel difficult to choose betweeen them.
Reply all
Reply to author
Forward
0 new messages