Continuous Integration banner

Topics to be covered in this section include:

  • Continuous Integration servers
  • Configure deployment pipelines
  • Manage environment variables
  • Deployment and services on Heroku

CircleCI example in Practicalli Clojure Web Services

Banking on Clojure is an example of Continuous Integration using CircleCI, with LambdaIsland/Kaocha as the test runner and Heroku as the deployment pipeline.

12 Factor approach

Following the 12 factor principles, the deployment is driven by source code to multiple environments.

Heroku multiple environment from one source

CircleCI service

Use Yaml language to write CI workflows and tasks, using Docker images as a consistent run-time environment

A commercial service with a generous free Cloud plan - (6,000 minutes), providing highly optomises container images to run tasks efficiently. The CircleCI Clojure images contain Clojure CLI, Leiningen and Babashka pre-installed.

CircleCI Orbs package up common configuration and tools, greatly simplifying the configuration and maintenance required.

GitHub Actions

Use Yaml language to write CI workflows and tasks.

A commercial service with a modest free plan (2,000 minutes) for open source projects. GitHub Marketplace contains a wide range of Actions, including Clojure related actions, simplifying the configuration of CI.

Setup Clojure provides Clojure CLI, Leinigen and boot tools for use within the CI workflow

Heroku pipelines

Using Heroku Pipelines the staging environment is promoted to production rather than being rebuilt

Heroku Pipeline concept - staging and production

The Heroku dashboard can be used to promote the application into production, once the staging application is signed off.

Heroku Pipeline banking-on-clojure

Heroku Build process

The build process starts when commits are pushed to Heroku, either directly or via a continuous integration service (eg. CircleCI).

Heroku build process

results matching ""

    No results matching ""