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)
* Apply suggestion from code review * updating images for signin and register page. * fix: lint * fix: logo update * revert golangci * Adding more strings and updated the logo. Still need to update the signin page images * Apply suggestion from code review Updating harness logo to use Open Source logo * 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.pull/3560/head
|
@ -5,6 +5,7 @@
|
|||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
//TODO update this when we are ready to cutover
|
||||
"name": "Gitness",
|
||||
"type": "go",
|
||||
"request": "launch",
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
# Contributing to Gitness
|
||||
# Contributing to Harness
|
||||
|
||||
Thank you for your interest in contributing to the Gitness project. Gitnes uses GitHub to manage reviews of pull requests.
|
||||
Thank you for your interest in open source contributions to Harness. Harness uses GitHub to manage open source reviews of pull requests.
|
||||
|
||||
* If you are a new contributor see: [Steps to Contribute](#steps-to-contribute)
|
||||
|
||||
* If you have a minor fix or improvement, feel free to create a pull request. Please provide necessary details in the pull request description and use a meaningful title.
|
||||
|
||||
* If you plan to do something more involved, first discuss your ideas by [raising an issue](https://github.com/harness/gitness/issues). This will avoid unnecessary work and surely give you and us a good deal of inspiration.
|
||||
* If you plan to do something more involved, first discuss your ideas by [raising an issue](https://github.com/harness/harness/issues). This will avoid unnecessary work and surely give you and us a good deal of inspiration.
|
||||
|
||||
* Relevant coding style guidelines are
|
||||
|
||||
|
@ -19,11 +19,11 @@ Thank you for your interest in contributing to the Gitness project. Gitnes uses
|
|||
|
||||
Should you wish to work on an issue, please claim it first by commenting on the GitHub issue that you want to work on. This is to prevent duplicated efforts from contributors on the same issue.
|
||||
|
||||
Please check the [`good-first-issue`](https://github.com/harness/gitness/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) label to find issues that are good for getting started. If you have questions about one of the issues, with or without the tag, please comment on them and one of the maintainers will clarify it. For a quicker response, contact us over [slack](https://docs.gitness.com/support#slack) or join our [weekly office hours](https://docs.gitness.com/support#weekly-office-hours).
|
||||
Please check the [`good-first-issue`](https://github.com/harness/harness/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) label to find issues that are good for getting started. If you have questions about one of the issues, with or without the tag, please comment on them and one of the maintainers will clarify it. For a quicker response, contact us over [slack](https://developer.harness.io/docs/open-source/support#slack).
|
||||
|
||||
### Local Development
|
||||
|
||||
Please review [Gitness development](https://github.com/harness/gitness/tree/main?tab=readme-ov-file#gitness-development) to build and test your code locally.
|
||||
Please review [Harness development](https://github.com/harness/harness/tree/main?tab=readme-ov-file#harness-development) to build and test your code locally.
|
||||
|
||||
### Pre-commit Hook
|
||||
|
||||
|
@ -31,7 +31,7 @@ We have a pre-commit hook to ensure code quality before committing changes. This
|
|||
|
||||
### Lint Check
|
||||
|
||||
Our CI Linter pipeline conducts automated checks for code quality, with [separate lint checks for Go and TypeScript](https://github.com/harness/gitness/blob/main/.github/workflows/ci-lint.yml). These checks help ensure adherence to coding standards and identify potential issues early in the development process. Thank you for contributing to our code quality efforts!
|
||||
Our CI Linter pipeline conducts automated checks for code quality, with [separate lint checks for Go and TypeScript](https://github.com/harness/harness/blob/main/.github/workflows/ci-lint.yml). These checks help ensure adherence to coding standards and identify potential issues early in the development process. Thank you for contributing to our code quality efforts!
|
||||
|
||||
## Pull Request Checklist
|
||||
|
||||
|
@ -45,7 +45,7 @@ Our CI Linter pipeline conducts automated checks for code quality, with [separat
|
|||
|
||||
## Dependency management
|
||||
|
||||
The Gitness project uses [Go modules](https://golang.org/cmd/go/#hdr-Modules__module_versions__and_more) to manage dependencies on external packages.
|
||||
Harness uses [Go modules](https://golang.org/cmd/go/#hdr-Modules__module_versions__and_more) to manage dependencies on external packages.
|
||||
|
||||
To add or update a new dependency, use the `go get` command:
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ COPY ./web .
|
|||
RUN yarn && yarn build && yarn cache clean
|
||||
|
||||
# ---------------------------------------------------------#
|
||||
# Build gitness image #
|
||||
# Build Harness image #
|
||||
# ---------------------------------------------------------#
|
||||
FROM --platform=$BUILDPLATFORM golang:1.22-alpine3.18 as builder
|
||||
|
||||
|
|
8
Makefile
|
@ -25,7 +25,7 @@ init: ## Install git hooks to perform pre-commit checks
|
|||
git config core.hooksPath .githooks
|
||||
git config commit.template .gitmessage
|
||||
|
||||
dep: $(deps) ## Install the deps required to generate code and build gitness
|
||||
dep: $(deps) ## Install the deps required to generate code and build Harness
|
||||
@echo "Installing dependencies"
|
||||
@go mod download
|
||||
|
||||
|
@ -34,12 +34,12 @@ tools: $(tools) ## Install tools required for the build
|
|||
|
||||
###############################################################################
|
||||
#
|
||||
# Gitness Build and testing rules
|
||||
# Harness Build and testing rules
|
||||
#
|
||||
###############################################################################
|
||||
|
||||
build: generate ## Build the all-in-one gitness binary
|
||||
@echo "Building Gitness Server"
|
||||
build: generate ## Build the all-in-one Harness binary
|
||||
@echo "Building Harness Server"
|
||||
go build -o ./gitness ./cmd/gitness
|
||||
|
||||
test: generate ## Run the go tests
|
||||
|
|
49
README.md
|
@ -1,42 +1,45 @@
|
|||
# Gitness
|
||||
Gitness is an open source development platform packed with the power of code hosting and automated DevOps pipelines.
|
||||
# Harness
|
||||
Harness is an open source development platform packed with the power of code hosting, automated DevOps pipelines, Gitspaces, and artifact registries.
|
||||
|
||||
## Overview
|
||||
Gitness is an open source development platform packed with the power of code hosting and automated continuous integration pipelines.
|
||||
Harness is an open source development platform packed with the power of code hosting, automated DevOps pipelines, Gitspaces, and artifact registries.
|
||||
|
||||
## Running Gitness locally
|
||||
> The latest publicly released docker image can be found on [harness/gitness](https://hub.docker.com/r/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.
|
||||
## Running Harness locally
|
||||
> The latest publicly released docker image can be found on [harness/harness](https://hub.docker.com/r/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.
|
||||
|
||||
```bash
|
||||
docker run -d \
|
||||
-p 3000:3000 \
|
||||
-p 22:22 \
|
||||
-v /var/run/docker.sock:/var/run/docker.sock \
|
||||
-v /tmp/gitness:/data \
|
||||
--name gitness \
|
||||
-v /tmp/harness:/data \
|
||||
--name harness \
|
||||
--restart always \
|
||||
harness/gitness
|
||||
harness/harness
|
||||
```
|
||||
> 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.
|
||||
> 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 [docs.gitness.com](https://docs.gitness.com) to learn how to get the most out of Gitness.
|
||||
// TODO: @Dewan - let me know the correct doc URL
|
||||
See [developer.harness.com](https://developer.harness.io/docs/open-source) to learn how to get the most out of Harness.
|
||||
|
||||
## 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.
|
||||
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 regestries; providing teams with an end-to-end, open source DevOps platform.
|
||||
|
||||
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.
|
||||
The goal is for Harness to eventually be at full parity with Drone in terms of pipeline capabilities, allowing users to seemlessly 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](https://github.com/harness/gitness/tree/drone) ([README](https://github.com/harness/gitness/blob/drone/.github/readme.md)) so it can continue development.
|
||||
But, we expect this to take some time, which is why we took a snapshot of Drone as a feature branch [drone](https://github.com/harness/harness/tree/drone) ([README](https://github.com/harness/harness/blob/drone/.github/readme.md)) so it can continue development.
|
||||
|
||||
As for Gitness, the development is taking place on the [main](https://github.com/harness/gitness/tree/main) branch.
|
||||
As for Harness, the development is taking place on the [main](https://github.com/harness/harness/tree/main) branch.
|
||||
|
||||
For more information on Gitness, please visit [gitness.com](https://gitness.com/).
|
||||
For more information on Harness, please visit [developer.harness.com](https://developer.harness.com/).
|
||||
|
||||
For more information on Drone, please visit [drone.io](https://www.drone.io/).
|
||||
|
||||
## Gitness Development
|
||||
## 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](https://go.dev/doc/gopath_code#GOPATH) is added to your PATH.
|
||||
|
@ -71,7 +74,7 @@ $ yarn build
|
|||
$ popd
|
||||
```
|
||||
|
||||
After that, you can build the gitness binary:
|
||||
After that, you can build the Harness binary:
|
||||
|
||||
```bash
|
||||
$ make build
|
||||
|
@ -87,11 +90,11 @@ 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
|
||||
### 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 gitness binary `./gitness swagger > web/src/services/code/swagger.yaml`
|
||||
- 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`
|
||||
|
@ -115,7 +118,7 @@ This project includes a swagger specification. When you run the application, you
|
|||
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):
|
||||
For testing, it's simplest to just use the cli to create a token (this requires Harness server to run):
|
||||
```bash
|
||||
# LOGIN (user: admin, pw: changeit)
|
||||
$ ./gitness login
|
||||
|
@ -143,8 +146,8 @@ $ ./gitness --help
|
|||
|
||||
## Contributing
|
||||
|
||||
Refer to [CONTRIBUTING.md](https://github.com/harness/gitness/blob/main/CONTRIBUTING.md)
|
||||
Refer to [CONTRIBUTING.md](https://github.com/harness/harness/blob/main/CONTRIBUTING.md)
|
||||
|
||||
## License
|
||||
|
||||
Apache License 2.0, see [LICENSE](https://github.com/harness/gitness/blob/main/LICENSE).
|
||||
Apache License 2.0, see [LICENSE](https://github.com/harness/harness/blob/main/LICENSE).
|
|
@ -74,7 +74,7 @@ func (c *ControllerClient) PreReceive(
|
|||
|
||||
out, err := c.githookCtrl.PreReceive(
|
||||
ctx,
|
||||
c.git, // gitness doesn't require any custom git connector.
|
||||
c.git, // Harness doesn't require any custom git connector.
|
||||
nil, // TODO: update once githooks are auth protected
|
||||
types.GithookPreReceiveInput{
|
||||
GithookInputBase: c.baseInput,
|
||||
|
@ -96,7 +96,7 @@ func (c *ControllerClient) Update(
|
|||
|
||||
out, err := c.githookCtrl.Update(
|
||||
ctx,
|
||||
c.git, // gitness doesn't require any custom git connector.
|
||||
c.git, // Harness doesn't require any custom git connector.
|
||||
nil, // TODO: update once githooks are auth protected
|
||||
types.GithookUpdateInput{
|
||||
GithookInputBase: c.baseInput,
|
||||
|
@ -118,7 +118,7 @@ func (c *ControllerClient) PostReceive(
|
|||
|
||||
out, err := c.githookCtrl.PostReceive(
|
||||
ctx,
|
||||
c.git, // gitness doesn't require any custom git connector.
|
||||
c.git, // Harness doesn't require any custom git connector.
|
||||
nil, // TODO: update once githooks are auth protected
|
||||
types.GithookPostReceiveInput{
|
||||
GithookInputBase: c.baseInput,
|
||||
|
|
|
@ -99,7 +99,7 @@ func (c *Controller) getRepoCheckAccess(ctx context.Context,
|
|||
return nil, fmt.Errorf("failed to find repo with id %d: %w", repoID, err)
|
||||
}
|
||||
|
||||
// TODO: execute permission check. block anything but gitness service?
|
||||
// TODO: execute permission check. block anything but Harness service?
|
||||
|
||||
return repo, nil
|
||||
}
|
||||
|
|
|
@ -69,7 +69,7 @@ func CreateRPCExternalWriteParams(
|
|||
}
|
||||
|
||||
// CreateRPCInternalWriteParams creates base write parameters for git internal write operations.
|
||||
// Internal write operations are git pushes that originate from the Gitness server.
|
||||
// Internal write operations are git pushes that originate from the Harness server.
|
||||
func CreateRPCInternalWriteParams(
|
||||
ctx context.Context,
|
||||
urlProvider url.Provider,
|
||||
|
|
|
@ -40,8 +40,7 @@ func HandlePostReceive(
|
|||
render.BadRequestf(ctx, w, "Invalid Request Body: %s.", err)
|
||||
return
|
||||
}
|
||||
|
||||
// gitness doesn't require any custom git connector.
|
||||
// Harness doesn't require any custom git connector.
|
||||
out, err := githookCtrl.PostReceive(ctx, git, session, in)
|
||||
if err != nil {
|
||||
render.TranslatedUserError(ctx, w, err)
|
||||
|
|
|
@ -41,7 +41,7 @@ func HandlePreReceive(
|
|||
return
|
||||
}
|
||||
|
||||
// gitness doesn't require any custom git connector.
|
||||
// Harness doesn't require any custom git connector.
|
||||
out, err := githookCtrl.PreReceive(ctx, git, session, in)
|
||||
if err != nil {
|
||||
render.TranslatedUserError(ctx, w, err)
|
||||
|
|
|
@ -41,7 +41,7 @@ func HandleUpdate(
|
|||
return
|
||||
}
|
||||
|
||||
// gitness doesn't require any custom git connector.
|
||||
// Harness doesn't require any custom git connector.
|
||||
out, err := githookCtrl.Update(ctx, git, session, in)
|
||||
if err != nil {
|
||||
render.TranslatedUserError(ctx, w, err)
|
||||
|
|
|
@ -28,8 +28,8 @@ import (
|
|||
"github.com/rs/zerolog/log"
|
||||
)
|
||||
|
||||
// systemServicePrincipal is the principal representing gitness.
|
||||
// It is used for all operations executed by gitness itself.
|
||||
// systemServicePrincipal is the principal representing Harness.
|
||||
// It is used for all operations executed by Harness itself.
|
||||
var systemServicePrincipal *types.Principal
|
||||
|
||||
var ErrAdminEmailRequired = errors.New("config.Principal.Admin.Email is required")
|
||||
|
@ -42,7 +42,7 @@ func NewSystemServiceSession() *auth.Session {
|
|||
}
|
||||
|
||||
// pipelineServicePrincipal is the principal that is used during
|
||||
// pipeline executions for calling gitness APIs.
|
||||
// pipeline executions for calling Harness APIs.
|
||||
var pipelineServicePrincipal *types.Principal
|
||||
|
||||
func NewPipelineServiceSession() *auth.Session {
|
||||
|
@ -53,7 +53,7 @@ func NewPipelineServiceSession() *auth.Session {
|
|||
}
|
||||
|
||||
// gitspaceServicePrincipal is the principal that is used during
|
||||
// gitspace token injection for calling gitness APIs.
|
||||
// gitspace token injection for calling Harness APIs.
|
||||
var gitspaceServicePrincipal *types.Principal
|
||||
|
||||
func NewGitspaceServiceSession() *auth.Session {
|
||||
|
@ -147,7 +147,7 @@ func createAdminUser(
|
|||
return usr, nil
|
||||
}
|
||||
|
||||
// SystemService sets up the gitness service principal that is used for
|
||||
// SystemService sets up the Harness service principal that is used for
|
||||
// resources that are automatically created by the system.
|
||||
func SystemService(
|
||||
ctx context.Context,
|
||||
|
@ -181,7 +181,7 @@ func SystemService(
|
|||
}
|
||||
|
||||
// PipelineService sets up the pipeline service principal that is used during
|
||||
// pipeline executions for calling gitness APIs.
|
||||
// pipeline executions for calling Harness APIs.
|
||||
func PipelineService(
|
||||
ctx context.Context,
|
||||
config *types.Config,
|
||||
|
@ -211,7 +211,7 @@ func PipelineService(
|
|||
}
|
||||
|
||||
// GitspaceService sets up the gitspace service principal that is used during
|
||||
// gitspace credential injection for calling gitness APIs.
|
||||
// gitspace credential injection for calling Harness APIs.
|
||||
func GitspaceService(
|
||||
ctx context.Context,
|
||||
config *types.Config,
|
||||
|
|
|
@ -41,7 +41,7 @@ const (
|
|||
HTTPRequestPathUpdate = "update"
|
||||
)
|
||||
|
||||
// RestClientFactory creates clients that make rest api calls to gitness to execute githooks.
|
||||
// RestClientFactory creates clients that make rest api calls to Harness to execute githooks.
|
||||
type RestClientFactory struct{}
|
||||
|
||||
func (f *RestClientFactory) NewClient(envVars map[string]string) (hook.Client, error) {
|
||||
|
@ -62,7 +62,7 @@ func (f *RestClientFactory) NewClient(envVars map[string]string) (hook.Client, e
|
|||
return NewRestClient(payload), nil
|
||||
}
|
||||
|
||||
// RestClient is the hook.Client used to call the githooks api of gitness api server.
|
||||
// RestClient is the hook.Client used to call the githooks api of Harness api server.
|
||||
type RestClient struct {
|
||||
httpClient *http.Client
|
||||
baseURL string
|
||||
|
@ -81,7 +81,7 @@ func NewRestClient(
|
|||
}
|
||||
}
|
||||
|
||||
// PreReceive calls the pre-receive githook api of the gitness api server.
|
||||
// PreReceive calls the pre-receive githook api of the Harness api server.
|
||||
func (c *RestClient) PreReceive(
|
||||
ctx context.Context,
|
||||
in hook.PreReceiveInput,
|
||||
|
@ -92,7 +92,7 @@ func (c *RestClient) PreReceive(
|
|||
})
|
||||
}
|
||||
|
||||
// Update calls the update githook api of the gitness api server.
|
||||
// Update calls the update githook api of the Harness api server.
|
||||
func (c *RestClient) Update(
|
||||
ctx context.Context,
|
||||
in hook.UpdateInput,
|
||||
|
@ -103,7 +103,7 @@ func (c *RestClient) Update(
|
|||
})
|
||||
}
|
||||
|
||||
// PostReceive calls the post-receive githook api of the gitness api server.
|
||||
// PostReceive calls the post-receive githook api of the Harness api server.
|
||||
func (c *RestClient) PostReceive(
|
||||
ctx context.Context,
|
||||
in hook.PostReceiveInput,
|
||||
|
|
|
@ -33,7 +33,7 @@ var (
|
|||
|
||||
// GenerateEnvironmentVariables generates the required environment variables for a payload
|
||||
// constructed from the provided parameters.
|
||||
// The parameter `internal` should be true if the call is coming from the Gitness
|
||||
// The parameter `internal` should be true if the call is coming from the Harness
|
||||
// and therefore protection from rules shouldn't be verified.
|
||||
func GenerateEnvironmentVariables(
|
||||
ctx context.Context,
|
||||
|
|
|
@ -27,7 +27,7 @@ type Payload struct {
|
|||
PrincipalID int64
|
||||
RequestID string
|
||||
Disabled bool
|
||||
Internal bool // Internal calls originate from Gitness, and external calls are direct git pushes.
|
||||
Internal bool // Internal calls originate from Harness, and external calls are direct git pushes.
|
||||
}
|
||||
|
||||
func (p Payload) Validate() error {
|
||||
|
|
|
@ -48,7 +48,7 @@ func NewStatefulLogger(logz livelog.LogStream) *StatefulLogger {
|
|||
// GetLogStream returns an instance of LogStreamInstance tied to the given id.
|
||||
func (s *StatefulLogger) CreateLogStream(ctx context.Context, id int64) (*LogStreamInstance, error) {
|
||||
// TODO: As livelog.LogStreamInstance uses only a single id as key, conflicts are likely if pipelines and gitspaces
|
||||
// are used in the same instance of Gitness. We need to update the underlying implementation to use another unique
|
||||
// are used in the same instance of Harness. We need to update the underlying implementation to use another unique
|
||||
// key. To avoid that, we offset the ID by offset (1000000000).
|
||||
offsetID := offset + id
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@ import (
|
|||
)
|
||||
|
||||
const (
|
||||
//TODO: Update when ready to change repo and build
|
||||
issuer = "Gitness"
|
||||
)
|
||||
|
||||
|
@ -35,7 +36,7 @@ const (
|
|||
OciSource Source = "oci"
|
||||
)
|
||||
|
||||
// Claims defines gitness jwt claims.
|
||||
// Claims defines Harness jwt claims.
|
||||
type Claims struct {
|
||||
jwt.StandardClaims
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ func newService(git git.Interface) Service {
|
|||
return &service{git: git}
|
||||
}
|
||||
|
||||
// FindRef finds information about a commit in gitness for the git ref.
|
||||
// FindRef finds information about a commit in Harness for the git ref.
|
||||
// This is using the branch only as the ref at the moment, can be changed
|
||||
// when needed to take any ref (like sha, tag).
|
||||
func (f *service) FindRef(
|
||||
|
@ -53,7 +53,7 @@ func (f *service) FindRef(
|
|||
return controller.MapCommit(branchOutput.Branch.Commit)
|
||||
}
|
||||
|
||||
// FindCommit finds information about a commit in gitness for the git SHA.
|
||||
// FindCommit finds information about a commit in Harness for the git SHA.
|
||||
func (f *service) FindCommit(
|
||||
ctx context.Context,
|
||||
repo *types.Repository,
|
||||
|
|
|
@ -22,7 +22,7 @@ import (
|
|||
|
||||
type (
|
||||
// Service provides access to commit information via
|
||||
// the SCM provider. Today, this is gitness but it can
|
||||
// the SCM provider. Today, this is Harness but it can
|
||||
// be extendible to any SCM provider.
|
||||
Service interface {
|
||||
// ref is the ref to fetch the commit from, eg refs/heads/master
|
||||
|
|
|
@ -161,7 +161,7 @@ func Parse(
|
|||
|
||||
// mapBuild populates build variables available to jsonnet templates.
|
||||
// Since we want to maintain compatibility with drone, the older format
|
||||
// needs to be maintained (even if the variables do not exist in gitness).
|
||||
// needs to be maintained (even if the variables do not exist in Harness).
|
||||
func mapBuild(v *types.Execution, vm *jsonnet.VM) {
|
||||
vm.ExtVar(build+"event", string(v.Event))
|
||||
vm.ExtVar(build+"action", string(v.Action))
|
||||
|
@ -188,7 +188,7 @@ func mapBuild(v *types.Execution, vm *jsonnet.VM) {
|
|||
|
||||
// mapBuild populates repo level variables available to jsonnet templates.
|
||||
// Since we want to maintain compatibility with drone 2.x, the older format
|
||||
// needs to be maintained (even if the variables do not exist in gitness).
|
||||
// needs to be maintained (even if the variables do not exist in Harness).
|
||||
func mapRepo(v *types.Repository, p *types.Pipeline, vm *jsonnet.VM, publicRepo bool) {
|
||||
namespace := v.Path
|
||||
idx := strings.LastIndex(v.Path, "/")
|
||||
|
|
|
@ -28,9 +28,9 @@ type (
|
|||
}
|
||||
|
||||
// Service provides access to contents of files in
|
||||
// the SCM provider. Today, this is gitness but it should
|
||||
// the SCM provider. Today, this is Harness but it should
|
||||
// be extendible to any SCM provider.
|
||||
// The plan is for all remote repos to be pointers inside gitness
|
||||
// The plan is for all remote repos to be pointers inside Harness
|
||||
// so a repo entry would always exist. If this changes, the interface
|
||||
// can be updated.
|
||||
Service interface {
|
||||
|
|
|
@ -51,7 +51,7 @@ var Privileged = []string{
|
|||
}
|
||||
|
||||
// dockerOpts returns back the options to be overridden from docker options set
|
||||
// in the environment. If values are specified in gitness, they get preference.
|
||||
// in the environment. If values are specified in Harness, they get preference.
|
||||
func dockerOpts(config *types.Config) []dockerclient.Opt {
|
||||
var overrides []dockerclient.Opt
|
||||
|
||||
|
@ -71,7 +71,7 @@ func NewExecutionRunner(
|
|||
resolver *resolver.Manager,
|
||||
) (*runtime2.Runner, error) {
|
||||
// For linux/windows, containers need to have extra hosts set in order to interact with
|
||||
// gitness. For docker desktop for mac, this is built in and not needed.
|
||||
// Harness. For docker desktop for mac, this is built in and not needed.
|
||||
extraHosts := []string{}
|
||||
if goruntime.GOOS != "darwin" {
|
||||
extraHosts = []string{"host.docker.internal:host-gateway"}
|
||||
|
|
|
@ -19,7 +19,7 @@ import (
|
|||
"github.com/harness/gitness/http"
|
||||
)
|
||||
|
||||
// Server is the http server for gitness.
|
||||
// Server is the http server for Harness.
|
||||
type Server struct {
|
||||
*http.Server
|
||||
}
|
||||
|
|
|
@ -95,7 +95,7 @@ type PipelineYaml struct {
|
|||
Yaml string `yaml:"yaml"`
|
||||
}
|
||||
|
||||
// CapabilitiesLoop TODO: this should be replaced with an async model for Harness Enterprise, but remain for gitness.
|
||||
// CapabilitiesLoop TODO: this should be replaced with an async model for Harness Enterprise, but remain for Harness.
|
||||
func (s *HarnessIntelligence) CapabilitiesLoop(
|
||||
ctx context.Context, req *genai.ChatRequest) (*genai.ChatRequest, error) {
|
||||
returnToUser := false
|
||||
|
|
|
@ -281,7 +281,7 @@ func identityInfoFrom(identity git.Identity) IdentityInfo {
|
|||
}
|
||||
}
|
||||
|
||||
// ReferenceInfo describes a unique reference in gitness.
|
||||
// ReferenceInfo describes a unique reference in Harness.
|
||||
// It contains both the reference name as well as the repo the reference belongs to.
|
||||
type ReferenceInfo struct {
|
||||
Name string `json:"name"`
|
||||
|
|
|
@ -72,7 +72,7 @@ type gitspaceConfig struct {
|
|||
CodeRepoURL string `db:"gconf_code_repo_url"`
|
||||
DevcontainerPath null.String `db:"gconf_devcontainer_path"`
|
||||
Branch string `db:"gconf_branch"`
|
||||
// TODO: migrate to principal int64 id to use principal cache and consistent with gitness code.
|
||||
// TODO: migrate to principal int64 id to use principal cache and consistent with Harness code.
|
||||
UserUID string `db:"gconf_user_uid"`
|
||||
SpaceID int64 `db:"gconf_space_id"`
|
||||
Created int64 `db:"gconf_created"`
|
||||
|
|
|
@ -59,7 +59,7 @@ type gitspaceInstance struct {
|
|||
GitSpaceConfigID int64 `db:"gits_gitspace_config_id"`
|
||||
URL null.String `db:"gits_url"`
|
||||
State enum.GitspaceInstanceStateType `db:"gits_state"`
|
||||
// TODO: migrate to principal int64 id to use principal cache and consistent with gitness code.
|
||||
// TODO: migrate to principal int64 id to use principal cache and consistent with Harness code.
|
||||
UserUID string `db:"gits_user_uid"`
|
||||
ResourceUsage null.String `db:"gits_resource_usage"`
|
||||
SpaceID int64 `db:"gits_space_id"`
|
||||
|
|
|
@ -43,7 +43,7 @@ type Provider interface {
|
|||
GetInternalAPIURL(ctx context.Context) string
|
||||
|
||||
// GenerateContainerGITCloneURL generates a URL that can be used by CI container builds to
|
||||
// interact with gitness and clone a repo.
|
||||
// interact with Harness and clone a repo.
|
||||
GenerateContainerGITCloneURL(ctx context.Context, repoPath string) string
|
||||
|
||||
// GenerateGITCloneURL generates the public git clone URL for the provided repo path.
|
||||
|
@ -79,13 +79,13 @@ type Provider interface {
|
|||
RegistryURL() string
|
||||
}
|
||||
|
||||
// Provider provides the URLs of the gitness system.
|
||||
// Provider provides the URLs of the Harness system.
|
||||
type provider struct {
|
||||
// internalURL stores the URL via which the service is reachable at internally
|
||||
// (no need for internal services to go via public route).
|
||||
internalURL *url.URL
|
||||
|
||||
// containerURL stores the URL that can be used to communicate with gitness from inside a
|
||||
// containerURL stores the URL that can be used to communicate with Harness from inside a
|
||||
// build container.
|
||||
containerURL *url.URL
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
apiVersion: v2
|
||||
name: gitness
|
||||
description: A Helm chart for gitness
|
||||
name: harness-open-source
|
||||
description: A Helm chart for Harness Open Source
|
||||
|
||||
# A chart can be either an 'application' or a 'library' chart.
|
||||
#
|
||||
|
|
|
@ -351,7 +351,7 @@ func ProvideTriggerConfig(config *types.Config) trigger.Config {
|
|||
}
|
||||
}
|
||||
|
||||
// ProvideLockConfig generates the `lock` package config from the gitness config.
|
||||
// ProvideLockConfig generates the `lock` package config from the Harness config.
|
||||
func ProvideLockConfig(config *types.Config) lock.Config {
|
||||
return lock.Config{
|
||||
App: config.Lock.AppNamespace,
|
||||
|
@ -414,7 +414,7 @@ func ProvideDockerConfig(config *types.Config) (*infraprovider.DockerConfig, err
|
|||
if config.Docker.MachineHostName == "" {
|
||||
gitnessBaseURL, err := url.Parse(config.URL.Base)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("unable to parse Gitness base URL %s: %w", gitnessBaseURL, err)
|
||||
return nil, fmt.Errorf("unable to parse Harness base URL %s: %w", gitnessBaseURL, err)
|
||||
}
|
||||
config.Docker.MachineHostName = gitnessBaseURL.Hostname()
|
||||
}
|
||||
|
|
|
@ -48,7 +48,7 @@ func NewDockerProvider(
|
|||
}
|
||||
}
|
||||
|
||||
// Provision assumes a docker engine is already running on the gitness host machine and re-uses that as infra.
|
||||
// Provision assumes a docker engine is already running on the Harness host machine and re-uses that as infra.
|
||||
// It does not start docker engine. It creates a docker volume using the given gitspace config identifier.
|
||||
func (d DockerProvider) Provision(
|
||||
ctx context.Context,
|
||||
|
|
|
@ -92,7 +92,7 @@ type CheckPayloadText struct {
|
|||
}
|
||||
|
||||
// CheckPayloadInternal is for internal use for more seamless integration for
|
||||
// gitness CI status checks.
|
||||
// Harness CI status checks.
|
||||
type CheckPayloadInternal struct {
|
||||
Number int64 `json:"execution_number"`
|
||||
RepoID int64 `json:"repo_id"`
|
||||
|
|
|
@ -28,7 +28,7 @@ import (
|
|||
|
||||
// Config stores the system configuration.
|
||||
type Config struct {
|
||||
// InstanceID specifis the ID of the gitness instance.
|
||||
// InstanceID specifis the ID of the Harness instance.
|
||||
// NOTE: If the value is not provided the hostname of the machine is used.
|
||||
InstanceID string `envconfig:"GITNESS_INSTANCE_ID"`
|
||||
|
||||
|
@ -70,7 +70,7 @@ type Config struct {
|
|||
GitSSH string `envconfig:"GITNESS_URL_GIT_SSH"`
|
||||
|
||||
// API defines the external URL via which the rest API is reachable.
|
||||
// NOTE: for routing to work properly, the request path reaching gitness has to end with `/api`
|
||||
// NOTE: for routing to work properly, the request path reaching Harness has to end with `/api`
|
||||
// (this could be after proxy path rewrite).
|
||||
// Value is derived from Base unless explicitly specified (e.g. http://localhost:3000/api).
|
||||
API string `envconfig:"GITNESS_URL_API"`
|
||||
|
@ -84,7 +84,7 @@ type Config struct {
|
|||
Internal string `envconfig:"GITNESS_URL_INTERNAL"`
|
||||
|
||||
// Container is the endpoint that can be used by running container builds to communicate
|
||||
// with gitness (for example while performing a clone on a local repo).
|
||||
// with Harness (for example while performing a clone on a local repo).
|
||||
// host.docker.internal allows a running container to talk to services exposed on the host
|
||||
// (either running directly or via a port exposed in a docker container).
|
||||
// Value is derived from HTTP.Server unless explicitly specified (e.g. http://host.docker.internal:3000).
|
||||
|
@ -169,7 +169,7 @@ type Config struct {
|
|||
// should be attached to.
|
||||
// This can be needed when we don't want to use host.docker.internal (eg when a service mesh
|
||||
// or proxy is being used) and instead want all the containers to run on the same network as
|
||||
// the gitness container so that they can interact via the container name.
|
||||
// the Harness container so that they can interact via the container name.
|
||||
// In that case, GITNESS_URL_CONTAINER should also be changed
|
||||
// (eg to http://<gitness_container_name>:<port>).
|
||||
ContainerNetworks []string `envconfig:"GITNESS_CI_CONTAINER_NETWORKS"`
|
||||
|
|
|
@ -70,13 +70,13 @@ listing:
|
|||
ownerAndCreated: Owner & Created On
|
||||
create:
|
||||
repositoryDetails: Repository Details
|
||||
gitnessRepositories: Gitness Repositories
|
||||
gitnessRepositories: Harness Repositories
|
||||
thirdPartyGitRepositories: Other Public Git Repositories
|
||||
branchPlaceholder: Enter the Branch name
|
||||
selectBranchPlaceholder: Select branch
|
||||
searchRepositoryPlaceholder: Search for a repository
|
||||
searchBranchPlaceholder: Search for a branch
|
||||
repoNotFound: 'Create a repo <strong>{{repo}}</strong> in Gitness'
|
||||
repoNotFound: 'Create a repo <strong>{{repo}}</strong>'
|
||||
gitspaceCreateSuccess: Gitspace created successfully
|
||||
gitspaceCreateFailed: Gitspace creation failed
|
||||
subtext: Start Coding, no setup required. Dedicated cloud development environments with your favorite editor.
|
||||
|
|
|
@ -0,0 +1,36 @@
|
|||
/*
|
||||
* Copyright 2023 Harness, Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
.main {
|
||||
margin: var(--spacing-large) var(--spacing-large) 0 !important;
|
||||
padding-bottom: 6px !important;
|
||||
|
||||
> a {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.layout {
|
||||
display: inline-flex !important;
|
||||
align-items: center !important;
|
||||
}
|
||||
|
||||
.text {
|
||||
font-size: 20px;
|
||||
font-style: normal;
|
||||
font-weight: 600;
|
||||
color: var(--black);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
/*
|
||||
* Copyright 2023 Harness, Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* eslint-disable */
|
||||
// This is an auto-generated file
|
||||
export declare const layout: string
|
||||
export declare const main: string
|
||||
export declare const text: string
|
|
@ -0,0 +1,36 @@
|
|||
/*
|
||||
* Copyright 2024 Harness, Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import React from 'react'
|
||||
import { Container, Layout } from '@harnessio/uicore'
|
||||
import { Link } from 'react-router-dom'
|
||||
import { useAppContext } from 'AppContext'
|
||||
import harness from './harness.svg?url'
|
||||
import css from './HarnessLogo.module.scss'
|
||||
|
||||
export const HarnessLogo: React.FC = () => {
|
||||
const { routes } = useAppContext()
|
||||
|
||||
return (
|
||||
<Container className={css.main}>
|
||||
<Link to={routes.toCODEHome()}>
|
||||
<Layout.Horizontal spacing="small" className={css.layout} padding={{ left: 'small' }}>
|
||||
<img src={harness} width={100} height={50} />
|
||||
</Layout.Horizontal>
|
||||
</Link>
|
||||
</Container>
|
||||
)
|
||||
}
|
After Width: | Height: | Size: 15 KiB |
|
@ -878,12 +878,12 @@ importRepo:
|
|||
passwordReq: Password is required
|
||||
importRepos:
|
||||
title: Import Repositories
|
||||
content: Import multiple repositories from GitLab Group, GitHub Org or Bitbucket Project to this project in Gitness.
|
||||
content: Import multiple repositories from GitLab Group, GitHub Org or Bitbucket Project to this project.
|
||||
importSpace:
|
||||
title: Import Project
|
||||
createASpace: Create a project
|
||||
authorization: Authorization
|
||||
content: Import a GitLab Group, GitHub Org or Bitbucket Project to a new Project in Gitness. Entities at the top level will be imported to the project.
|
||||
content: Import a GitLab Group, GitHub Org or Bitbucket Project to a new Project. Entities at the top level will be imported to the project.
|
||||
next: Next step
|
||||
details: Details of target to import
|
||||
organizationName: Organization Name
|
||||
|
@ -948,7 +948,7 @@ exportSpace:
|
|||
exportRepo: Upgrading {repoCount} {repoCount|1:repository,repositories}
|
||||
spaceUpdate: Project Updated
|
||||
generate: Generate
|
||||
generateHelptext: Let Gitness build your Pipeline for you.
|
||||
generateHelptext: Let Harness build your Pipeline for you.
|
||||
enterAddress: Enter Address
|
||||
enterGitlabPlaceholder: https://gitlab.com/
|
||||
enterGithubPlaceholder: https://api.github.com/
|
||||
|
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 61 KiB |
|
@ -7,7 +7,7 @@
|
|||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap" rel="stylesheet" />
|
||||
<link href="https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@300;700&display=swap" rel="stylesheet" />
|
||||
<link rel="icon" href="favicon.svg" />
|
||||
<title>Gitness</title>
|
||||
<title>Harness Open Source</title>
|
||||
<script>
|
||||
window.publicAccessOnGitness = false
|
||||
</script>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap" rel="stylesheet" />
|
||||
<link href="https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@300;700&display=swap" rel="stylesheet" />
|
||||
<link rel="icon" href="favicon.svg" />
|
||||
<title>Gitness</title>
|
||||
<title>Harness Open Source</title>
|
||||
<script>
|
||||
window.publicAccessOnGitness = true
|
||||
</script>
|
||||
|
|
|
@ -23,7 +23,7 @@ import { useAppContext } from 'AppContext'
|
|||
import { useStrings } from 'framework/strings'
|
||||
import { useDocumentTitle } from 'hooks/useDocumentTitle'
|
||||
import { NavMenuItem } from './menu/NavMenuItem'
|
||||
import { GitnessLogo } from '../components/GitnessLogo/GitnessLogo'
|
||||
import { HarnessLogo } from '../components/HarnessLogo/HarnessLogo'
|
||||
import { DefaultMenu } from './menu/DefaultMenu'
|
||||
import css from './layout.module.scss'
|
||||
|
||||
|
@ -43,7 +43,7 @@ export const LayoutWithSideNav: React.FC<LayoutWithSideNavProps> = ({ title, chi
|
|||
<Layout.Horizontal className={css.layout}>
|
||||
<Container className={css.menu}>
|
||||
<Layout.Vertical spacing="small">
|
||||
<GitnessLogo />
|
||||
<HarnessLogo />
|
||||
<Container>{menu}</Container>
|
||||
</Layout.Vertical>
|
||||
|
||||
|
|