build

module
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 5, 2021 License: Apache-2.0

README

Work in Progress License

Shipwright - a framework for building container images on Kubernetes

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.

Dependencies

Dependency Supported versions
Kubernetes v1.15.*, v1.16.*, v1.17.*, v1.18.*
Tekton v0.20.1

Build Strategies

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.

Operator Resources

This operator ships four CRDs :

  • The BuildStrategy CRD and the ClusterBuildStrategy 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.

Read the Docs

Version Docs Examples
HEAD Docs @ HEAD Examples @ HEAD
v0.2.0 Docs @ v0.2.0 Examples @ v0.2.0
v0.1.1 Docs @ v0.1.1 Examples @ v0.1.1
v0.1.0 Docs @ v0.1.0 Examples @ v0.1.0

Examples

Examples of Build resource using the example strategies shipped with this operator.

Try it!

  • Get a Kubernetes cluster and kubectl set up to connect to your cluster.
  • Clone this repository from GitHub:
$ git clone https://github.com/shipwright-io/build.git
...
$ cd build/
$ 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

Roadmap

Build Strategies Support
Build Strategy Alpha Beta GA
Source-to-Image
Buildpacks-v3-heroku ☑️
Buildpacks-v3 ☑️
Kaniko ☑️
Buildah ☑️

Community meetings

We host weekly meetings for contributors, maintainers and anyone interested in the project. The weekly meetings take place on Monday´s at 2pm UTC.

Want to contribute

We are so excited to have you!

Directories

Path Synopsis
cmd
pkg
apis/build
Package build contains build API versions.
Package build contains build API versions.
apis/build/v1alpha1
Package v1alpha1 contains API Schema definitions for the build v1alpha1 API group +k8s:deepcopy-gen=package,register +groupName=build.dev Package v1alpha1 contains API Schema definitions for the build v1alpha1 API group +k8s:deepcopy-gen=package,register +groupName=build.dev
Package v1alpha1 contains API Schema definitions for the build v1alpha1 API group +k8s:deepcopy-gen=package,register +groupName=build.dev Package v1alpha1 contains API Schema definitions for the build v1alpha1 API group +k8s:deepcopy-gen=package,register +groupName=build.dev
client/build/clientset/versioned
This package has the automatically generated clientset.
This package has the automatically generated clientset.
client/build/clientset/versioned/fake
This package has the automatically generated fake clientset.
This package has the automatically generated fake clientset.
client/build/clientset/versioned/scheme
This package contains the scheme of the automatically generated clientset.
This package contains the scheme of the automatically generated clientset.
client/build/clientset/versioned/typed/build/v1alpha1
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
client/build/clientset/versioned/typed/build/v1alpha1/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.
git
e2e

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL