{"id":21523675,"url":"https://github.com/bhojpur/piro","last_synced_at":"2026-05-09T13:15:45.340Z","repository":{"id":57651560,"uuid":"441792611","full_name":"bhojpur/piro","owner":"bhojpur","description":"An innovative CI/CD system for the Bhojpur.NET Platform that could leverage Kubernetes, Docker, and NanoVMs for running applications or services as managed jobs.","archived":false,"fork":false,"pushed_at":"2022-04-28T11:11:29.000Z","size":20664,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-17T17:50:47.145Z","etag":null,"topics":["ci-cd","github","job-scheduler","kubernetes"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/u/bhojpur","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bhojpur.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-12-26T02:11:52.000Z","updated_at":"2022-04-28T08:23:02.000Z","dependencies_parsed_at":"2022-09-26T20:31:02.696Z","dependency_job_id":null,"html_url":"https://github.com/bhojpur/piro","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/bhojpur/piro","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bhojpur%2Fpiro","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bhojpur%2Fpiro/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bhojpur%2Fpiro/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bhojpur%2Fpiro/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bhojpur","download_url":"https://codeload.github.com/bhojpur/piro/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bhojpur%2Fpiro/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32820536,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T08:22:46.396Z","status":"online","status_checked_at":"2026-05-09T02:00:06.633Z","response_time":123,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ci-cd","github","job-scheduler","kubernetes"],"created_at":"2024-11-24T01:19:04.316Z","updated_at":"2026-05-09T13:15:45.324Z","avatar_url":"https://github.com/bhojpur.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bhojpur Piro - Continuous Integration\n\nA _pre-integrated_ `CI/CD` system driving many web scale `applications` or `services`\nrunning over the [Bhojpur.NET Platform](https://github.com/bhojpur/platform). On one\nside, it uses any standard `Git` repository and drives the _Jobs_ using either a\n`Kubernetes` cluster of `Docker` containers or `MicroVM`s or `NanoVM`s on the other\nside. It knows no [pipelines](https://github.com/bhojpur/belaur), just the _Jobs_ and\neach _Job_ could be a [Unikernel](https://github.com/bhojpur/kernel) application and\n`Kubernetes` **Pod**. What you do in that _Unikernel_ or _Pod_ is up to you. We do not\nimpose any \"declarative pipeline syntax\" or some groovy scripting language. Instead,\nthe `Bhojpur Piro` jobs have managed to run `Node`, `Go`, or `Bash` scripts in the\nproduction environments.\n\nAny standard Git repository (e.g. [Bhojpur Seam](https://seam.in.bhojpur.net)) could\nbe integrated with the `Bhojpur Piro`. Though, it is present already in your\n[Bhojpur.NET Platform](https://github.com/bhojpur/platform) instance, but different\nvariants are built already to suit requirments of specific industry sector.\n\n---\n\n- [Installation](#installation)\n  - [GitHub](#github)\n  - [Configuration](#configuration)\n  - [OAuth](#oauth)\n- [Setting up jobs](#setting-up-jobs)\n  - [GitHub events](#gitHub-events)\n- [Log Cutting](#log-cutting)\n  - [GitHub events](#gitHub-events)\n- [Command Line Interface](#command-line-interface)\n  - [Installation](#installation-1)\n  - [Usage](#usage)\n- [Annotations](#annotations)\n- [Attribution](#attribution)\n- [Thank You](#thank-you)\n\n---\n\n## Installation\n\nThe easiest way to install the `Bhojpur Piro` is using its [Helm chart](helm/).\nClone this Git repository, cd into `helm/`, and install using following steps\n\n```bash\nhelm dep update\nhelm upgrade --install piro .\n```\n\n### Git-hoster Integration\n\nThe `Bhojpur Piro` integrates with standard Git hosting platforms using its\nplugin system. Currently, `Bhojpur Piro` ships with support for `GitHub` only\n([plugins/github-repo](https://repositories.github.com/bhojpur/piro/tree/cw/repo-plugins/plugins/github-repo) and [plugins/github-trigger](https://repositories.github.com/bhojpur/piro/tree/cw/repo-plugins/plugins/github-trigger)).\n\nTo add support for other Git hoster, the `github-repo` plugin is a good starting point.\n\n#### GitHub\n\nTo use the `Bhojpur Piro` with the GitHub, you'll need a GitHub application. To create\nthe app, please [follow the steps here](https://developer.repositories.github.com/apps/building-github-apps/creating-a-github-app/).\n\nWhen creating the app, please use following values:\n\n| Parameter | Value | Description |\n| --------- | ----------- | ------- |\n| `User authorization callback URL` | `https://your-piro-installation.com/plugins/github-integration` | The `/plugins/github-integration`\npath is important, the domain should match your installation's `config.baseURL` |\n| `Webhook URL` | `https://your-piro-installation.com/plugins/github-integration` | The `/plugins/github-integration` path is important,\nthe domain should match your installation's `config.baseURL` |\n| `Permissions` | Contents: Read-Only | |\n| | Commit Status: Read \u0026 Write | |\n| | Issues: Read \u0026 Write | |\n| | Pull Requests: Read \u0026 Write | |\n| `Events` | Meta | |\n| | Push | |\n| | Issue Comments | |\n\n### Configuration\n\nThe following table lists the (incomplete set of) configurable parameters of the\n`Bhojpur Piro` chart and their default values. The Helm chart's `values.yaml` is\nthe reference for chart's configuration surface.\n\n| Parameter | Description | Default |\n| --------- | ----------- | ------- |\n| `repositories.github.webhookSecret` | Webhook Secret of your GitHub application. See [GitHub Setup](#github) | `my-webhook-secret` |\n| `repositories.github.privateKeyPath` | Path to the private key for your GitHub application. See [GitHub setup](#github) | `secrets/github-app.com` |\n| `repositories.github.appID` | AppID of your GitHub application. See [GitHub setup](#github) | `secrets/github-app.com` |\n| `repositories.github.installationID` | InstallationID of your GitHub application. Have a look at the _Advanced_ page of your GitHub app to find thi s ID. | `secrets/github-app.com` |\n| `config.baseURL` | URL of your Bhojpur Piro installation | `https://piro.bhojpur.net` |\n| `config.timeouts.preparation` | Time a job can take to initialize | `10m` |\n| `config.timeouts.total` | Total time a job can take | `60m` |\n| `image.repository` | Image repository | `bhojpur/piro` |\n| `image.tag` | Image tag | `latest` |\n| `image.pullPolicy` | Image pull policy | `Always` |\n| `replicaCount`  | Number of cert-manager replicas  | `1` |\n| `rbac.create` | If `true`, create and use RBAC resources | `true` |\n| `resources` | CPU/memory resource requests/limits | |\n| `nodeSelector` | Node labels for pod assignment | `{}` |\n| `affinity` | Node affinity for pod assignment | `{}` |\n\nSpecify each parameter using the `--set key=value[,key=value]` argument to `helm install`.\n\nAlternatively, a `YAML` file that specifies the values for the above parameters\ncan be provided while installing the chart. For example,\n\n```console\nhelm install --name my-release -f values.yaml .\n```\n\n\u003e **Tip**: You can use the default [values.yaml](values.yaml)\n\n### OAuth\n\nThe `Bhojpur Piro` does not support `OAuth` by itself. However, using a standard\n[OAuth Proxy](https://github.com/oauth2-proxy/oauth2-proxy) that's easy enough to\nadd. It could leverage [Bhojpur IAM](https://github.com/bhojpur/iam) for full\nfledged support for enterprise grade product features.\n\n## Setting up Jobs\n\nThe `Bhojpur Piro` _jobs_ are files in your `Git` repository where one file represents\none Job. A `Bhojpur Piro` job file mainly consists of the\n[PodSpec](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#podspec-v1-core)\nthat will be run. The `Bhojpur Piro` will add an `/application` mount to your _pod_\nwhere you'll find the checked out repository the job is running on.\n\nFor example:\n\n```yaml\npod:\n  containers:\n  - name: hello-world\n    image: alpine:latest\n    workingDir: /application\n    imagePullPolicy: IfNotPresent\n    command:\n    - sh \n    - -c\n    - |\n      echo Hello World\n      ls\n```\n\nThis `Job` would print **Hello World** and list all files in the `root` of\nthe repository.\n\nCheckout `Bhojpur Piro`'s own [build job](.piro/build-job.yaml) for a more complete\nexample.\n\n\u003e **Tip**: You can use the `Bhojpur Piro` CLI to create a new _Job_ using `piro init job`\n\n### GitHub events\n\nThe `Bhojpur Piro` starts _jobs_ based on GitHub push events, if the repository\ncontains a `.piro/config.yaml` file, e.g.\n\n```yaml\ndefaultJob: \".piro/build-job.yaml\"\nrules:\n- path: \".piro/deploy.yaml\"\n  matchesAll:\n  - or: [\"repo.ref ~= refs/tags/\"]\n  - or: [\"trigger !== deleted\"]\n```\n\nThe example above starts `.piro/deploy.yaml` for all tags. For everything else\nit will start `.piro/build-job.yaml`.\n\n## Log Cutting\n\nThe `Bhojpur Piro` extracts structure from the log output its jobs produce. We\ncall this process log cutting, because the `Bhojpur Piro` understands logs as a\nbunch of streams/slices, which have to be de-multiplexed.\n\nThe default **cutter** in the `Bhojpur Piro` expects the following syntax:\n\n| Code | Command | Description |\n| --------- | ----- | ----------- |\n| `[someID\\|PHASE] Some description here` | Enter new phase | Enters into a new phase identified by `someID` and described by `Some description here`. All output in this phase that does not explicitely name a slice will use `someID` as slice.\n| `[someID] Arbitrary output` | Log to a slice | Logs `Arbitrary output` and marks it as part of the `someID` slice.\n| `[someID\\|DONE]` | Finish a slice | Marks the `someID` slice as done. No more output is expected from this slice in this phase.\n| `[someID\\|FAIL] Reason` | Fail a slice | Marks the `someID` slice as failed becuase of `Reason`. No more output is expected from this slice in this phase. Failing a slice does not automatically fail the job.\n| `[type\\|RESULT] content` | Publish a result | Publishes `content` as result of type `type`\n\n\u003c\u003c\u003c\u003c\u003c\u003c\u003c HEAD\n\u003e **Tip**: You can produce this kind of log output using the `Bhojpur Piro` CLI: `piro log`\n\u003c\u003c\u003c\u003c\u003c\u003c\u003c HEAD\n\n\u003c\u003c\u003c\u003c\u003c\u003c\u003c HEAD\n\n## Command Line Interface\n\nThe `Bhojpur Piro` sports a powerful continuous integration capability, which can\nbe used to create, list, start and listen to jobs (e.g. `Unikernel` applications\nor services) applied in complex data processing.\n\n### Direct Installation\n\nThe `Bhojpur Piro` CLI is available in binary format on the [release](https://github.com/bhojpur/piro/releases/)\npage or using this one-liner:\n\n```bash\ncurl -L https://get.bhojpur.net/piro/install.sh | sh\n```\n\n### Simple Usage\n\n```bash\nThe Bhojpur Piro is a very simple GitHub triggered, Unikernel and/or Kubernetes powered CI system.\n\nUsage:\n  piro [command]\n\nAvailable Commands:\n  help        Help about any command\n  init        Initializes configuration for Bhojpur Piro\n  job         Interacts with currently running or previously run jobs\n  log         Prints log-cuttable content\n  run         Starts the execution of a job\n  version     Prints the version of this binary\n\nFlags:\n  -h, --help          help for Bhojpur Piro\n      --host string   the Bhojpur Piro host to talk to (defaults to PIRO_HOST env var) (default \"localhost:7777\")\n      --verbose       en/disable verbose logging\n\nUse \"piro [command] --help\" for more information about a command.\n```\n\n## Annotations\n\nAnnotations are used by your `Bhojpur Piro` _job_ to make runtime decisions.\n`Bhojpur Piro` supports passing annotation in three ways:\n\n1. From Pull Request description\n\nYou can add `annotations` in the following form to your Pull Request description\nand the `Bhojpur Piro` will pick them up\n\n```bash\n/piro someAnnotation\n/piro someAnnotation=foobar\n- [x] /piro someAnnotation\n- [x] /piro someAnnotation=foobar\n```\n\n2. From Git commit\n\nThe `Bhojpur Piro` supports same format as above to pass annotations via commit\nmessage. The `Bhojpur Piro` will use the top most commit only.\n\n3. From Bhojpur CLI\n\n```bash\npiro run github -a someAnnotation=foobar\n```\n\n## Build Source Code\n\nYou need `Go` programming language tools. Issue the following commands in a termainal\nafter gloning this `Git` repository. It will build and embedd the web user interface\nand package the PostgreSQL database scripts.\n\n```bash\n./prepare.sh\n```\n\nthen, you can build the `Bhojpur Piro` CLI using following commands\n\n```bash\ntask build-tools\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbhojpur%2Fpiro","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbhojpur%2Fpiro","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbhojpur%2Fpiro/lists"}