nixos: add services.jenkins.jobBuilder option

This option allows to define (declarative) Jenkins jobs, using Jenkins
Job Builder (JJB) as backend.

Example:

  services.jenkins = {
    enable = true;
    jobBuilder = {
      enable = true;
      yamlJobs = ''
        - job:
            name: jenkins-job-test
            builders:
              - shell: echo 'Hello world!'
      '';
    };
  };

Jobs can be defined using YAML, JSON and Nix.

Note that it really is declarative configuration; if you remove a
previously defined job, the module will remove the jobdir under
$JENKINS_HOME.

Jobs managed through the Jenkins WebUI (or by other means) are not
touched by this module.

Changes v1 -> v2:
* add nixJobs
* let jsonJobs take a list of strings (allows merge)
* 4 space indent in shell code
This commit is contained in:
Bjørn Forsman 2015-10-08 22:15:15 +02:00
parent a487b3326b
commit 27f41d8c0a
2 changed files with 156 additions and 0 deletions

View file

@ -118,6 +118,7 @@
./services/computing/slurm/slurm.nix
./services/continuous-integration/jenkins/default.nix
./services/continuous-integration/jenkins/slave.nix
./services/continuous-integration/jenkins/job-builder.nix
./services/databases/4store-endpoint.nix
./services/databases/4store.nix
./services/databases/couchdb.nix