Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated Readme.md #4

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
111 changes: 111 additions & 0 deletions Docs/overview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
## Harness CI

Harness Continuous Integration tool is built with test intelligence, native secrets, fine-grained RBAC, and extensible governance as one of the best solutions in the marketplace for automated pipelines. Automated pipelines remove user errors, provide feedback loops to developers, and help enable fast product iterations.

### What is a pipeline?

A Pipeline is an end-to-end process that delivers a new version of your software. It can be considered to be a cyclical process that includes integration, delivery, operations, testing, deployment, real-time updates, and metrics monitoring.


For example, A pipeline can use the CI module of Harness to build, test & push code and then also a CD module to deploy the artifact to the production environment.


### Stages in a Pipeline

A CI Stage is a subset of a Pipeline that performs one major segment of the CI workflow. A Build Stage includes Steps for building, pushing, and testing your code. The first stage in a Pipeline includes the default Codebase for the Pipeline and shares it with later stages.

See [CI Stage Settings](https://docs.harness.io/article/yn4x8vzw3q-ci-stage-settings)


### Steps in a Pipeline

A Stage contains one or more Steps. Each Step is a series of commands that perform a task. A Build and Push Step builds an image and pushes it to a cloud repo, a Run Step runs a series of shell commands, and so on.

When a Pipeline runs, it creates a temporary volume called a Workspace. The Build Stage clones your codebase to the root of the Workspace and runs Steps inside the root. The Workspace persists for the lifetime of the Stage and enables individual Steps to communicate and share the state information.

Harness CI includes an extensive Step Library for common CI tasks: building artifacts, uploading to cloud repos, running tests, and so on.


![alt text](/images/steps_library.png)


### Shared Path

You can use Shared Paths in a Stage to share data across Steps. By default, all Steps in a Stage use the same Workspace to share data. By default, `/harness` is the shared working directory for a Stage. For example, the Maven m2 repo is stored in `/root/.m2` by default. You can specify this same path in later Stages.

If you need to share additional volumes, you can add Shared Paths.


### Service Dependency

A Service Dependency enables multiple Stages to access the same service. For example, your Pipeline might include unit tests that require a running Redis server. Service Dependencies run in an isolated container so you don't need to handle dependencies.

See [Configure Service Dependency](https://docs.harness.io/article/vo4sjbd09g-configure-service-dependency-step-settings)


### Background Tasks

This step allows running commands in the background. It can spin up service dependencies as a part of the build.


### Matrix support

Matrix gives developers the ability to execute the same set of tasks multiple times for a bunch of different configurations with a simple elegant syntax, rather than duplicating the task for each configuration.


### Plugins

Plugins are Docker containers that perform predefined tasks and are configured as Steps in your Stage. You can use Plugins to deploy code, publish artifacts, send notifications, and more.

The Drone community maintains an extensive library of plugins for specific CI workflows. You can customize and extend your build processes using existing plugins or write your own.

See Plugin Step Settings and Run a Drone Plugin in CI.

### Caching

Caching ensures faster job execution by reusing data from expensive fetch operations in previous jobs. You can use Save Cache and Restore Cache steps to save a cache to a cloud storage bucket and restore it later. See Cache CI Data.

### Remote Docker Layer Caching

Harness enables remote Docker Layer Caching where each Docker layer is uploaded as an image to a Docker repo you identify. If the same layer is used in subsequent builds, Harness downloads the layer from the Docker repo.

This is different from other CI vendors that are limited to local caching and persistent volumes.

You can also specify the same Docker repo for multiple Build and Push steps, enabling them to share the same remote cache.

Remote Docker Layer Caching can dramatically improve build time by sharing layers across Pipelines, Stages, and steps.

### Artifact Repos

Harness CIE offers popular object storage options such as JFrog, Amazon S3, and Google GCS where you can push your artifacts. Object storage repos are set up as Pipeline Steps by using the Upload Artifacts step from the Step library.

### Services

A Service represents your microservices, Serverless functions, and other workloads logically. You can deploy, monitor, or change each Service independently.
When you add a Service to a Stage, the Service Definition represents the real artifacts, manifests, and variable settings of that Service. You can propagate or override a Service in later Stages of the Pipeline.

### Infrastructure Definition

Infrastructure Definitions represent the Kubernetes build infrastructure used by a CI pipeline: the target clusters, hosts, and so on.


### Connectors

Connectors contain the information necessary to integrate and work with third-party tools such as Git providers and artifact repos. For example, a GitHub Connector authenticates with a GitHub account and repo and fetches files as part of a deploy Stage. Harness uses Connectors at Pipeline runtime to authenticate and run operations in external tools.


### Delegates

The Harness Delegate is a software service you install in your environment that connects to the Harness Manager and performs tasks using your container orchestration platforms, artifact repositories, monitoring systems, and so on.

The Delegate also needs permissions in the target environment to execute build tasks. These permissions are granted in the Delegate config file or your environment account when installing the Delegate.


### Variables

You can add and reference custom variables in Pipelines and Stages. They're available across the Pipeline. You can propagate and override their values in later stages.


### Triggers

You can run your Pipelines manually or use triggers to initiate their execution. You can trigger a Pipeline based on Git commits and pull requests, schedules, and so on.
8 changes: 8 additions & 0 deletions Docs/requirements.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
### Make sure you have the following set up before you begin this tutorial:

- **Github Account:** This tutorial clones a codebase from a Github repo. You will need a Github account so Harness can connect to Github.
- **Docker Hub Account and Repo:** You will need to push and pull the image you build to Docker Hub. You can use any repo you want, or create a new one for this tutorial.
- **Kubernetes cluster for Harness Delegate and build farm:** You'll need a Kubernetes cluster for Harness to use for the Harness Delegate and as a build farm. Ensure you have a cluster that meets the following requirements:
- **Networking:** Outbound HTTPS for the Harness connection, and to connect to Docker Hub. Allow TCP port 22 for SSH.
- **Namespace:** When you install the Harness Delegate, it will create the harness-delegate namespace. You'll use the same namespace for the build farm.

40 changes: 33 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,53 @@ Introduction
========================
This repository is a home for snippets of YAML code and a sample hello world server for the Harness CI Community.

## Getting Started

Use this README to get started with our sample pipeline repository for Go. This guide outlines the basics of getting started with the Harness CI and provides a full code sample for you to try out. This sample doesn’t include configuration options, for in-depth steps and configuring the pipeline for example using triggers or using our templates see the Pipeline Configuration Docs.

The Pipeline will build and run a unit test on a sample go repository, and upload the artifact to Docker Hub. You can use publicly-available code, images, and your GitHub and Docker Hub accounts.







**[Requirements](Docs/Create_Pipeline.md)**<br>
**[Harness Sample YAML](.harness/Pipeline.md)**<br>
**[Getting Started](#GettingStarted)**<br>
**[Workflow](README.md#workflow)**<br>
**[Build Instructions](docs/build.md)**<br>

## Workflow
- Create a Build test and run stage.
- Build the code and run unit tests.
- Package the app as a Docker image and upload it to Docker Hub.

## Docs
**[Pipeline Creation & Build Set-up](docs/CreatePipeline.md)**<br>
**[Configuring the infrastructure & setting up Build & Run Test stage](docs/buildstep.md)**<br>
**[Build & Push Image to Docker](docs/Docker_File_Creation.md)**<br>

## Graphical Summary

Hosted Infrastructure:

![alt text](./images/harness_ci_hosted_infra_overview-eb7892f29a82eeae8f7112763ae749d1.png)

Bring Your Own Infrastructure:

![alt text](./images/harness_ci_your_infra_overview-b5d71133006969a8fe1129e0c48070cb.png)

## Licensing
## Contributor License Agreement

In order to clarify the intellectual property license granted with Contributions from any person or entity, Harness Inc. ("Harness") must have a Contributor License Agreement ("CLA") on file that has been read, accepted, and followed by each contributor, indicating an agreement to the CLA terms located [here](https://github.com/harness-community/overview/blob/main/Contributor_License_Agreement.md). This license is for your protection as a Contributor as well as the protection of Harness; it does not change your rights to use your own Contributions for any other purpose.

## Code of Conduct

All users and contributors of the Harness community should adhere to the following [Code of Conduct](https://github.com/harness/community/blob/main/CODE_OF_CONDUCT.md)!

## Communication

Refer [Harness Community Communications Guide](https://github.com/harness-community/overview/blob/main/community_communication_guide.rst) to interact with the wider community users/contributors, join slack workgroups to get help/help other users and create topics in [community.harness.io](https://community.harness.io)

## License

MIT License.

MIT License
See [COPYING](LICENSE) for more information.
Binary file added images/steps_library.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.