lambdacd 0,1 travis-ci vagrant npm

a library to define a continuous delivery pipeline in code

LambdaCD

  • it's a continuous delivery pipeline, in code
  • it's your own custom built Jenkins/Go/TeamCity/..., in clojure

Status

Clojars Project

Build Status Join the chat at https://gitter.im/flosell/lambdacd

This project is still under active development so don't rely on everything working flawlessly out of the box. Also, things might change along the way so when you upgrade, make sure you check out the changelog

However, people do use LambdaCD in their day to day work and are happy with it, so give it a try! And if you notice something, please open bug reports, feature requests or just give feedback!

Setup

  • Make sure you have Leiningen and a recent version of JDK installed
  • lein new lambdacd <NAME> will create a new pipeline-project
  • cd <NAME>
  • lein run downloads all dependencies and starts the server; the UI is then served on on http://localhost:8080
  • your pipeline is defined in src/<NAME>/. Have a look around, change some steps or add some steps on your own.

Example

;; buildsteps
(def some-repo "[email protected]:flosell/somerepo")

(defn wait-for-repo [_ ctx]
  (git/wait-for-git ctx some-repo "master"))

(defn ^{:display-type :container} with-repo [& steps]
  (git/with-git some-repo steps))

(defn run-tests [{cwd :cwd} ctx]
  (shell/bash ctx cwd
    "lein test"))

(defn compile-and-deploy [{cwd :cwd} ctx]
  (shell/bash ctx cwd
    "./buildscripts/compile-and-deploy.sh"))

;; the pipeline
(def pipeline
  `(
     (either
       wait-for-manual-trigger
       wait-for-repo)
     (with-repo
       run-tests
       compile-and-deploy)))

Screenshot

Screenshot

Resources

Related projects

  • lambdacd-git: Next generation of Git support for LambdaCD. Will replace the functionality in the core lambdacd.steps.git namespace in the future
  • lambdacd-cctray: Support for cctray.xml to integrate LambdaCD with build monitoring tools such as nevergreen or CCMenu
  • lambdacd-artifacts: Makes arbitrary build-artifacts (test-results, binaries, ...) available on LambdaCD
  • lambdacd-junit: Makes JUnit test reports available in LambdaCD
  • lambdacd-testng: Makes TestNG results available in LambdaCD
  • lambdacd-cron: A cron trigger for your LambdaCD
  • lambdacd-mongodb: Alternative persistence backend for LambdaCD, saving the pipeline state into MongoDB instead of the filesystem
  • lambdacd-rest: Alternative persistence backend for LambdaCD, delegating to a REST-service to take care of persistence
  • lambdacd-state-controller: Aggregator service for several instances of LambdaCD, backend for lambdacd-rest
  • machroput: LambdaCD-aware library simplifying deployments into a Mesos Cluster running Marathon or Chronos

Contribute

I'd love to hear from you! If you have a question, a bug report or feature request please reach out.

For details, refer to the contribution guide

Development

LambdaCD is built in Clojure and ClojureScript with Leiningen as a build-tool. The ./go script is your main entry-point that wraps all important development tasks. Call it without arguments to see all the options.

General Setup

  • Call ./go setup to install necessary dependencies and build everything once.

Core Development

  • Sources for the core of LambdaCD can be found in src/clj, tests in test/clj.
  • Run tests with ./go test-clj
  • To run a sample-pipeline (see example/clj), run ./go serve. You may have to run ./go serve-cljs occasionally to generate the frontend JS code from ClojureScript.
  • If you want the example pipeline to be green (which is not necessary for all development), you first need to setup a mock-deployment environment on your machine (two VMs where we deploy a TodoMVC client and server):
    • install Vagrant
    • have github-access set up (you need to be able to clone with ssh)
    • ./go setupTodopipelineEnv starts up two VMs in vagrant where we deploy to and exports the ssh-config for them so that it can be used by the deployment scripts

Frontend Development

  • The frontend is written in ClojureScript using Reagent and re-frame
  • Frontend resources can be found in resources/public, ClojureScript code in src/cljs, tests in test/cljs
  • Stylesheets are written in are in Less and can be found in src/less
  • ClojureScript code needs to be compiled into JS before being useful
  • In three terminals, run ./go serve to start an example pipeline (if you want it to be green, follow the environment setup above), ./go serve-cljs to start a ClojureScript REPL and automatic code-reloading using Figwheel and ./go serve-css to run the css autoprefixer watch
  • Run ./go test-cljs to run frontend-tests or ./go test-cljs-auto to start autotest

License

Copyright © 2014 Florian Sellmayr

Distributed under the Apache License 2.0

Related Repositories

awesome-microservices

awesome-microservices

A curated list of Microservice Architecture related principles and technologies. ...

awesome-clojure

awesome-clojure

A curated list of awesome Clojure libraries and resources. Inspired by awesome-. ...

LambdaDeploy

LambdaDeploy

Better deployment for AWS Lambda ...

machroput

machroput

A simple marathon and chronos api written in clojure ...

lambda-ui

lambda-ui

An alternative Graphical User Interface for LambdaCD ...


Top Contributors

flosell alphaone felixb philwhln kennyjwilli ImmoStanke redvox matthiasn MichaelKunze tobiasbayer

Dependencies

package version
dev watch 1.0.1
postcss-cli 2.6.0
autoprefixer 6.6.0
less 2.7.1
phantomjs 2.1.7

Releases

-   0.10.0 zip tar
-   0.9.5 zip tar
-   0.9.4 zip tar
-   0.9.3 zip tar
-   0.9.2 zip tar
-   0.9.1 zip tar
-   0.9.0 zip tar
-   0.8.0 zip tar
-   0.7.1 zip tar
-   0.7.0 zip tar
-   0.6.1 zip tar
-   0.6.0 zip tar
-   0.5.7 zip tar
-   0.5.6 zip tar
-   0.5.5 zip tar
-   0.5.4 zip tar
-   0.5.3 zip tar
-   0.5.2 zip tar
-   0.5.1 zip tar
-   0.5.0 zip tar
-   0.4.3 zip tar
-   0.4.2 zip tar
-   0.4.1 zip tar
-   0.4.0 zip tar
-   0.3.2 zip tar
-   0.3.1 zip tar
-   0.3.0 zip tar
-   0.2.3 zip tar
-   0.2.2 zip tar
-   0.2.1 zip tar