Skip to content

Shipwright - a framework for building container images on Kubernetes

License

Notifications You must be signed in to change notification settings

waveywaves/build

 
 

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.3.0 Docs @ v0.3.0 Examples @ v0.3.0
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 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

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!

About

Shipwright - a framework for building container images on Kubernetes

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 94.4%
  • Shell 3.8%
  • Makefile 1.7%
  • Dockerfile 0.1%