Go to file
Calvin Lee 2bd982d58f fix: [code-1195]: capitalize initialize (#923) 2023-12-19 00:24:25 +00:00
.githooks [MISC] Fix Linting/Formatting/Generated Files (#697) 2023-10-19 00:36:07 +00:00
.github/workflows Update ci-lint.yml (#3434) 2023-12-13 08:21:50 -08:00
.vscode [CODE-1011]: Disable case sensitive branch search and remove gitea open repo (#732) 2023-10-27 23:46:34 +00:00
app [maint] in when tree entry is not found return PathNotFound error (#921) 2023-12-18 14:29:09 +00:00
blob feat: Update token source impersonation and add expiration check (#815) 2023-11-27 14:41:39 +00:00
cache [LINT] Fix All Linting Errors (#609) 2023-09-26 00:56:53 +00:00
charts/gitness Feature: Helm kubernetes Deployment (#3417) 2023-11-08 11:55:37 -08:00
cli separate job package config from gitness types (#897) 2023-12-13 06:15:09 +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: refactor status check to create abstraction (#902) 2023-12-15 07:13:13 +00:00
encrypt [OPEN-SOURCE] Prepare Repository (#605) 2023-09-24 07:33:16 +00:00
errors [maint] in when tree entry is not found return PathNotFound error (#921) 2023-12-18 14:29:09 +00:00
events feat: add gomailer client in gitness for mail notifications (#748) 2023-11-02 08:25:25 +00:00
git [maint] in when tree entry is not found return PathNotFound error (#921) 2023-12-18 14:29:09 +00:00
githook [LINT] Fix All Linting Errors (#609) 2023-09-26 00:56:53 +00:00
http [MISC] Replace `BIND` with `PORT`, fix space_path for postgres (#607) 2023-09-25 22:34:45 +00:00
job separate job package config from gitness types (#897) 2023-12-13 06:15:09 +00:00
livelog [MISC] Fix Linting/Formatting/Generated Files (#697) 2023-10-19 00:36:07 +00:00
lock [BugBash] Fix PR Activities, Increase merge lock timeout (#783) 2023-11-09 20:04:36 +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
resources [OPEN-SOURCE] Prepare Repository (#605) 2023-09-24 07:33:16 +00:00
scripts [MISC] Fix Linting/Formatting/Generated Files (#697) 2023-10-19 00:36:07 +00:00
store [maint] gitrpc package removed (#726) 2023-11-15 10:15:32 +00:00
stream [MISC] Fix Linting/Formatting/Generated Files (#697) 2023-10-19 00:36:07 +00:00
types [GIT] migrate git.enum (#889) 2023-12-08 23:07:59 +00:00
version prepare open-source 2023-09-25 19:07:35 -07:00
web fix: [code-1195]: capitalize initialize (#923) 2023-12-19 00:24:25 +00:00
.dockerignore prepare open-source 2023-09-25 19:07:35 -07:00
.gitignore prepare open-source 2023-09-25 19:07:35 -07:00
.golangci.yml [LINT] Fix All Linting Errors (#609) 2023-09-26 00:56:53 +00:00
.local.env prepare open-source 2023-09-25 19:07:35 -07:00
Dockerfile Use golang alpine 3.18 to fix docker build (#910) 2023-12-14 12:09:54 +00:00
LICENSE prepare open-source 2023-09-25 19:07:35 -07:00
Makefile [maint] gitrpc package removed (#726) 2023-11-15 10:15:32 +00:00
README.md Update ci-lint.yml (#3434) 2023-12-13 08:21:50 -08:00
go.mod go 1.20 (#832) 2023-11-30 10:06:06 +00:00
go.sum [maint] gitrpc package removed (#726) 2023-11-15 10:15:32 +00:00

README.md

Gitness

Gitness is an open source development platform packed with the power of code hosting and automated DevOps pipelines.

Overview

Gitness is an open source development platform packed with the power of code hosting and automated continuous integration pipelines.

Running Gitness locally

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

To install Gitness 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 \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -v /tmp/gitness:/data \
  --name gitness \
  --restart always \
  harness/gitness

The Gitness 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 docs.gitness.com to learn how to get the most out of Gitness.

Where is Drone?

Gitness represents a massive investment in the next generation of Drone. Where Drone focused on continuous integration, Gitness adds source code hosting, bringing code management and pipelines closer together.

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

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 Gitness, the development is taking place on the main branch.

For more information on Gitness, please visit gitness.com.

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

Gitness 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 gitness 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 Gitness 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:

  • Run local gitness instance with latest changes
  • Get latest OpenAPI specs from http://localhost:3000/openapi.yaml and store it in web/src/services/code/swagger.yaml
  • navigate into the web folder and run yarn services

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

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 testing, it's simplest to just use the cli to create a token (this requires gitness 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