Contributing to MicroShift

August 13, 2026 · View on GitHub

Contribution Flow

  1. Fork the openshift/microshift repository on GitHub.
  2. Create a branch from main, or from a release-X.Y branch if proposing a backport.
  3. Make changes.
  4. Push to your fork and open a pull request against openshift/microshift.
  5. Address review feedback (repeating steps 3-5 as needed).

Reviews are managed through the OWNERS file. All PRs require approval from a listed approver.

Branches: main tracks the next minor version. release-X.Y branches receive z-stream (patch) updates. Backports should target the appropriate release branch.

Development Environment

MicroShift requires a RHEL development environment. Two setup guides are available:

Key prerequisites:

  • Go (see go.mod for the required version)
  • Red Hat Enterprise Linux
  • oc CLI (latest)

Building

CommandPurpose
make allBuild microshift, etcd, and generate-config binaries
make verifyRun standard verification checks (see Testing)
make cross-build-linux-amd64Cross-compile for x86_64
make cross-build-linux-arm64Cross-compile for aarch64
make rpmBuild RPM packages
make rpm-podmanBuild RPMs in a container
make e2eRun end-to-end tests

For RPM packaging details, see RPM Packages. For build system internals (variants, version tracking), see architecture.

Testing

Verification Scripts

Pre-merge checks run via scripts/verify/:

Script / TargetWhat it checks
make verify-gogolangci-lint, gofmt (Makefile target, not a script)
verify-shell.shshellcheck for all bash scripts
verify-rf.shRobot Framework syntax (robocop)
verify-py.shPython linting (flake8)
make lint-ansible (verify-ansible.sh, opt-in)Ansible playbook and role linting
verify-containers.shContainerfile linting (hadolint)
verify-assets.shAsset integrity
verify-images.shImage blueprint validation
verify-licenses.shLicense compliance
verify-vendor-etcd.shEtcd vendor integrity
verify-crds.shCRD schema validation
verify-config.shConfiguration file validation

Run the standard set with make verify (runs verify-fast + verify-vendor-etcd). CI runs additional checks via make verify-ci which adds verify-images and verify-licenses.

End-to-End Tests

MicroShift uses Robot Framework for E2E testing. Tests live in test/suites/, organized by feature area (standard, backup, greenboot, upgrade, network, storage, etc.).

Tests run against a remote MicroShift host via SSH. Copy the example variables file and configure it with your target host:

cp test/variables.yaml.example test/variables.yaml
# Edit test/variables.yaml with your host, SSH user, and key

Then run:

test/run.sh [suite paths...]

Without suite arguments, it runs a default set (standard1, standard2, and selected osconfig/storage tests). The script automatically sets up a Python virtual environment with Robot Framework.

Test Harness

The CI test harness provisions VMs, installs MicroShift, and runs Robot Framework tests. It supports two deployment modes (ostree and bootc), each with its own scenarios and image blueprints.

For the full test harness documentation — scenarios, naming conventions, image blueprint layers, VM lifecycle, and kickstart templates — see Test Harness.

For CI job configuration and Prow details, see OpenShift CI for MicroShift.

Rebase

MicroShift's dependencies are kept in sync with OpenShift via automated nightly rebases. For full details:

Code Standards

Go

  • Must pass golangci-lint and gofmt
  • Enforced by make verify-go

Shell

  • Shebang: #!/usr/bin/bash
  • set -euo pipefail
  • Quote all variables
  • Must pass shellcheck

Python

  • PEP 8
  • Must pass flake8

Robot Framework

  • Must pass robocop (scripts/verify/verify-rf.sh)

Ansible

  • Run make lint-ansible to check the playbooks and roles under ansible/
  • This check remains opt-in until the staged lint cleanup is complete and CI enforcement is enabled
  • Rule families listed in .ansible-lint as warnings remain visible while the staged lint cleanup is in progress; they become fatal when removed from the warning list

General

  • No hardcoded credentials — use environment variables or files
  • Self-documenting code over comments

Commit Conventions

Prefix commits with the Jira ticket when applicable:

USHIFT-1234: add gateway API configuration options
OCPBUGS-5678: fix etcd startup timeout handling
NO-ISSUE: update contributor documentation

Use NO-ISSUE: for changes without a Jira ticket. Rebase commits follow a fixed pattern (update buildfiles, update manifests, etc.) generated by the automation.

CI

MicroShift uses OpenShift CI with Prow for continuous integration. PR test runs take approximately 45 minutes. Scenarios run in parallel on a hypervisor, each provisioning an independent VM.

CI configuration is managed in the openshift/release repository. For details on CI setup, job types, and manual testing, see OpenShift CI for MicroShift.

Review Process

All PRs require review from an approver listed in the OWNERS file. Reviewers check:

  • Code quality and correctness
  • Test coverage (Go unit tests and/or Robot Framework E2E tests)
  • Documentation updates where applicable
  • Adherence to code standards