> For the complete documentation index, see [llms.txt](https://host2host.onibonje.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://host2host.onibonje.com/docs/33-devsecops-pipeline.md).

# DevSecOps Pipeline

## 1. Overview

CI/CD, security scanning, and promotion gates for the H2H platform. Cloud-agnostic — runs on GitHub Actions or Jenkins.

***

## 2. Pipeline Stages

```mermaid
flowchart LR
  Commit --> Build
  Build --> Test
  Test --> Scan
  Scan --> Publish
  Publish --> Deploy
```

| Stage       | Actions                                             |
| ----------- | --------------------------------------------------- |
| **Build**   | `mvn clean verify`, Docker build                    |
| **Test**    | Unit, Camel route tests, Testcontainers             |
| **Scan**    | SonarQube, OWASP Dependency-Check, Trivy image scan |
| **Sign**    | Cosign image signature                              |
| **Publish** | Nexus JARs + container registry                     |
| **Deploy**  | Helm upgrade (dev → uat → prod)                     |

***

## 3. Branch Strategy

| Branch      | Deploy to                    |
| ----------- | ---------------------------- |
| `feature/*` | CI only                      |
| `develop`   | Dev cluster                  |
| `release/*` | UAT                          |
| `main`      | Production (manual approval) |

***

## 4. Security Gates

| Gate            | Block on                 |
| --------------- | ------------------------ |
| Dependency scan | Critical CVE             |
| SonarQube       | Quality gate fail        |
| Trivy           | Critical OS/image CVE    |
| ArchUnit        | Hardcoded partner config |
| Secret scan     | Credentials in code      |

***

## 5. Artifact Management

| Artifact      | Registry                                       |
| ------------- | ---------------------------------------------- |
| JAR modules   | Nexus/Artifactory via `h2h-bom`                |
| Docker images | ECR/ACR/Harbor — `heirs-h2h/runtime:{version}` |
| Helm charts   | Chart museum / OCI                             |

***

## 6. GitOps (Optional)

ArgoCD / Flux watches Helm values repo; Terraform provisions infra.

***

## 7. Related Documents

* [11 Repository Structure](/docs/11-repository-structure.md)
* [19 Cloud-Agnostic Deployment](/docs/19-cloud-agnostic-deployment.md)
* [35 Testing Strategy](/docs/35-testing-strategy.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://host2host.onibonje.com/docs/33-devsecops-pipeline.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
