Self-Hosted Delivery Platform: Forgejo Actions, Dagger, Harbor, Preview Environments and DORA Metrics for a Monorepo

Build the delivery platform a software company runs on its own machine: a Forgejo forge with two isolated runner zones, Dagger pipelines that test and build only what a change affects, a Harbor registry with scanning and signed, attested releases verified at deploy time, a preview for every pull request, promotion through dev, staging and production with blue/green switching, self-hosted Renovate, DORA metrics with alerts as issues, and a timed restore drill.

DevOps Engineer. Advanced.

What you will build and explain

  • Configure a self-hosted Forgejo so that branch protection, teams and narrow bot tokens decide what can merge and who approved it.
  • Separate untrusted pull-request code from release credentials with runner zones, per-runner Docker daemons and separate build engines, and explain the risks that remain.
  • Replace stored CI secrets with OIDC ID tokens checked claim by claim, and verify facts a token does not prove.
  • Write a pipeline as a Dagger module in Go, unit-test its decisions, and measure what caching and affected builds save.
  • Detect flaky tests from JUnit reports and manage known failures with a quarantine that has an owner and an expiry date.
  • Run Harbor with robot accounts, immutable tags, retention and pull policies, and gate builds on Trivy findings.
  • Sign releases with cosign, attach SBOM and provenance attestations, and verify the builder and source before every deployment.
  • Operate per-pull-request previews and blue/green promotions whose desired state is in Git and whose history is in a ledger.
  • Let routine dependency updates merge themselves through a narrow, testable policy while branch protection stays on.
  • Compute DORA metrics from the platform's own records, turn sustained problems into issues, and prove recovery with a timed restore.

Before you begin

  • Work in a Linux shell: files, permissions, environment variables, curl.
  • Use Git branches and pull requests, and read and write a hosted CI workflow (GitHub Actions or GitLab CI).
  • Build images and run services with Docker and Docker Compose.
  • Read short Go programs; know HTTP, DNS and how certificates work at a basic level.

Who this is for

For DevOps engineers who have written pipelines on a hosted CI service and built container images, and now have to own a delivery platform: a self-hosted forge with isolated runners and job identity, pipelines as code that build only what changed, a registry with scanning and signed releases verified at deploy time, previews, approved blue/green promotions, safe automated dependency updates and delivery metrics.

Curriculum

Learning topics (16)
  1. Check your starting skills and prepare the host

    This project builds Corvane's whole delivery platform on one machine: a Git forge, two pools of CI runners, two build engines, a registry with a vulnerability scanner, an edge proxy, a deployment controller, three environments, previews and monitoring: about 30 to 40 containers, depending on how many previews are open. This lesson says what you should already know, what the machine needs and why, and how make doctor checks it before anything starts.

  2. A delivery platform Corvane runs itself

    Corvane's engineers push code, and an hour later it is in production. In between, the code was tested, built into images, scanned, signed, deployed to three environments and measured, and every step happened on machines Corvane controls. This lesson draws the whole platform on one page: the components, how a change travels through them, who holds which credential, where state lives and what the design gives up by running on one host. The technology lessons that follow each ta

  3. Organisations, teams, branch protection and webhooks in a self-hosted forge

    Every part of this platform starts from Forgejo. Developers push and review there; Actions jobs are scheduled from there; the webhook that starts a release comes from there; jobs' identity tokens are signed there; the internal npm package is served from there. This lesson covers how Forgejo is configured for that role, and how its repositories, teams, protected branches and bot accounts turn "only reviewed code is released" into rules the forge enforces.

  4. Forgejo Actions, runner scopes and the zones that keep pull requests away from releases

    A pull request is code nobody has reviewed yet, and the pipeline runs it: tests, build scripts, Dockerfiles. Release jobs hold the signing key. If both ran on the same machine with the same credentials, a pull request could add one line to a test that copies the key. This lesson explains how Forgejo Actions hands jobs to runners, and how the platform splits runners into two zones so that code from a pull request never shares a machine, a Docker daemon, a build engine or a cre

  5. Job identity with OpenID Connect ID tokens instead of stored secrets

    The pull-request pipeline needs to ask the delivery controller for a preview. The release job needs to ask it to deploy dev. The obvious way, a shared API token in each repository's secrets, fails twice: Forgejo gives pull_request workflows no secrets at all, and a token stored in workshop could be read by any developer's workflow and used to deploy anything. This lesson shows the alternative the platform uses: every job asks Forgejo for a short-lived, signed statement of who

  6. Pipelines as Go code on a shared Dagger engine

    Corvane's old pipeline was the hosted CI service's YAML. Nobody could run it on a laptop, every change to it was tested by pushing and waiting, and moving to another CI system meant rewriting it. This lesson shows the replacement: the pipeline as a Go module that Dagger runs, the same way in a Forgejo job and on a developer's machine, on an engine whose cache makes the second run of anything much cheaper than the first.

  7. Build only what changed in a polyglot monorepo

    Corvane keeps its web app, API, reminder worker and shared contracts in one repository, workshop. A pull request that fixes a comment in the web app should not wait for the worker's 61 Python tests and three image builds. A pull request that changes a shared JSON schema must test all three apps, because all three read it. This lesson shows how the pipeline decides which projects a change affects, why unknown files count as risky, and how the same rule keeps release images sta

  8. Duration-based shards, retries and a quarantine that expires

    Most of the reminder worker's 61 tests talk to PostgreSQL, and they run one after another. Splitting them across parallel runs (shards) can cut the wait, if the suite is long enough to be worth splitting. Then one test starts failing every fifth run for no reason anyone can find, developers learn to press "re-run", and a red pipeline stops meaning anything. This lesson covers how the pipeline splits tests by measured duration, how it retries a failure once and records the tes

  9. Registry projects, robot accounts, immutable tags, retention and pull policies

    A registry that accepts any push and serves any pull is a shared folder with an API. Corvane needs more than that: release images that can never be overwritten, preview images that clean themselves up, a policy that keeps a known-vulnerable image from being pulled, and credentials that let each part of the platform do exactly one thing. This lesson explains how Harbor provides those and how bootstrap configures them.

  10. Vulnerability gates, SBOMs, signatures and provenance, verified at deploy time

    A release manager approves a promotion to production. The pull request lists three image digests. How does anyone know those digests were built by Corvane's release workflow from reviewed code on main, and not pushed by a laptop, a pull-request job or an attacker who stole a registry password? A registry stores whatever its users push. This lesson builds the chain of evidence that lets the delivery controller answer the question for every image, every time it deploys one.

  11. Routing every service and environment through one edge with a private CA

    The lab runs Forgejo, Harbor, Grafana, the controller, dev, staging, production with two colours each, and a preview per pull request, all on one host with one IP address. Browsers, job containers and the controller's own smoke checks have to reach the right one by name, over TLS, and some of those services must not be reachable from everywhere. This lesson explains how a single Traefik instance does that, and why its routes are files the controller writes rather than labels

  12. A preview for every pull request, with limits, expiry and cleanup

    A reviewer reads a diff that changes how bookings are listed. The tests pass, but the reviewer wants to click through it. Without previews, someone has to check out the branch, build three images and start a database. With them, the pull request carries a link to a running copy of the whole application with this change in it, and the copy disappears when the pull request closes. This lesson explains how the controller creates, updates and removes those copies, and the limits

  13. Promote one digest through dev, staging and production with blue/green switching

    Dev runs every merge within minutes. Staging and production should not: they change only when a release manager decides, they run only images that already worked one step earlier, and a bad release must not take production down while it is being found out. This lesson covers how a promotion is proposed, checked, approved and deployed, and how blue/green switching keeps users on a working version throughout.

  14. Self-hosted dependency updates that merge themselves when it is safe

    Corvane's images pin every base image by digest, the web app locks every npm package, the worker hashes every Python requirement. Pinning makes builds repeatable; it also means nothing ever updates by itself. A CVE fixed upstream stays in production until someone edits a lock file. This lesson shows how a self-hosted Renovate turns updates into pull requests that go through the same pipeline as any other change, and how routine ones merge without a person while risky ones wai

  15. DORA metrics from the platform's own records, and alerts that open issues

    CPU graphs tell you whether the host is busy. They do not tell you that pull requests now wait twelve minutes for feedback, that every third production deployment is followed by a rollback, or that staging has been running something other than what Git says for a day. This lesson covers the metrics that describe delivery: the pipeline service levels and DORA's five metrics, how insights computes them from the platform's own records, and how alerts reach people as Forgejo issu

  16. Back up the forge and the registry, and time a restore

    Losing this host loses every repository, every release image and every deployment record. A backup script that runs every night is only half the answer; the other half is knowing it restores, how long that takes and how much work would be lost. This lesson covers what the platform keeps that matters, how make backup copies it consistently, and how make restore-drill proves the copy works and measures recovery time and recovery point.

Practical build steps (10)
  1. Check the host and create the lab's names, certificates and secrets

    Everything in this project runs on one Linux machine. This milestone checks that machine and creates what is unique to your lab: host names, a certificate authority and generated secrets. Nothing starts yet.

  2. Start the platform and bootstrap the forge and the registry

    This milestone brings up about thirty containers and configures them through their APIs. Bootstrap is idempotent: running it again changes nothing, which is how you know the configuration is complete.

  3. Check the runners and engines, then make the first release

    The pull-request zone and the release zone never share a runner, a Docker daemon or a build engine. Here you look at both, then merge a harmless change so that the release zone builds, signs and deploys the first release.

  4. Run the pull-request pipeline

    One file changes in one project. The pipeline works out which projects that can affect, tests and builds only those, and scans what it built, all on the shared pull-request engine.

  5. Open the pull request's preview

    The controller runs the pull request's images, plus dev's images for everything the change did not touch, on a network of their own with a seeded database.

  6. Merge, build a signed release and deploy it to dev

    The merge starts a release in the trusted zone. It rebuilds only the affected project, signs it and attaches its SBOM and provenance; the controller verifies every image again before dev changes.

  7. Promote to staging and production, then roll back

    Staging and production change only through reviewed pull requests in delivery. The controller re-checks the policy and every image, deploys the idle colour and switches traffic only after it passes its checks.

  8. Run Renovate and watch a routine update merge

    Renovate runs inside the platform, in the release zone. Routine updates go through the same pipeline as any change, and the controller approves them only when the diff is nothing but dependency changes.

  9. Read the delivery metrics and trigger an alert

    The platform measures itself from its own records. Alert rules turn sustained problems into Forgejo issues, so the team sees them where it already works.

  10. Back up, run a restore drill and remove the lab

    A backup is only proven by a restore. This milestone times one, then removes everything the lab created.

Access

Learning Access: INR 199 plus 18% GST. Source Pack: INR 399 plus 18% GST. 90 days of online access. No auto-renewal.

Cloud costs and boundaries

Runs entirely on one x86_64 Linux machine with Docker Compose; no cloud account or hosted service is used. The machine needs 8 or more CPUs, 32 GB of memory and 100 GB of free disk, and the first start downloads several gigabytes of images. If you rent a machine for the lab, it is the only cost: an AWS m7i.4xlarge cost about USD 0.85 an hour on demand in ap-south-1 when checked on 2026-11-03. Stop or delete it when you are not using it; cleanup.md removes the lab.

Licence and completion

Vectametric Project Source Licence (2026-09-27): lawfully obtained source may be copied, modified and deployed for personal learning and interview preparation, including personal portfolio demonstrations with attribution. These permissions continue after online access expires. Do not resell or redistribute the Source Pack or its original source files, unchanged or modified. Commercial or client production use requires separate written permission. Software downloaded when building or running, such as Forgejo, Harbor, Dagger, Trivy, cosign, Renovate, Traefik, PostgreSQL, Prometheus and Grafana, retains its own licence. See LICENSE.txt, THIRD_PARTY_NOTICES.md and the Project Source Licence section of the site Terms for the full rules.

Questions about projects

Do I need a cloud account?

You can read the project material without deploying it. Running a cloud build requires the accounts, permissions and tools listed in that project's prerequisites. Deployment runs in your environment, not in a hosted Vectametric lab.

Can I read the code with Learning Access?

Yes. Learning Access includes the online source-file browser and explanations. The Source Pack adds the downloadable reference repository where available. The project's licence governs use of the source.

Are cloud charges included?

No. Cloud and CI usage are separate. Read the project's cost notice, set a budget and stop deadline, and follow its destruction and leftover-resource checks.

Does the project include troubleshooting and interview preparation?

The project curriculum lists the available scenarios and interview topics. These focus on understanding the architecture and explaining decisions; they are not a promise of particular interview questions or a job.

How long can I use the project?

The project page and checkout show the online access period for your selected plan. Access does not auto-renew. Downloaded source remains subject to its licence; future releases are not automatically included.

Review the Terms and No-Refund Policy before confirming access. All sales are final; Vectametric does not offer refunds.

This website is operated by VECTAMETRIC EDTECH (OPC) PRIVATE LIMITED, operating as Vectametric.

Corporate Identity Number (CIN): U85499KA2026OPC229822. GSTIN: 29AAMCV8281D1ZS. Registered office: RS NO/38/2A/1 BASTAND, ROAD MAHANTESH NAGAR, Ramdurg, Ramdurg, Belgaum- 591123, Karnataka.

Queries and grievances: Prajval Honnungar, Grievance Officer and Data Protection Contact.

Telephone: +91 94800 09310. Support: support@vectametric.com. Grievances: support@vectametric.com.

Copyright 2026 VECTAMETRIC EDTECH (OPC) PRIVATE LIMITED. All rights reserved.

Vectametric home · Roadmaps · Vecta IT Exams · Vecta Government Exams · Vecta Banking & Finance Exams · Vecta Entrance Exams · About us · Contact · Privacy Policy · Terms and Conditions · No-Refund Policy