[Nix-dev] Jenkins declarative jobs?

Rok Garbas rok at garbas.si
Fri Oct 9 11:15:21 CEST 2015


Quoting Bjørn Forsman (2015-10-09 10:37:24)
> Hi all,
> 
> I've been thinking of creating a sub-module for Jenkins, allowing jobs
> to be defined in nix.
> 
> AFAICT, the best options would be using either Jenkins Job Builder
> (JJB) or Jenkins DSL Plugin. The problem with the latter is that it
> requires a plugin for Jenkins, so I'm leaning towards Jenkins Job
> Builder.
> 

i used Jenkins Job Builder in the past and found it quite nice to manage
jenkins this way.


> Problems:
> 
> * It may be difficult to clean up jobs if they are renamed or deleted.
> (So it's not fully declarative.)
> 

you can run `jenkins-jobs delete-all`[1] from time to time.

    delete *ALL* jobs from Jenkins server, including those not managed by
    Jenkins Job Builder.


> * Ideally, I think the backend should just generate jobName/config.xml
> files for Jenkins and then having a systemd service move those files
> to /var/lib/jenkins and signal jenkins to reload its config. Then we
> don't have to care about authentication (and I don't think we should
> allow the module to operate against non-local Jenkins instances, which
> is something JJB _can_ do). On the other hand, JJB seems to have some
> extra features if it is allowed to talk to Jenkins.

you can also configure timer which periodicaly checks if jenkins configuration
needs to be updated. easier get it up and running then trying to change how
jenkins job builder works (since it talks to jenkins via api).


[1] http://docs.openstack.org/infra/jenkins-job-builder/execution.html#command-reference


--
Rok Garbas - http://www.garbas.si
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: signature
Url : http://lists.science.uu.nl/pipermail/nix-dev/attachments/20151009/e9b9dd8e/attachment.bin 


More information about the nix-dev mailing list