Skip to content

Latest commit

 

History

History
124 lines (93 loc) · 3.05 KB

CONTRIBUTING.adoc

File metadata and controls

124 lines (93 loc) · 3.05 KB

Contributing

Issues and Pull Requests

  • For small changes or quick fixes, a simple pull request is sufficient.

  • For non-trivial changes or bug reports, please file an issue before submitting a pull request.

  • For substantial changes, or to discuss a feature request, prefix your issue with "RFC:" (Request For Comment) and tag it with the label rfc.

Development Builds

For local dev builds, the term dev is used in place of the release tag for the final image tag.

There are make targets for each build and test variant.

Make Target Description

build_<major.minor>

Builds local image tagged as <image>:dev-kubectl-<major.minor.patch> and <image>:dev-kubectl-<major.minor>.

test_<major.minor>

Runs unit tests against image tag <image>:dev-kubectl-<major.minor.patch>.

build_latest

Builds local image tagged as <image>:latest.

test_latest

Runs unit tests against image <image>:latest.

where:

  • <image> defaults to jgriff/k8s-resource

  • <major.minor> are the kubectl versions we are currently shipping (see the Makefile).

Examples

Build new local jgriff/k8s-resource:latest:

make build_latest

Build a single, specific kubectl variant (jgriff/k8s-resource:dev-kubectl-1.22):

make build_1.22

Build all kubectl variants (dev-kubectl-<each-kubectl-version>):

make build

Test a single, specific variant:

make test_1.22

Run unit tests across all dev image variants:

make test

Combine targets in single invocation:

make build_1.22 test_1.22

Overriding the Image Name

Sometimes, you may need to push your dev images to another (private) registry for integration testing or other uses. In those scenarios, you have 2 basic options:

  1. Make another tag from source image jgriff/k8s-resource after every dev build.

    make build_latest
    docker tag jgriff/k8s-resource:latest my-registry/k8s-resource:latest

    However, this can get hairy for all the kubectl version variants and also requires some two-step scripting on your part.

  2. Override the Makefile variable IMAGE to set it to your custom image name (without the tag).

    make build_latest IMAGE=my-registry/k8s-resource

    This has the added benefit of working for every target. For example, to build all image variants with your custom image registry name:

    make build IMAGE=my-registry/k8s-resource

    Works with any target, such as test:

    make test IMAGE=my-registry/k8s-resource