jayunit100
jayunit100

Reputation: 17640

Are there any robust Clojure continuous integration options?

I'm trying to integrate clojure into a continuous build . Any suggestions for A clojure enabled system like Jenkins, that is capable of doing the work for me via a plugin? I've seen some ad hoc tutorials, but not sure if there is a clear accepted method. I notice that clojure itself is built using CI, and since it's a java dialect, I'm assuming maybe if no such options exist, then maybe I could wrap a clojure build as a maven / ant task....

Upvotes: 5

Views: 3437

Answers (4)

Jordan Stewart
Jordan Stewart

Reputation: 3395

Lambda CD is probably what you want. It allows you to write builds, and delivery pipelines in clojure. It is relatively new, and seems to be becoming more popular. http://www.lambda.cd/

Upvotes: 0

mikera
mikera

Reputation: 106391

As a data point, I use:

  • Maven to build polyglot Clojure+Java projects
  • GitHub for SCM
  • Travis CI for continuous integration based off the GitHub source.

The important point is that by making the build work with Maven, you can hook into the standard Java-based CI tool ecosystem pretty easily. As far as Travis CI is concerned, it is just another Java project - Clojure is effectively treated as an extra Java library from the perspective of the build process. Here's the travis.yml config:

language: java
jdk:
  - oraclejdk7
  - openjdk7
  - openjdk6

Here's an example open source project using this approach:

Upvotes: 1

cemerick
cemerick

Reputation: 5916

While Jenkins/Hudson is the most widely used for Clojure projects, you can use any CI system you like.

Clojure itself, all of the contrib projects, and various open source projects all use Maven to drive their builds and thereby can be hoisted into Hudson/Jenkins with relative ease. clojure-maven-plugin is what you're looking for to mirror such a setup.

You can also use Leiningen with Hudson/Jenkins (or really any other CI system) just by shelling out to lein as necessary. There is a somewhat clever way of setting this up through Jenkins itself here.

Finally, if you need ant, you can use clojure-ant-tasks.

Upvotes: 8

c_maker
c_maker

Reputation: 20006

You want to do all the work in either ant/maven/gradle etc. because you want to be able to easily build your project locally as well as on a CI system. Once you can build locally with a well known build framework, you just call the same tasks/goals in Jenkins and its super easy at that point, since Jenkins integrates nicely with most build frameworks like ant/maven/gradle.

Upvotes: 2

Related Questions