Drone is a Container-Native, Continuous Delivery Platform
Go to file
Hitesh Aringa 4c66928a50
Updating images for signin and register page. (#3559)
Co-authored-by: Patrick Wolf <patrick.wolf@harness.io>
2024-09-24 15:44:57 -07: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
.vscode
app feat: [CDE-286]: Moving user and git mgmt to respective services. (#2634) 2024-09-02 10:27:27 +00:00
audit feat: [AH-309]: Artifact Registry integration (#2318) 2024-08-22 00:28:17 +00:00
blob feat: Update token source impersonation and add expiration check (#815) 2023-11-27 14:41:39 +00:00
cache [maint] fix cache decoder (#1150) 2024-03-27 17:51:07 +00:00
charts/gitness
cli [AH-329]: Updated manifest issue and unnecessary logging 2024-09-03 22:08:31 +00:00
client
cmd/gitness feat: [CDE-286]: Moving user and git mgmt to respective services. (#2634) 2024-09-02 10:27:27 +00:00
contextutil [CODE-1287] Improve PR Merge for canceled Request (#963) 2024-01-12 20:25:16 +00:00
encrypt
errors Fix merge related issues (#2012) 2024-04-25 22:00:53 +00:00
events fix lint errors (#1034) 2024-02-09 01:15:15 +00:00
genai feat: [ML-302]: Framework For Harness Intelligence APIs (#2547) 2024-08-20 22:05:29 +00:00
git add missing error check in CommitFiles (#2605) 2024-08-28 12:51:18 +00:00
http feat: [CODE-2212]: Improve SSH Configuration (#2446) 2024-08-09 16:21:41 +00:00
infraprovider feat: [CDE-241]: Adding protocol to the gitspace port returned by the IDE and corresponding changes. Fixing gitspace instance's reference instead of value in the orchestrator. (#2521) 2024-08-16 08:31:05 +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
pubsub [Pubsub] handle closed redis channel (#800) 2023-11-15 00:04:34 +00:00
registry [AH-329]: Updated manifest issue and unnecessary logging 2024-09-03 22:08:31 +00:00
resources
scripts
secret [AH-310]: temp push; need to check (#2607) 2024-08-29 19:42:22 +00:00
ssh [SSH] Minor Server Changes (#2088) 2024-06-10 20:09:35 +00:00
store feat: [AH-309]: Artifact Registry integration (#2318) 2024-08-22 00:28:17 +00:00
stream add logging for redis history sanning (#2417) 2024-08-07 00:15:34 +00:00
types [AH-329]: Updated env vars 2024-09-03 22:08:31 +00:00
version
web Updating images for signin and register page. (#3559) 2024-09-24 15:44:57 -07:00
.dockerignore [SSH] Minor Server Changes (#2088) 2024-06-10 20:09:35 +00:00
.gitignore feat: [AH-309]: Artifact Registry integration (#2318) 2024-08-22 00:28:17 +00:00
.golangci.yml feat: [AH-309]: Artifact Registry integration (#2318) 2024-08-22 00:28:17 +00:00
.local.env [AH-309]: Updated config to make Registry enabled by default (#2570) 2024-08-22 21:46:01 +00:00
CONTRIBUTING.md Add Gitness contributing guide (#3497) 2024-04-10 13:09:57 -07:00
Dockerfile feat: [CI-13861]: support gitness provided variables for docker configuration (#2517) 2024-08-15 12:15:31 +00:00
LICENSE
Makefile feat: [AH-309]: Artifact Registry integration (#2318) 2024-08-22 00:28:17 +00:00
NOTICE feat: [AH-309]: Artifact Registry integration (#2318) 2024-08-22 00:28:17 +00:00
README.md feat: [AH-309]: Artifact Registry integration (#2318) 2024-08-22 00:28:17 +00:00
go.mod feat: [AH-309]: Artifact Registry integration (#2318) 2024-08-22 00:28:17 +00:00
go.sum feat: [AH-309]: Artifact Registry integration (#2318) 2024-08-22 00:28:17 +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:

  • Regenerate swagger with latest gitness 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 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

Contributing

Refer to CONTRIBUTING.md

License

Apache License 2.0, see LICENSE.