You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Work In Progress

This page is not yet complete, please ask on the dev@sling.apache.org mailing list if anything is unclear or out of date

History and current status

We maintain a (large) number of jobs on the ASF Jenkins instance. Historically, we had a few large reactor builds but those proved to be of limited usefulness:

  • the builds were quite slow to complete - 50 minutes on average
  • if a module in the reactor failed, the whole build failed

In practice, this meant that the Sling CI jobs were red almost all of the time.

To solve these issues we have decided to create individual jobs for each module. Given that Sling has a large number of modules, it is unrealistic to manage them all manually. As such, we have started using the Jenkins Job DSL Plugin . This allows us to programatically create jobs based on a groovy script.

Managing jobs

Since all the job management is now done via a Groovy script manual job creation is discouraged. Altering an existing job is also discouraged since the changes will be undone when the jobs are next regenerated.

Jobs are managed by using a 'seed' job, which processes the DSL script. The job is currently located at https://builds.apache.org/view/S-Z/view/Sling/job/sling-seed-build . Typically there is no need to touch this job.

The script controlling the job management is located at https://svn.apache.org/repos/asf/sling/trunk/tooling/jenkins/create_jobs.groovy . To add a new job, add a new entry in the 'modules' list, for instance

diff --git a/tooling/jenkins/create_jobs.groovy b/tooling/jenkins/create_jobs.groovy
index 871010c..692e246 100644
--- a/tooling/jenkins/create_jobs.groovy
+++ b/tooling/jenkins/create_jobs.groovy
@@ -210,6 +210,9 @@ def modules = [
         location: 'bundles/extensions/repoinit/parser'
     ],
     [
+        location: 'bundles/extensions/foo'
+    ],
+    [
         location: 'bundles/jcr/api'
     ],
     [

Commit the change to SVN and on the next invocation of the seed job your desired job will be created.

Limitations

We rely on the Jenkins Maven Plugin to automatically detect relationship between jobs, e.g. from org.apache.sling.distribution.core to org.apache.sling.distribution.api . However, this does not take into account the provisioning model. To work around this, we currently set up some very broad rules, such as 'all entries under bundles/ or installer/ trigger a launchpad build'. We might revisit this to see if we can do something more fine-grained.

References:

  1. Jenkins Job DSL Plugin: https://wiki.jenkins-ci.org/display/JENKINS/Job+DSL+Plugin
  2. SLING-6061 - Getting issue details... STATUS
  • No labels