Harness is a free, open source build & deployment project written in Go and released under Apache-2.0. It has 38,378 GitHub stars, 3,397 forks and 106 open issues, and was last pushed 35 hours ago. On this registry it ranks #5 of 59 tracked projects in Build & Deployment, with 5 head-to-head comparisons available. It gained 46 stars over the last 6 tracked days.

Harness — End-to-end open source software delivery platform

What is Harness?

Harness Open Source is an Apache-2.0, Go-based developer platform that combines Git source control management, CI/CD pipelines, Gitspaces hosted development environments and artifact registries into one self-hostable system for engineering teams that want end-to-end software delivery without stitching four separate products together.

What it is

Harness Open Source is the open source developer platform published from the harness/harness repository, documented at developer.harness.io and presented at harness.io/open-source. Four capabilities live in one container and one codebase: code hosting and source control management over Git, automated DevOps pipelines for continuous integration and continuous delivery, Gitspaces hosted development environments, and artifact registries. The project is written in Go and licensed under Apache-2.0, and its topic list covers continuous-integration, continuous-delivery, build-pipelines, build-automation, code-repository, git, docker, scm and go.

The concrete problem it solves is sprawl in the delivery chain. Harness is the declared successor to Drone: where Drone focused solely on continuous integration, Harness adds source code hosting, developer environments and artifact registries, so a team that previously ran a Git host, a CI server, an environment manager and a container registry separately can run one platform instead. The README states the goal is eventual full parity with Drone in pipeline capabilities so users can migrate seamlessly, while a snapshot of Drone is preserved on the drone feature branch for continued development; Harness development itself happens on the main branch.

Key capabilities

  • Git-based source control management and code hosting, listed under the code-repository and scm topics.
  • CI/CD pipelines that run inside Docker containers, with automatic negotiation of the Docker API version so the same setup works with Docker Desktop, Rancher Desktop, Colima and native Docker on Linux.
  • Gitspaces hosted development environments for developers who would rather not configure a local toolchain.
  • Artifact registries alongside the pipeline engine, so build outputs are stored without a separate registry product.
  • Single-container deployment from the harness/harness Docker image, exposing port 3000 for the web interface and port 3022, with persistent state stored under the mounted /data volume.
  • Docker daemon integration through a mounted socket, which defaults to /var/run/docker.sock.
  • Source builds on every operating system and architecture supported by Go, with no Docker required for local development and testing.

Who uses it and how

  • Teams migrating off Drone that want code hosting, pipelines, environments and registries from one platform instead of four.
  • Platform and DevOps groups that deploy a single container to a Linux host, mount the Docker socket so pipelines can create build containers, and mount /tmp/harness or a named volume so the database and repositories survive restarts.
  • Developers on macOS working through Docker Desktop, Rancher Desktop or Colima, since the application negotiates the Docker API version rather than pinning one.
  • Contributors building the platform itself, using Go 1.20 or higher, Node, protobuf v3.21.11 with the protoc-gen-go v1.28.1 and protoc-gen-go-grpc v1.2.0 plugins; hacktoberfest appears among the repository topics.

Getting started

The supported route is the published harness/harness Docker image: a single docker run command with -p 3000:3000, -p 3022:3022, the Docker socket mounted and a /data volume attached starts the platform, after which the web interface is reachable at http://localhost:3000. Building from source follows make dep, make tools, yarn install, yarn build and make build, after which the server starts with ./gitness server .local.env.

How it compares

Within the tools named in the facts, Harness Open Source is positioned directly against Drone, the CI-only project it grew out of and intends to succeed. Drone remains available on the drone branch for teams whose pipelines already work there, while Harness is where new development happens, and the README is explicit that full pipeline parity with Drone will take time. The facts list no paid products that this project is offered as a replacement for.

When to use it — and when not to

A self-hoster must supply a running Docker daemon, mount its socket into the container, and provide a bind mount or named volume for /data, because the image keeps its database and repositories there and all data is lost once the container is stopped without one. Teams that need only continuous integration, or that depend on mature Drone pipeline behaviour, should note the README's own admission that parity is still being reached and that Drone is kept as a separate branch rather than folded in. The repository shows 106 open issues against 38,376 stars, but the README excerpt is thin on registry, Gitspace and pipeline detail, so evaluation will lean on the linked developer.harness.io documentation.

project readme (upstream, from github) — read inline

Harness

Harness Open Source is an open source development platform packed with the power of code hosting, automated DevOps pipelines, hosted development environments (Gitspaces), and artifact registries.

Overview

Harness Open source is an open source development platform packed with the power of code hosting, automated DevOps pipelines, Gitspaces, and artifact registries.

Running Harness locally

The latest publicly released docker image can be found on harness/harness.

To install Harness yourself, simply run the command below. Once the container is up, you can visit http://localhost:3000 in your browser.

docker run -d \
  -p 3000:3000 \
  -p 3022:3022 \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -v /tmp/harness:/data \
  --name harness \
  --restart always \
  harness/harness

The Harness image uses a volume to store the database and repositories. It is highly recommended to use a bind mount or named volume as otherwise all data will be lost once the container is stopped.

See developer.harness.io to learn how to get the most out of Harness.

Where is Drone?

Harness Open Source represents a massive investment in the next generation of Drone. Where Drone focused solely on continuous integration, Harness adds source code hosting, developer environments (gitspaces), and artifact registries; providing teams with an end-to-end, open source DevOps platform.

The goal is for Harness to eventually be at full parity with Drone in terms of pipeline capabilities, allowing users to seamlessly migrate from Drone to Harness.

But, we expect this to take some time, which is why we took a snapshot of Drone as a feature branch drone (README) so it can continue development.

As for Harness, the development is taking place on the main branch.

For more information on Harness, please visit developer.harness.io.

For more information on Drone, please visit drone.io.

Harness Open Source Development

Pre-Requisites

Install the latest stable version of Node and Go version 1.20 or higher, and then install the below Go programs. Ensure the GOPATH bin directory is added to your PATH.

Install protobuf

  • Check if you've already installed protobuf protoc --version
  • If your version is different than v3.21.11, run brew unlink protobuf
  • Get v3.21.11 curl -s https://raw.githubusercontent.com/Homebrew/homebrew-core/9de8de7a533609ebfded833480c1f7c05a3448cb/Formula/protobuf.rb > /tmp/protobuf.rb
  • Install it brew install /tmp/protobuf.rb
  • Check out your version protoc --version

Install protoc-gen-go and protoc-gen-go-rpc:

  • Install protoc-gen-go v1.28.1 go install google.golang.org/protobuf/cmd/[email protected] (Note that this will install a binary in $GOBIN so make sure $GOBIN is in your $PATH)

  • Install protoc-gen-go-grpc v1.2.0 go install google.golang.org/grpc/cmd/[email protected]

$ make dep
$ make tools

Build

First step is to build the user interface artifacts:

$ pushd web
$ yarn install
$ yarn build
$ popd

After that, you can build the Harness binary:

$ make build

Run

This project supports all operating systems and architectures supported by Go. This means you can build and run the system on your machine; docker containers are not required for local development and testing.

To start the server at localhost:3000, simply run the following command:

./gitness server .local.env

Docker Configuration for Pipelines

Harness pipelines run inside Docker containers. The application automatically negotiates the Docker API version with your Docker daemon, so it works with various Docker versions including Docker Desktop, Rancher Desktop, Colima, and native Docker on Linux.

Docker Socket Location

By default, Harness expects the Docker socket at /var/run/docker.sock. If you're using an alternative Docker runtime, you may need to configure the socket location:

Runtime Socket Location Configuration
Docker Desktop /var/run/docker.sock Works by default
Rancher Desktop ~/.rd/docker.sock Create symlink or set GITNESS_DOCKER_HOST
Colima ~/.colima/default/docker.sock Create symlink or set GITNESS_DOCKER_HOST
Linux (native) /var/run/docker.sock Works by default

Option 1: Create a symlink (recommended)

# For Rancher Desktop
sudo ln -sf ~/.rd/docker.sock /var/run/docker.sock

# For Colima
sudo ln -sf ~/.colima/default/docker.sock /var/run/docker.sock

Option 2: Set environment variable

Add to your .local.env:

# For Rancher Desktop
GITNESS_DOCKER_HOST=unix:///Users/<username>/.rd/docker.sock

# For Colima
GITNESS_DOCKER_HOST=unix:///Users/<username>/.colima/default/docker.sock

Pinning Docker API Version

The application automatically negotiates the API version with your Docker daemon. If you need to pin a specific version (e.g., for compatibility testing), you can set:

GITNESS_DOCKER_API_VERSION=1.45

Auto-Generate Harness API Client used by UI using Swagger

Please make sure to update the autogenerated client code used by the UI when adding new rest APIs.

To regenerate the code, please execute the following steps:

  • Regenerate swagger with latest Harness binary ./gitness swagger > web/src/services/code/swagger.yaml
  • navigate to the web folder and run yarn services

The latest API changes should now be reflected in web/src/services/code/index.tsx

Run Registry Conformance Tests

make conformance-test

For running conformance tests with existing running service, use:

make hot-conformance-test

User Interface

This project includes a full user interface for interacting with the system. When you run the application, you can access the user interface by navigating to http://localhost:3000 in your browser.

REST API

This project includes a swagger specification. When you run the application, you can access the swagger specification by navigating to http://localhost:3000/swagger in your browser (for raw yaml see http://localhost:3000/openapi.yaml). For registry endpoints, currently swagger is located on different endpoint http://localhost:3000/registry/swagger/ (for raw json see http://localhost:3000/registry/swagger.json). These will be later moved to the main swagger endpoint.

For testing, it's simplest to just use the cli to create a token (this requires Harness server to run):

# LOGIN (user: admin, pw: changeit)
$ ./gitness login

# GENERATE PAT (1 YEAR VALIDITY)
$ ./gitness user pat "my-pat-uid" 2592000

The command outputs a valid PAT that has been granted full access as the user. The token can then be sent as part of the Authorization header with Postman or curl:

$ curl http://localhost:3000/api/v1/user \
-H "Authorization: Bearer $TOKEN"

CLI

This project includes VERY basic command line tools for development and running the service. Please remember that you must start the server before you can execute commands.

For a full list of supported operations, please see

$ ./gitness --help

Contributing

Refer to CONTRIBUTING.md

License

Apache License 2.0, see LICENSE.

Frequently asked questions

Is Harness free to use?

Harness is open source under the Apache-2.0 licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does Harness do?

End-to-end open source software delivery platform

What is Harness written in?

Harness is primarily written in Go. Its source is publicly available at https://github.com/harness/harness, and it has 38,378 GitHub stars.