initial commit
All checks were successful
Build and Publish TechDocs / build-and-publish (push) Successful in 2m0s

Change-Id: I4630f10e87c2a1233268fb6df6e8513936d893bf
This commit is contained in:
Scaffolder
2026-05-06 13:06:20 +00:00
commit cd38fba131
16 changed files with 1396 additions and 0 deletions

20
docs/api.md Normal file
View File

@@ -0,0 +1,20 @@
# API Reference
Base URL: `https://sonar-test-go.kyndemo.live`
## Items `/api/items`
| Method | Path | Body | Response |
|--------|------|------|----------|
| GET | `/api/items` | — | Array of items |
| POST | `/api/items` | `{"name":"...","description":"..."}` | Created item (201) |
| GET | `/api/items/{id}` | — | Item or 404 |
| PUT | `/api/items/{id}` | `{"name":"...","description":"..."}` | Updated item |
| DELETE | `/api/items/{id}` | — | `{"deleted":id}` |
## Observability
| Path | Description |
|------|-------------|
| `/health` | Health check — `{"status":"UP"}` |
| `/metrics` | Prometheus exposition format |

30
docs/architecture.md Normal file
View File

@@ -0,0 +1,30 @@
# Architecture
`sonar-test-go` is a `go` service.
| Component | Detail |
|-----------|--------|
| Runtime | `go` |
| Container port | `8080` |
| Health check | `/health` |
| Metrics | `/metrics` (Prometheus format) |
| Image | Azure Container Registry (`bstagecjotdevacr`) |
## Deployment flow
```
Push to dev/staging/prod
→ build-push.yml (build + test → push image to ACR)
→ deploy-humanitec.yml (hctl score deploy)
```
## Branch model
| Branch | Purpose |
|--------|---------|
| `main` | System of record — catalog, docs, score.yaml, platform config |
| `dev` | Active development |
| `staging` | Pre-production (lazy-created on first promote) |
| `prod` | Production (lazy-created on first promote) |
Promotions between environments are triggered from the Backstage CI/CD tab.

45
docs/index.md Normal file
View File

@@ -0,0 +1,45 @@
# sonar-test-go
SonarQube test — Go runtime
## Overview
This service was scaffolded from the **Create Microservice** golden-path template on the Kyndryl Platform.
- **Runtime**: `go`
- **Owner**: group:default/platform-engineering
- **Deployment profile**: `stateless`
## Architecture
See [architecture.md](architecture.md) for the full architecture diagram.
At a glance:
```
┌──────────────────────────────────────┐
│ Gitea Actions CI/CD │
│ ┌─────────────┐ ┌───────────────┐ │
│ │ build-push │→ │ deploy- │ │
│ │ .yml │ │ humanitec.yml │ │
│ └─────────────┘ └───────────────┘ │
└──────────────────────────────────────┘
│ │
▼ ▼
Azure ACR Humanitec API
AKS (via Score)
┌──────────────────────────┐
│ sonar-test-go │
│ :8080 │
│ /api/items │
│ /health │
└──────────────────────────┘
```
## API Reference
See [api.md](api.md) for the full OpenAPI reference.