This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
This is the OpenShift Boilerplate repository, which provides standardized development infrastructure and tooling to be used across repositories in an organization. The principle is to copy standardized artifacts from this repository into consuming repositories (rather than pulling them dynamically), allowing consumers to update on demand with explicit curation of changes.
The repository is organized into several key areas:
boilerplate/openshift/- Contains OpenShift-specific conventionsgolang-osd-operator/- Standards for Go-based OSD operators (most common)golang-codecov/- Code coverage toolinggolang-lint/- Linting configurationgolang-osd-e2e/- End-to-end testing frameworkosd-container-image/- Container image standardscustom-catalog-osd-operator/- Custom catalog building
boilerplate/_lib/- Shared utilities and scripts used by conventionsboilerplate/update- Main update script that consumers use to pull in changessubscribers.yaml- Registry of consuming repositoriestest/- Test framework for validating boilerplate functionalitypipelines/- Konflux CI/CD pipeline definitions
- Each convention includes:
standard.mk- Standard Makefile targets and variablesproject.mk- Project-specific configuration templateupdatescript - Pre/post processing during updatesREADME.md- Convention documentation
# Run all tests (must be on clean git repo)
make test
# Run tests in container environment
make container-pr-check
# Run specific test case
make test CASE_GLOB="pattern"
# Check repository is clean
make isclean# Build container image from local checkout
make build-image-deep
# Generate subscriber reports
make subscriber-report
# Standard CI checks
make pr-checkWhen modifying or creating conventions:
- Structure: Each convention lives in
boilerplate/openshift/{convention-name}/ - Files: Include
standard.mk,README.md, and optionally anupdatescript - Update Script: Must accept
PREorPOSTarguments for pre/post file copy processing - Variables: The update framework exports
REPO_ROOT,REPO_NAME,CONVENTION_ROOT,LATEST_IMAGE_TAG
The repository supports both Docker and Podman. The CONTAINER_ENGINE variable is automatically detected but can be overridden.
For changes to the build image (config/Dockerfile):
- Create semver tag:
image-v{X}.{Y}.{Z} - Update Konflux
ReleasePlanAdmissionresource - Create
Releaseresource in Konflux - Update Prow mirroring configuration
Key environment variables for testing:
BOILERPLATE_GIT_REPO- Override git repo location for local testingBOILERPLATE_GIT_CLONE- Override clone command (useful for local development)ALLOW_DIRTY_CHECKOUT- Allow operations on dirty git checkoutCASE_GLOB- Pattern for test case selection
This repository integrates with:
- Prow - CI/CD platform for OpenShift
- Konflux - Build and release pipeline platform
- GitHub - Source control and issue tracking
- Subscriber repositories - Consuming projects that use boilerplate conventions
The subscriber system allows automated updates to be proposed across multiple consuming repositories simultaneously using the subscriber propose update command.