Shipwright is an extensible framework for building container images on Kubernetes. With Shipwright, developers can define and reuse build strategies that build container images for their CI/CD pipelines. Any tool that builds images within a container can be supported, such as Kaniko, Cloud Native Buildpacks, and Buildah.
Dependency | Supported versions |
---|---|
Kubernetes | v1.15.*, v1.16.*, v1.17.*, v1.18.* |
Tekton | v0.20.1 |
The following are the build strategies supported by this operator, out-of-the-box:
Users have the option to define their own BuildStrategy
or ClusterBuildStrategy
resources and make them available for consumption via the Build
resource.
This operator ships four CRDs :
- The
BuildStrategy
CRD and theClusterBuildStrategy
CRD is used to register a strategy. - The
Build
CRD is used to define a build configuration. - The
BuildRun
CRD is used to start the actually image build using a registered strategy.
Examples of Build
resource using the example strategies shipped with this operator.
-
Get a Kubernetes cluster and
kubectl
set up to connect to your cluster. -
Clone this repository from GitHub at the v0.3.0 tag:
$ git clone --branch v0.3.0 https://github.com/shipwright-io/build.git ... $ cd build/
Coming soon - install Shipwright Build via kubectl!
-
Install Tekton by running hack/install-tekton.sh, it installs v0.20.1.
$ hack/install-tekton.sh
-
Install the operator and sample strategies via
make
:$ make install
-
Add a push secret to your container image repository, such as one on Docker Hub or quay.io:
$ kubectl create secret generic push-secret \ --from-file=.dockerconfigjson=$HOME/.docker/config.json \ --type=kubernetes.io/dockerconfigjson
-
Create a Cloud Native Buildpacks build, replacing
<MY_REGISTRY>/<MY_USERNAME>/<MY_REPO>
with the registry hostname, username, and repository your cluster has access to and that you have permission to push images to.$ kubectl apply -f - <<EOF apiVersion: build.dev/v1alpha1 kind: Build metadata: name: buildpack-nodejs-build spec: source: url: https://github.com/adambkaplan/shipwright-example-nodejs.git strategy: name: buildpacks-v3 kind: ClusterBuildStrategy output: image: <MY_REGISTRY>/<MY_USERNAME>/<MY_REPO>:latest credentials: name: push-secret EOF
-
Run your build:
$ kubectl apply -f - <<EOF apiVersion: build.dev/v1alpha1 kind: BuildRun metadata: name: buildpack-nodejs-build-1 spec: buildRef: name: buildpack-nodejs-build serviceAccount: name: default EOF
Build Strategy | Alpha | Beta | GA |
---|---|---|---|
Source-to-Image | ☑ | ||
Buildpacks-v3-heroku | ☑️ | ||
Buildpacks-v3 | ☑️ | ||
Kaniko | ☑️ | ||
Buildah | ☑️ |
We host weekly meetings for contributors, maintainers and anyone interested in the project. The weekly meetings take place on Monday´s at 2pm UTC.
We are so excited to have you!
- See CONTRIBUTING.md for an overview of our processes
- See DEVELOPMENT.md for how to get started
- See HACK.md for how to build, test & run (advanced reading material)
- Look at our good first issues and our help wanted issues
- Contact us:
- Kubernetes Slack: #shipwright
- Users can discuss help, feature requests, or potential bugs at [email protected]. Click here to join.
- Contributors can discuss active development topics at [email protected]. Click here to join.