docs/contrib/continuous_integration.md
Every change on the K3s repository, either made through a pull request or direct push, triggers the continuous integration pipelines defined within the same repository. Needless to say, all the K3s contributions can be merged until all the checks pass (AKA having green builds).
Currently, there are two different platforms involved in running the CI processes:
All the existing GitHub Actions are defined as YAML files under the .github/workflows directory. These can be grouped into:
x86_64 test batteries (unit, integration, smoke), and code coverage.Everything runs on GitHub's provided runners; thus, the tests are limited to run in x86_64 architectures.
The Drone pipelines are defined in the .drone.yml file. These are designed to be run on separated clusters depending on their end goal, being categorized into:
The K3s contributors do not need access to these drone clusters to get their PR's built. Still, for reference, these are their corresponding URLs <drone-pr.k3s.io> and <drone-publish.k3s.io>.
A contributor should verify their changes locally to speed up the pull request process. Fortunately, all the CI steps can be on local environments, except for the publishing ones, through either of the following methods:
drone exec --pipeline <pipeline name> command. This requires having Docker with volume mount support.As mentioned above, the scripts within the scripts directory are the core of the CI process, being the most relevant ones:
go generate command and the linting tools, then asserts the K3s components versions.