Drone is a Container-Native, Continuous Delivery Platform
Go to file
mbatchelor 654c7c2eac feat: [BT-10437]: Autotagging - Detect material service changes 2025-01-14 07:12:22 -05:00
.engops feat: [BT-10437]: Autotagging - Detect material service changes 2025-01-14 07:12:22 -05:00
.githooks [MISC] Fix Linting/Formatting/Generated Files (#697) 2023-10-19 00:36:07 +00:00
.github/workflows pull request import (#2121) 2024-07-06 00:46:36 +00:00
.testapi feat: [code-2912]: usage service implementation (#3168) 2024-12-20 10:28:47 +00:00
.vscode feat: [CODE-2402] : Update all occurences of 'gitness' to 'harness' within comments and markdown. Updated the logo reference (did not delete the Gitness logo directory yet). No active code changes except display strings. (#2684) 2024-09-25 00:13:28 +00:00
app feat: [CDE-572]: Adding support for features- sorting and building. (#3248) 2025-01-14 08:21:44 +00:00
audit feat: [CODE-2568]: Add rules API for space level (#2865) 2024-11-19 12:52:27 +00:00
blob feat: [CODE-2531]: replace os.IsNotExist(err) with error.Is(err, fs.ErrNotExist) (#3036) 2024-11-22 12:17:56 +00:00
cache feat: [code-2911] data race panic when cache counters are modified (#3130) 2024-12-10 00:28:43 +00:00
charts/gitness fix: helm chart fix (#3590) 2024-12-09 14:09:19 -08:00
cli feat: [CDE-576]: add port for JetBrains IDEs (#3243) 2025-01-10 03:22:32 +00:00
client remove internal package and move to app - might be refactored more in the coming weeks 2023-09-26 11:25:15 -07:00
cmd/gitness feat: [CDE-576]: add port for JetBrains IDEs (#3243) 2025-01-10 03:22:32 +00:00
contextutil [CODE-1287] Improve PR Merge for canceled Request (#963) 2024-01-12 20:25:16 +00:00
crypto feat: [CODE-2886]: jira auth support (#3119) 2024-12-12 19:36:08 +00:00
encrypt [OPEN-SOURCE] Prepare Repository (#605) 2023-09-24 07:33:16 +00:00
errors feat: [CODE-2292]: Add API for space level webhook creation (#2730) 2024-10-18 16:27:56 +00:00
events [GH] Fix typos (#3566) 2024-11-07 11:34:07 -08:00
genai fix: [ML-505]: changes to support update-step API for Harness Intelligence (#3156) 2024-12-16 11:42:40 +00:00
git feat: [code-2984]: fix datarace on branch and tag counts, improved cmd package with mutex (#3202) 2024-12-25 13:22:48 +00:00
http feat: [CODE-2212]: Improve SSH Configuration (#2446) 2024-08-09 16:21:41 +00:00
infraprovider feat: [CDE-545]: check during provision retry for latest instance (#3114) 2024-12-05 05:25:02 +00:00
job [MISC] fix repo delete for older repos that failed import (#972) 2024-01-17 19:10:10 +00:00
livelog fix: [CDE-150]: In logstream, adding locking and panic recovery around a subscriber's publish method. Adding check in the stream's publish method to not publish if the sub is closed. Closing the err channel in the log stream API handler. (#2218) 2024-07-15 08:10:59 +00:00
lock fix lint errors (#1034) 2024-02-09 01:15:15 +00:00
logging [CODE-1287] Improve PR Merge for canceled Request (#963) 2024-01-12 20:25:16 +00:00
profiler [MISC] Fix Linting/Formatting/Generated Files (#697) 2023-10-19 00:36:07 +00:00
pubsub [Pubsub] handle closed redis channel (#800) 2023-11-15 00:04:34 +00:00
registry feat: [AH-786]: Updated Layer query to fix allowing duplicate layers (#3253) 2025-01-14 06:19:29 +00:00
resources [GH] Fix typos (#3566) 2024-11-07 11:34:07 -08:00
scripts feat: [AH-687]: Added PR check script for code coverage (#3135) 2024-12-19 09:31:11 +00:00
secret [AH-310]: temp push; need to check (#2607) 2024-08-29 19:42:22 +00:00
ssh feat: [CODE-2865]: ssh support changes (#3052) 2025-01-13 15:56:57 +00:00
store feat: [AH-309]: Artifact Registry integration (#2318) 2024-08-22 00:28:17 +00:00
stream fix: [CDE-484]: Changing the behaviour of the inmemory stream consumer to retry the message after timeout. (#2993) 2024-11-18 05:33:40 +00:00
types feat: [CDE-572]: Adding support for features- sorting and building. (#3248) 2025-01-14 08:21:44 +00:00
version prepare open-source 2023-09-25 19:07:35 -07:00
web feat: [CODE-2819]: Archive Repo functionality (#3097) 2025-01-13 23:00:54 +00:00
.dockerignore [SSH] Minor Server Changes (#2088) 2024-06-10 20:09:35 +00:00
.gitignore feat: [code-2912]: usage service implementation (#3168) 2024-12-20 10:28:47 +00:00
.golangci.yml feat:[AH-628]: Generic blob store support (#3220) 2025-01-10 05:09:14 +00:00
.local.env feat: [CDE-475]: Adding support for runArgs. (#3031) 2024-11-25 09:56:30 +00:00
CONTRIBUTING.md feat: [CODE-2402] : Update all occurences of 'gitness' to 'harness' within comments and markdown. Updated the logo reference (did not delete the Gitness logo directory yet). No active code changes except display strings. (#2684) 2024-09-25 00:13:28 +00:00
Dockerfile fix: [CODE-2516]: fix typo in dockerfile (#2823) 2024-10-16 17:51:42 +00:00
LICENSE prepare open-source 2023-09-25 19:07:35 -07:00
Makefile [GH] Fix typos (#3566) 2024-11-07 11:34:07 -08:00
NOTICE feat: [AH-309]: Artifact Registry integration (#2318) 2024-08-22 00:28:17 +00:00
README.md [GH] Fix typos (#3566) 2024-11-07 11:34:07 -08:00
go.mod feat: [CDE-572]: Adding support for features- sorting and building. (#3248) 2025-01-14 08:21:44 +00:00
go.sum feat: [CDE-572]: Adding changes to support features. (#3244) 2025-01-13 11:44:24 +00:00

README.md

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 22:22 \
  -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/protoc-gen-go@v1.28.1 (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/protoc-gen-go-grpc@v1.2.0

$ 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

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 send 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.