<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"/>

Shipwright is an extensible framework for building container images on Kubernetes.
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:
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.
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
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
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>
<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 ```
bash
cat <<EOF | kubectl create -f -
apiVersion: shipwright.io/v1beta1
kind: BuildRun
metadata:
generateName: buildpack-nodejs-buildrun-
spec:
build:
name: buildpack-nodejs-build
EOF
```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
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
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!
$ claude mcp add build \
-- python -m otcore.mcp_server <graph>