CI/CD
This repository’s own build-and-release pipeline — relevant if you’re self-hosting from source rather than pulling the published image.
Table of contents
- What it does, in order
- Required configuration (for a fork or your own instance of this pipeline)
- Versioning
- Tests
- If you’re not using Azure Pipelines
CrudApi’s own CI/CD runs on Azure Pipelines (azure-pipelines.yml in the repo root), triggered by a push to main or a v*.*.* tag.
What it does, in order
- Build & Publish .NET — restores, builds in Release configuration, computes a version tag (
<majorMinor>.<buildId>on a normal push, or the exact tag version on av*.*.*push), publishes the app, and zips the output as a pipeline artifact. - Docker — build & push to both registries — builds the image once and pushes it to both GHCR and Docker Hub, tagged with the exact version,
latest, and the current<majorMinor>series. - GitHub Release — downloads the build artifact and creates a GitHub Release with the versioned ZIP attached, a one-command
docker runsnippet in the release body, and links to both registries. Runs on everymainpush, not just tagged releases. A422(tag already exists — a rebuild) is treated as success rather than a failure.
Required configuration (for a fork or your own instance of this pipeline)
| Needed | Where |
|---|---|
GITHUB_TOKEN (PAT with repo, write:packages, workflow) and GITHUB_USER | Azure DevOps → Library → Variable group github-secrets |
A Docker registry service connection to ghcr.io | Azure DevOps service connections, named ghcr-connection |
| A Docker registry service connection to Docker Hub | Azure DevOps service connections, named dockerhub-connection |
Versioning
A normal push to main produces <majorMinor>.<Build.BuildId> (e.g. 1.0.47) — the majorMinor value is a variable at the top of the pipeline file, bumped manually to start a new minor series. Pushing a v*.*.* tag instead uses that exact version.
Tests
There is currently no
dotnet teststep in this pipeline, and no test project referenced byApi.slnfor this repo’s own local code (controllers, builders, bridge/extension classes). The privateWebSvc.*packages this repo depends on each carry their own substantial xUnit test suites in their own repositories — the gap is specifically in this repo’s own thin-host code, not the underlying platform logic. See Reference → Known limitations.
If you’re not using Azure Pipelines
None of this is required to self-host — pulling the published image (see Docker) needs no CI/CD of your own at all. This page documents how the published image you’d pull actually gets built and released, for anyone contributing to or forking this repository specifically.