Skip to content

Commit

Permalink
Merge pull request #153 from shipwright-io/sascha-docs-sync-v0.15
Browse files Browse the repository at this point in the history
Sync documentation updates from build v0.15.2
  • Loading branch information
openshift-merge-bot[bot] authored Mar 3, 2025
2 parents cbc78b7 + 0162dd5 commit f43625e
Show file tree
Hide file tree
Showing 6 changed files with 62 additions and 37 deletions.
13 changes: 10 additions & 3 deletions content/en/docs/build/build.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ A `Build` resource allows the user to define:
- retention
- volumes
- nodeSelector
- tolerations
- schedulerName

A `Build` is available within a namespace.

Expand Down Expand Up @@ -95,6 +97,9 @@ To prevent users from triggering `BuildRun`s (_execution of a Build_) that will
| TriggerInvalidPipeline | Trigger type Pipeline is invalid. |
| OutputTimestampNotSupported | An unsupported output timestamp setting was used. |
| OutputTimestampNotValid | The output timestamp value is not valid. |
| NodeSelectorNotValid | The specified nodeSelector is not valid. |
| TolerationNotValid | The specified tolerations are not valid. |
| SchedulerNameNotValid | The specified schedulerName is not valid. |

## Configuring a Build

Expand All @@ -105,7 +110,7 @@ The `Build` definition supports the following fields:
- [`kind`](https://kubernetes.io/docs/concepts/overview/working-with-objects/kubernetes-objects/#required-fields) - Specifies the Kind type, for example `Build`.
- [`metadata`](https://kubernetes.io/docs/concepts/overview/working-with-objects/kubernetes-objects/#required-fields) - Metadata that identify the custom resource instance, especially the name of the `Build`, and in which [namespace](https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/) you place it. **Note**: You should use your own namespace, and not put your builds into the shipwright-build namespace where Shipwright's system components run.
- `spec.source` - Refers to the location of the source code, for example a Git repository or OCI artifact image.
- `spec.strategy` - Refers to the `BuildStrategy` to be used, see the [examples](https://github.com/shipwright-io/build/tree/v0.14.0/samples/v1beta1/buildstrategy)
- `spec.strategy` - Refers to the `BuildStrategy` to be used, see the [examples](https://github.com/shipwright-io/build/tree/v0.15.2/samples/v1beta1/buildstrategy)
- `spec.output`- Refers to the location where the generated image would be pushed.
- `spec.output.pushSecret`- Reference an existing secret to get access to the container registry.

Expand All @@ -126,7 +131,9 @@ The `Build` definition supports the following fields:
- `spec.retention.ttlAfterSucceeded` - Specifies the duration for which a successful buildrun can exist.
- `spec.retention.failedLimit` - Specifies the number of failed buildrun that can exist.
- `spec.retention.succeededLimit` - Specifies the number of successful buildrun can exist.
- `spec.nodeSelector` - Specifies a selector which must match a node's labels for the build pod to be scheduled on that node.
- `spec.nodeSelector` - Specifies a selector which must match a node's labels for the build pod to be scheduled on that node. If nodeSelectors are specified in both a `Build` and `BuildRun`, `BuildRun` values take precedence.
- `spec.tolerations` - Specifies the tolerations for the build pod. Only `key`, `value`, and `operator` are supported. Only `NoSchedule` taint `effect` is supported. If tolerations are specified in both a `Build` and `BuildRun`, `BuildRun` values take precedence.
- `spec.schedulerName` - Specifies the scheduler name for the build pod. If schedulerName is specified in both a `Build` and `BuildRun`, `BuildRun` values take precedence.

### Defining the Source

Expand Down Expand Up @@ -307,7 +314,7 @@ In general, _paramValues_ are tightly bound to Strategy _parameters_. Please mak

#### Example

The [BuildKit sample `BuildStrategy`](https://github.com/shipwright-io/build/tree/v0.14.0/samples/v1beta1/buildstrategy/buildkit/buildstrategy_buildkit_cr.yaml) contains various parameters. Two of them are outlined here:
The [BuildKit sample `BuildStrategy`](https://github.com/shipwright-io/build/tree/v0.15.2/samples/v1beta1/buildstrategy/buildkit/buildstrategy_buildkit_cr.yaml) contains various parameters. Two of them are outlined here:

```yaml
apiVersion: shipwright.io/v1beta1
Expand Down
4 changes: 3 additions & 1 deletion content/en/docs/build/buildrun.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ The `BuildRun` definition supports the following fields:
- `spec.output.timestamp` - Overrides the output timestamp configuration of the referenced build to instruct the build to change the output image creation timestamp to the specified value. When omitted, the respective build strategy tool defines the output image timestamp.
- `spec.output.vulnerabilityScan` - Overrides the output vulnerabilityScan configuration of the referenced build to run the vulnerability scan for the generated image.
- `spec.env` - Specifies additional environment variables that should be passed to the build container. Overrides any environment variables that are specified in the `Build` resource. The available variables depend on the tool used by the chosen build strategy.
- `spec.nodeSelector` - Specifies a selector which must match a node's labels for the build pod to be scheduled on that node.
- `spec.nodeSelector` - Specifies a selector which must match a node's labels for the build pod to be scheduled on that node. If nodeSelectors are specified in both a `Build` and `BuildRun`, `BuildRun` values take precedence.
- `spec.tolerations` - Specifies the tolerations for the build pod. Only `key`, `value`, and `operator` are supported. Only `NoSchedule` taint `effect` is supported. If tolerations are specified in both a `Build` and `BuildRun`, `BuildRun` values take precedence.
- `spec.schedulerName` - Specifies the scheduler name for the build pod. If schedulerName is specified in both a `Build` and `BuildRun`, `BuildRun` values take precedence.

**Note**: The `spec.build.name` and `spec.build.spec` are mutually exclusive. Furthermore, the overrides for `timeout`, `paramValues`, `output`, and `env` can only be combined with `spec.build.name`, but **not** with `spec.build.spec`.

Expand Down
Loading

0 comments on commit f43625e

Please sign in to comment.