zerber.io — simple yet powerful CI for javascript projects

gvidon
ottofeller
Published in
4 min readJul 9, 2018

I bet you know a lot of CI platforms. Many of them have cool and helpful features. But they almost all are general use CIs. They are aimed for all known existing developing platforms (kind of), and this adds burden to the process of setting up of CI platform for your exact purposes. Tons of options and features which you need to figure out (many of which you will never need) simply to run several test scripts.

CI is not a rocket science, you shouldn’t read docs longer than half a minute in order to run your tests in optimised way!

You, as a javascript developer, need something aimed for just…javascript! Without the need to specify an OS platform, to describe pre build steps, like npm install, caching, github checkout process and everything else repeating in millions of javascript projects.

Today we are launching Zerber in beta testing mode. Zerber is the CI platform optimised for javascript. Only javascript, nothing else. And here are key features of Zerber.

It is simple

{
"lint": {
"command" : "lint",
"isPartial" : true,
"fileRegexp": "\\.js$",
"title" : "Lint JS"
},

"test": {
"command": "test",
"title" : "Test JS"
}
}

This is it! There are two steps defined, each one is running script from your package.jsonnpm run lintcss and npm run test. One of the steps will only run when there are css-files changed in the branch. And it will only run over changed files.

Integrates with Github

Each step will appear on Github Pull Request page as a separate check. Right out of the box, you don’t need to setup anything.

Can deploy to numerous target platforms

While launching in beta we support deployments into

  • Docker Hub — yes, you can build docker containers with Zerber!
  • Heroku
  • and copying files over scp.

Our goal is to extend this list when we launch into production. Let us know in comments which deployment targets you personally would like to see in this list.

Browsers and node.js

Zerber works equally well either with browser and node.js environment. All it does is running npm commands from package.json and notifying Github about results.

Parallel out of the box

Zerber will run all of your build steps in parallel. This feature is currently not available, but we are working hard to make it possible to try it during beta testing period. You will not have to add a line into config file to have independent steps run simultaneously.

What will change by release date?

  • As mentioned above we will make build steps to run in parallel. This should significantly improve build times.
  • UI will be refined to provide a better overview of all of your builds and to make navigation between builds much easier and more explicit.
  • We will introduce Zerber as Github App, which will make its integration convenient either to organisations and individual users.

Real life example

Let’s say you need to run several js tests and js linter (or prettier, or whatever tool you use for code quality assurance) and then build Docker image, pushing it into Docker Hub afterward.

Here is zerber.json — config file you need to put into the root of your app:

{
"deploy": {
// Run this step only in master branch
"branch": "master",
"command": "deploy", // Deployment steps will run only after other steps complete
// successfully
"isDeploy": true,
"title": "Deploy to Docker Hub"
},
"lint": {
"command" : "lint",
"isPartial" : true,
"fileRegexp": "\\.js$",
"title" : "Lint JS"
},
"test": {
"command": "test",
"title": "Test JS"
}
}

You must have all the mentioned commands in your package.jsondeploy, lint and test.

{
"name": "thisismyapp",
"version": "1.0.0",
"scripts": {
"lint": "eslint",
"test": "jest --env=jsdom",
"deploy": "./bin/deploy.sh"
}
}

deploy command calls following bash script:

#!/bin/bashdocker build -t hiiamjohn/thisismyapp:latest .
docker login -u "$DOCKER_USER" -p "$DOCKER_PASSWORD"
docker push "hiiamjohn/thisismyapp:latest"

Considering you have Dockerfile in the app root which copies app into container and performs all the build steps inside.

Zerber allows you to define build environment variables, which will be available to any npm command. For security reasons environment variables are not shared at the OS level and are passed directly to npm command.

How to become a beta tester?

Simply drop us an email to gvidon@ottofeller.com (or leave your email on website https://zerber.io/) where briefly describe what kind of tasks you are going to run on Zerber or just share the link to repos you are going to connect it to.

OttoFeller is the software development company specialising in front end of complex web applications and promising cutting edge technologies.

--

--