Skip to content

Commit babc125

Browse files
ci: skip Konflux builds and e2e for docs-only PRs (#634)
## Summary - Add CEL path filter to `.tekton/` PipelineRun definitions so that PRs touching only `docs/**` or `**/*.md` files skip the Konflux multi-arch container builds and downstream e2e integration tests - Document the full CI landscape (Konflux pipelines, integration tests, GitHub Actions) in CONTRIBUTING.md ## Motivation Previously, a docs-only PR triggered 8 container image builds (2 components x 4 architectures) and an e2e test suite that provisions an ephemeral OpenShift cluster on AWS. None of these are meaningful for documentation changes. ## Changes - `.tekton/odh-maas-api-pull-request.yaml` — added `!files.all.all(x, x.matches('^docs/') || x.matches('\.md$'))` to the CEL expression - `.tekton/odh-maas-controller-pull-request.yaml` — same CEL filter - `CONTRIBUTING.md` — added Konflux/Tekton pipelines section, integration tests documentation, GitHub Actions summary table, and docs-only skip explanation <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Adjusted PR pipeline triggers to skip Konflux/Tekton runs for docs-only changes, reducing unnecessary CI executions. * **Documentation** * Revised contributing guide to describe the two-system CI model (GitHub Actions and Konflux/Tekton), responsibilities, multi-architecture image builds, PR vs main trigger behavior, and Konflux-driven integration smoke tests. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent de748ab commit babc125

File tree

3 files changed

+30
-3
lines changed

3 files changed

+30
-3
lines changed

.tekton/odh-maas-api-pull-request.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ metadata:
99
pipelinesascode.tekton.dev/cancel-in-progress: "false"
1010
pipelinesascode.tekton.dev/max-keep-runs: "3"
1111
pipelinesascode.tekton.dev/on-cel-expression: event == "pull_request" && target_branch
12-
== "main"
12+
== "main" && !files.all.all(x, x.matches('^docs/') || x.matches('\\.md$'))
1313
creationTimestamp: null
1414
labels:
1515
appstudio.openshift.io/application: opendatahub-builds

.tekton/odh-maas-controller-pull-request.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ metadata:
99
pipelinesascode.tekton.dev/cancel-in-progress: "false"
1010
pipelinesascode.tekton.dev/max-keep-runs: "3"
1111
pipelinesascode.tekton.dev/on-cel-expression: event == "pull_request" && target_branch
12-
== "main"
12+
== "main" && !files.all.all(x, x.matches('^docs/') || x.matches('\\.md$'))
1313
creationTimestamp: null
1414
labels:
1515
appstudio.openshift.io/application: opendatahub-builds

CONTRIBUTING.md

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,37 @@ This project follows a **Stream-Lake-Ocean** release model. Code flows from acti
6161
| `maas-controller/` | Kubernetes controller for MaaS CRDs; see [maas-controller/README.md](maas-controller/README.md) |
6262
| `docs/` | User and admin documentation (MkDocs); [online docs](https://opendatahub-io.github.io/models-as-a-service/) |
6363
| `test/` | E2E and billing/smoke tests |
64-
| `.github/workflows/` | CI (build, PR title validation, MaaS API lint/build) |
64+
| `.github/workflows/` | GitHub Actions CI (lint, build, PR title validation, docs) |
65+
| `.tekton/` | Konflux/Tekton pipeline definitions for container image builds |
6566

6667
## CI and checks
6768

69+
This project uses two CI systems: **Konflux** (Tekton-based) for container image builds and integration testing, and **GitHub Actions** for linting, unit tests, and documentation.
70+
71+
### Konflux / Tekton pipelines
72+
73+
Konflux builds multi-arch container images (x86_64, arm64, ppc64le, s390x) for both `maas-api` and `maas-controller` on every PR and push to `main`. Pipeline definitions live in `.tekton/` and reference a shared pipeline from [odh-konflux-central](https://github.com/opendatahub-io/odh-konflux-central) (`pipeline/multi-arch-container-build.yaml`).
74+
75+
| Pipeline | Trigger | Output image |
76+
|----------|---------|--------------|
77+
| `odh-maas-api-on-pull-request` | PR to `main` | `quay.io/opendatahub/maas-api:odh-pr` |
78+
| `odh-maas-api-on-push` | Push to `main` | `quay.io/opendatahub/maas-api:odh-stable` |
79+
| `odh-maas-controller-on-pull-request` | PR to `main` | `quay.io/opendatahub/maas-controller:odh-pr` |
80+
| `odh-maas-controller-on-push` | Push to `main` | `quay.io/opendatahub/maas-controller:odh-stable` |
81+
82+
**Integration tests (e2e):** When a PR build completes, Konflux runs an integration test that provisions an ephemeral OpenShift cluster (HyperShift on AWS), deploys the ODH stack with the newly built images, and runs `test/e2e/scripts/prow_run_smoke_test.sh`. This is defined in `odh-konflux-central` under `integration-tests/models-as-a-service/`.
83+
84+
**Docs-only skip:** PRs that only touch documentation files (`docs/**` or `**/*.md`) skip the Konflux build pipelines and integration tests entirely. This is controlled via a CEL expression in the `.tekton/` pipeline definitions.
85+
86+
### GitHub Actions
87+
88+
| Workflow | Trigger | Path filter | What it checks |
89+
|----------|---------|-------------|----------------|
90+
| PR Title Validation | Every PR | None | Semantic PR title format (`type: subject`) |
91+
| MaaS API | PR + push to `main` | `maas-api/**` (PR only) | golangci-lint, unit tests, image build |
92+
| Build | PR + push to `main` | `maas-controller/api/**`, `deployment/**`, etc. (PR only) | Kustomize manifest validation, CRD codegen verification |
93+
| Docs | PR + push to `main` | `docs/**`, `**/*.md` | Link validation, mkdocs build, GitHub Pages deploy |
94+
6895
- **PR title:** Must follow semantic format (`type: subject`, subject not starting with a capital). Use `draft`/`wip` label to bypass.
6996
- **Kustomize:** Manifests under `deployment/` are validated with `scripts/ci/validate-manifests.sh` (kustomize build).
7097
- **MaaS Controller codegen:** CI verifies that generated deepcopy code (`maas-controller/api/maas/v1alpha1/zz_generated.deepcopy.go`) and CRD manifests (`deployment/base/maas-controller/crd/bases/`) are in sync with the API types. If you change any file under `maas-controller/api/`, run `make -C maas-controller generate manifests` and commit the results before pushing. The check fails when uncommitted generated changes are detected.

0 commit comments

Comments
 (0)