Coder Social home page Coder Social logo

bb-drummer / gitness Goto Github PK

View Code? Open in Web Editor NEW

This project forked from harness/gitness

0.0 0.0 0.0 30.13 MB

Gitness is an Open Source developer platform with Source Control management, Continuous Integration and Continuous Delivery.

Home Page: https://gitness.com

License: Apache License 2.0

Shell 0.01% JavaScript 0.84% Go 62.37% TypeScript 31.43% Makefile 0.13% HTML 0.01% Dockerfile 0.06% SCSS 5.15%

gitness's Introduction

Gitness

Your lightweight, super fast code hosting and continuous integration service (powered by Drone)

Gitness is building on top of Drone to create a new, open source developer platform with code hosting and pipeline capabilities. Gitness development is taking place in the master branch. Drone development will continue in the drone branch until we a ready for our first tagged Gitness release, at which point the project will fully converge.

For more information on Gitness, please visit gitness.com. For more information on Drone, please visit drone.io

Using Docker

The latest publicly released docker image can be found on harness/gitness. To try it out, run the command below. Once the container is running, you can visit localhost:3000 in your browser.

docker run \
  -p 3000:3000 \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -v /tmp/gitness:/data \
  harness/gitness:latest

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 contaner is stopped.

Pre-Requisites

Install the latest stable version of Node and Go version 1.19 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

Build the user interface:

$ pushd web
$ yarn install
$ yarn build
$ popd

Build the server and command line tools:

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

Start the server at localhost:3000

./gitness server .local.env

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.

Swagger

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

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

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

REST API

Please refer to the swagger for the specification of our rest API.

For testing, it's simplest to execute operations as the default user admin using a PAT:

# 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

gitness's People

Contributors

bradrydzewski avatar eoinmcafee00 avatar kzaitsev avatar josmo avatar fudanchii avatar tboerger avatar appleboy avatar donny-dont avatar techknowlogick avatar marko-gacesa avatar floatdrop avatar benschumacher avatar oliveiradan avatar kvigen avatar scottferg avatar ulrichschreiner avatar lucretius avatar mnutt avatar tonglil avatar letusfly85 avatar andy-g avatar johannesharness avatar jmccann avatar strk avatar praxist avatar vaijab avatar epipho avatar bsauvajon avatar xuyang2 avatar yosssi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.