We'd love to accept your patches! Before we can take them, we have to jump a couple of legal hurdles.
Please fill out either the individual or corporate Contributor License Agreement (CLA).
- If you are an individual writing original source code and you're sure you own the intellectual property, then you'll need to sign an individual CLA.
- If you work for a company that wants to allow you to contribute your work, then you'll need to sign a corporate CLA.
Follow either of the two links above to access the appropriate CLA and instructions for how to sign and return it. Once we receive it, we'll be able to accept your pull requests.
-
bazel build //...
to build the whole project or ex:bazel build //base:static_root_amd64_debian17
for a single image -
For running tests, check
./knife test
. (bazel test //...
will NOT run all tests, as many tests are marked "manual".) -
For building and loading images to your local Docker engine, you need to add a new rule for that image to the BUILD:
load("@rules_oci//oci:defs.bzl", "oci_tarball")
oci_tarball(
name = "local_build",
image = "//base:static_root_amd64_debian17",
repo_tags = [],
)
then run the following command to load into the daemon
bazel run //:local_build
Whenever a change made to common/*.yaml
manifests, the locking step has to be performed to regenerate lock files.
This can be done by running; ./knife lock
For styling Bazel files, install and run buildifier
with:
# Install buildifier version 3.2.0
go install github.com/bazelbuild/buildtools/buildifier@latest
# This will automatically fix files.
buildifier -mode=fix $(find . -name 'BUILD*' -o -name 'WORKSPACE*' -o -name '*.bzl' -type f)
For styling Python files, install and run pylint
with:
# Install pylint
sudo pip install pylint
# Or
sudo apt-get install pylint
# Or on macos
brew install pylint
# Identify python style issues.
find . -name "*.py" | xargs pylint --disable=R,C
- Submit an issue describing your proposed change to the repo in question.
- The repo owner will respond to your issue promptly.
- If your proposed change is accepted, and you haven't already done so, sign a Contributor License Agreement (see details above).
- Fork the desired repo, develop and test your code changes.
- Submit a pull request.