Convert Figma logo to code with AI

harness logogitness

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

32,102
2,797
32,102
148

Top Related Projects

44,785

Gogs is a painless self-hosted Git service

13,150

Git Server with CI/CD, Kanban, and Packages. Seamless integration. Unparalleled experience.

A Git platform powered by Scala with easy installation, high extensibility & GitHub API compatibility

Quick Overview

Gitness is an open-source project management and version control platform developed by Harness. It combines Git repository management with CI/CD capabilities, issue tracking, and collaboration features, aiming to provide a comprehensive solution for software development teams.

Pros

  • Integrates version control, CI/CD, and project management in a single platform
  • Open-source and self-hostable, offering greater control and customization
  • Provides a user-friendly interface for managing Git repositories and workflows
  • Includes built-in CI/CD pipelines, reducing the need for external tools

Cons

  • Relatively new project, which may lead to potential stability issues or missing features
  • Limited ecosystem compared to more established platforms like GitHub or GitLab
  • May require more setup and maintenance effort compared to cloud-hosted solutions
  • Documentation and community support might be less extensive than more mature alternatives

Getting Started

To get started with Gitness, follow these steps:

  1. Clone the repository:

    git clone https://github.com/harness/gitness.git
    
  2. Navigate to the project directory:

    cd gitness
    
  3. Build and run Gitness using Docker Compose:

    docker-compose up -d
    
  4. Access the Gitness web interface at http://localhost:3000

  5. Create an admin account and start using Gitness for your projects

Note: For production use, refer to the official documentation for more detailed setup instructions and configuration options.

Competitor Comparisons

44,785

Gogs is a painless self-hosted Git service

Pros of Gogs

  • Lightweight and resource-efficient, suitable for low-powered devices
  • Simple setup process with minimal dependencies
  • Self-contained binary, making deployment and upgrades easier

Cons of Gogs

  • Less feature-rich compared to Gitness
  • Slower development pace and fewer updates
  • Limited built-in CI/CD capabilities

Code Comparison

Gogs (Go):

func (repo *Repository) GetCommit(commitID string) (*git.Commit, error) {
    gitRepo, err := git.OpenRepository(repo.RepoPath())
    if err != nil {
        return nil, err
    }
    return gitRepo.GetCommit(commitID)
}

Gitness (Go):

func (s *Service) GetCommit(ctx context.Context, repoRef string, sha string) (*types.Commit, error) {
    repo, err := s.repoStore.Find(ctx, repoRef)
    if err != nil {
        return nil, err
    }
    return s.git.GetCommit(ctx, repo.Path, sha)
}

Both projects use Go and provide similar functionality for retrieving commits. Gitness appears to have a more structured service-based approach, while Gogs uses a simpler, more direct method. Gitness also includes context handling, which is a more modern Go practice for managing request lifecycles and cancellations.

13,150

Git Server with CI/CD, Kanban, and Packages. Seamless integration. Unparalleled experience.

Pros of OneDev

  • More mature project with a longer development history
  • Offers a wider range of features, including issue tracking and CI/CD pipelines
  • Has a larger community and more extensive documentation

Cons of OneDev

  • Heavier resource usage due to its comprehensive feature set
  • Steeper learning curve for new users
  • Less focus on specific Git-related features compared to Gitness

Code Comparison

OneDev (Java):

@Editable(name="Git")
public class GitSetting implements Serializable {
    private static final long serialVersionUID = 1L;
    private String gitExePath;
    private int timeout = 60;
}

Gitness (Go):

type GitConfig struct {
    BinPath string `json:"bin_path" yaml:"bin_path"`
    Timeout time.Duration `json:"timeout" yaml:"timeout"`
}

Both projects implement Git-related configurations, but OneDev uses Java annotations for editability, while Gitness uses Go struct tags for JSON/YAML serialization. OneDev's approach may offer more flexibility in UI generation, while Gitness's approach is more idiomatic for Go and easier to serialize.

A Git platform powered by Scala with easy installation, high extensibility & GitHub API compatibility

Pros of GitBucket

  • Written in Scala, offering a more concise and expressive codebase
  • Longer development history and more mature project (started in 2013)
  • Extensive plugin system for customization and feature extension

Cons of GitBucket

  • Smaller community and fewer contributors compared to Gitness
  • Less frequent updates and potentially slower feature development
  • May have a steeper learning curve for developers not familiar with Scala

Code Comparison

GitBucket (Scala):

def getRepositoryInfo(owner: String, repository: String): Option[RepositoryInfo] = {
  getRepository(owner, repository).map { repositoryInfo =>
    // Additional logic...
    repositoryInfo
  }
}

Gitness (Go):

func (s *Service) GetRepository(ctx context.Context, repoRef string) (*types.Repository, error) {
    repo, err := s.repos.Find(ctx, repoRef)
    if err != nil {
        return nil, err
    }
    return repo, nil
}

Both projects aim to provide Git repository management solutions, but they differ in their implementation languages and overall architecture. GitBucket offers a more established ecosystem with its plugin system, while Gitness, being newer, may provide a more modern approach to repository management.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

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.