MCPcopy Index your code
hub / github.com/shipwright-io/build

github.com/shipwright-io/build @v0.20.3

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.20.3 ↗ · + Follow
1,286 symbols 4,485 edges 254 files 605 documented · 47% 128 cross-repo links
What it actually does AI analysis from the code graph — generated when you open this
loading…
README
<img alt="Work in Progress" src="https://img.shields.io/badge/Status-Work%20in%20Progress-informational">
<a alt="GoReport" href="https://goreportcard.com/report/github.com/shipwright-io/build"><img src="https://goreportcard.com/badge/github.com/shipwright-io/build"></a>
<a href="https://github.com/shipwright-io/build/blob/main/LICENSE"><img alt="License" src="https://img.shields.io/github/license/shipwright-io/build"></a>
<a href="https://pkg.go.dev/mod/github.com/shipwright-io/build"><img src="https://img.shields.io/badge/go.dev-reference-007d9c?logo=go&logoColor=white"></a>
<a href="https://bestpractices.dev/projects/5315"><img src="https://bestpractices.dev/projects/5315/badge" alt="openssf best practices badge"></a>
<img src="https://api.scorecard.dev/projects/github.com/shipwright-io/build/badge" alt="openssf scorecard"/>

Shows the Shipwright logo, which is a heptagon containing a stylized ship next to the word shipwright.

Shipwright is an extensible framework for building container images on Kubernetes.

Why?

With Shipwright, developers get a simplified approach for building container images, by defining a minimal YAML that does not require any previous knowledge of containers or container tooling. All you need is your source code in git and access to a container registry.

Shipwright supports any tool that can build container images in Kubernetes clusters, such as:

Try It!

  • We assume you already have a Kubernetes cluster (v1.34+). If you don't, you can use KinD, which you can install by running ./hack/install-kind.sh.

  • We also require a Tekton installation (v1.3+). To install the latest LTS release, run:

bash kubectl apply --filename https://infra.tekton.dev/tekton-releases/pipeline/previous/v1.12.0/release.yaml

If you are using OpenShift cluster refer Running on OpenShift for some more configurations.

  • Install the Shipwright deployment. To install the latest version, run:

bash kubectl apply --filename https://github.com/shipwright-io/build/releases/download/v0.18.4/release.yaml --server-side curl --silent --location https://raw.githubusercontent.com/shipwright-io/build/v0.18.4/hack/setup-webhook-cert.sh | bash curl --silent --location https://raw.githubusercontent.com/shipwright-io/build/v0.18.4/hack/storage-version-migration.sh | bash

To install the latest nightly release, run:

bash kubectl apply --filename "https://github.com/shipwright-io/build/releases/download/nightly/nightly-$(curl --silent --location https://github.com/shipwright-io/build/releases/download/nightly/latest.txt).yaml" --server-side curl --silent --location https://raw.githubusercontent.com/shipwright-io/build/main/hack/setup-webhook-cert.sh | bash curl --silent --location https://raw.githubusercontent.com/shipwright-io/build/main/hack/storage-version-migration.sh | bash

  • Install the Shipwright strategies. To install the latest version, run:

bash kubectl apply --filename https://github.com/shipwright-io/build/releases/download/v0.18.4/sample-strategies.yaml --server-side

To install the latest nightly release, run:

bash kubectl apply --filename "https://github.com/shipwright-io/build/releases/download/nightly/nightly-$(curl --silent --location https://github.com/shipwright-io/build/releases/download/nightly/latest.txt)-sample-strategies.yaml" --server-side

  • Generate a secret to access your container registry, such as one on Docker Hub or Quay.io:

bash REGISTRY_SERVER=https://index.docker.io/v1/ REGISTRY_USER=<your_registry_user> REGISTRY_PASSWORD=<your_registry_password> kubectl create secret docker-registry push-secret \ --docker-server=$REGISTRY_SERVER \ --docker-username=$REGISTRY_USER \ --docker-password=$REGISTRY_PASSWORD \ --docker-email=<your_email>

  • Create a Build object, replacing <REGISTRY_ORG> with the registry username your push-secret secret have access to:

bash REGISTRY_ORG=<your_registry_org> cat <<EOF | kubectl apply -f - apiVersion: shipwright.io/v1beta1 kind: Build metadata: name: buildpack-nodejs-build spec: source: type: Git git: url: https://github.com/shipwright-io/sample-nodejs contextDir: source-build strategy: name: buildpacks-v3 kind: ClusterBuildStrategy output: image: docker.io/${REGISTRY_ORG}/sample-nodejs:latest pushSecret: push-secret EOF

To view the Build which you just created:

```bash $ kubectl get builds

NAME REGISTERED REASON BUILDSTRATEGYKIND BUILDSTRATEGYNAME CREATIONTIME buildpack-nodejs-build True Succeeded ClusterBuildStrategy buildpacks-v3 68s ```

  • Submit your BuildRun:

bash cat <<EOF | kubectl create -f - apiVersion: shipwright.io/v1beta1 kind: BuildRun metadata: generateName: buildpack-nodejs-buildrun- spec: build: name: buildpack-nodejs-build EOF

  • Wait until your BuildRun is completed and then you can view it as follows:

```bash $ kubectl get buildruns

NAME SUCCEEDED REASON STARTTIME COMPLETIONTIME buildpack-nodejs-buildrun-xyzds True Succeeded 69s 2s ```

or

bash kubectl get buildrun --output name | xargs kubectl wait --for=condition=Succeeded --timeout=180s

  • After your BuildRun is completed, check your container registry, you will find the new generated image uploaded there.

Running on OpenShift

If you are running on OpenShift and if the pipeline service account isn't already created, here are the steps to create the same:

oc create serviceaccount pipeline
oc adm policy add-scc-to-user privileged -z pipeline
oc adm policy add-role-to-user edit -z pipeline

Please tell us more!

Depending on your source code, you might want to build it differently with Shipwright.

To find out more on what's the best strategy or what else can Shipwright do for you, please visit our tutorial!

More information

Read the Docs

Version Docs Examples
HEAD Docs @ HEAD Examples @ HEAD
v0.18.4 Docs @ v0.18.4 Examples @ v0.18.4
v0.18.3 Docs @ v0.18.3 Examples @ v0.18.3
v0.18.2 Docs @ v0.18.2 Examples @ v0.18.2
v0.18.1 Docs @ v0.18.1 Examples @ v0.18.1
v0.18.0 Docs @ v0.18.0 Examples @ v0.18.0
v0.17.4 Docs @ v0.17.4 Examples @ v0.17.4
v0.17.3 Docs @ v0.17.3 Examples @ v0.17.3
v0.17.2 Docs @ v0.17.2 Examples @ v0.17.2
v0.17.1 Docs @ v0.17.1 Examples @ v0.17.1
v0.17.0 Docs @ v0.17.0 Examples @ v0.17.0
v0.16.13 Docs @ v0.16.13 Examples @ v0.16.13
v0.16.12 Docs @ v0.16.12 Examples @ v0.16.12
v0.16.11 Docs @ v0.16.11 Examples @ v0.16.11
v0.16.10 Docs @ v0.16.10 Examples @ v0.16.10
v0.16.9 Docs @ v0.16.9 Examples @ v0.16.9
v0.16.8 Docs @ v0.16.8 Examples @ v0.16.8
v0.16.7 Docs @ v0.16.7 Examples @ v0.16.7
v0.16.6 Docs @ v0.16.6 Examples @ v0.16.6
v0.16.5 Docs @ v0.16.5 Examples @ v0.16.5
v0.16.4 Docs @ v0.16.4 Examples @ v0.16.4
v0.16.3 Docs @ v0.16.3 Examples @ v0.16.3
v0.16.2 Docs @ v0.16.2 Examples @ v0.16.2
v0.16.1 Docs @ v0.16.1 Examples @ v0.16.1
v0.16.0 Docs @ v0.16.0 Examples @ v0.16.0
v0.15.9 Docs @ v0.15.9 Examples @ v0.15.9
v0.15.8 Docs @ v0.15.8 Examples @ v0.15.8
v0.15.7 Docs @ v0.15.7 [Examples @ v0.1

Extension points exported contracts — how you extend this code

BuildPath (Interface)
BuildPath is an interface that holds a ValidatePath() function for validating different Build spec paths [13 implementers]
pkg/validate/validate.go
ImageBuildRunner (Interface)
ImageBuildRunner defines an interface for building a container image. [2 implementers]
pkg/reconciler/buildrun/imagebuildrunner.go
SharedInformerFactory (Interface)
SharedInformerFactory provides shared informers for resources in all known API group versions. It is typically used lik [1 …
pkg/client/informers/externalversions/factory.go
Conversion (Interface)
(no doc)
pkg/webhook/interface.go
ImageBuildRunnerFactory (Interface)
ImageBuildRunnerFactory defines methods for creating and manipulating ImageBuildRunners. [2 implementers]
pkg/reconciler/buildrun/imagebuildrunner.go
GenericInformer (Interface)
GenericInformer is type of SharedIndexInformer which will locate and delegate to other sharedInformers based on type [1 …
pkg/client/informers/externalversions/generic.go
BuildRunExecutorGenerator (Interface)
BuildRunExecutorGenerator generates build execution objects (TaskRun or PipelineRun). [2 implementers]
pkg/reconciler/buildrun/resources/executor_generator.go
SharedInformerFactory (Interface)
SharedInformerFactory a small interface to allow for adding an informer without an import cycle [1 implementers]
pkg/client/informers/externalversions/internalinterfaces/factory_interfaces.go

Core symbols most depended-on inside this repo

GetCondition
called by 144
pkg/reconciler/buildrun/imagebuildrunner.go
String
called by 143
pkg/git/error_parser.go
Get
called by 107
pkg/controller/fakes/client.go
CreateBuild
called by 103
test/utils/v1beta1/builds.go
CreateBR
called by 94
test/utils/v1beta1/buildruns.go
GetBuildTillValidation
called by 88
test/utils/v1beta1/builds.go
GenerateTaskRun
called by 74
pkg/reconciler/buildrun/resources/taskrun.go
GetCalls
called by 74
pkg/controller/fakes/client.go

Shape

Method 715
Function 464
Struct 88
Interface 9
FuncType 6
TypeAlias 4

Languages

Go100%

Modules by API surface

pkg/controller/fakes/manager.go110 symbols
pkg/controller/fakes/client.go84 symbols
test/v1beta1_samples/catalog.go65 symbols
test/v1alpha1_samples/catalog.go58 symbols
test/e2e/v1beta1/common_suite_test.go48 symbols
test/e2e/v1alpha1/common_suite_test.go46 symbols
pkg/reconciler/buildrun/resources/resource_builders.go41 symbols
pkg/reconciler/buildrun/imagebuildrunner.go38 symbols
pkg/controller/fakes/status_writer.go27 symbols
pkg/git/error_parser.go26 symbols
pkg/client/informers/externalversions/factory.go20 symbols
pkg/reconciler/buildrun/pipelinerun_runner.go19 symbols

For agents

$ claude mcp add build \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact