Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor fixes on docs and types #1519

Merged
merged 1 commit into from
Mar 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions docs/build.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ The `Build` definition supports the following fields:
- [`apiVersion`](https://kubernetes.io/docs/concepts/overview/working-with-objects/kubernetes-objects/#required-fields) - Specifies the API version, for example `shipwright.io/v1beta1`.
- [`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 source bundle image.
- `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](../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 @@ -98,9 +98,9 @@ The `Build` definition supports the following fields:

### Defining the Source

A `Build` resource can specify a Git repository or bundle image source, together with other parameters like:
A `Build` resource can specify a source type, such as a Git repository or an OCI artifact, together with other parameters like:

- `source.type` - Specify the type of the data-source. Currently, the supported types are "Git", "OCI", and "Local".
- `source.type` - Specify the type of the data-source. Currently, the supported types are "Git", "OCIArtifact", and "Local".
- `source.git.url` - Specify the source location using a Git repository.
- `source.git.cloneSecret` - For private repositories or registries, the name references a secret in the namespace that contains the SSH private key or Docker access credentials, respectively.
- `source.git.revision` - A specific revision to select from the source repository, this can be a commit, tag or branch name. If not defined, it will fallback to the Git repository default branch.
Expand Down Expand Up @@ -426,8 +426,6 @@ Here, we pass three items in the `build-args` array:

### Defining the Builder or Dockerfile

**Note: Builder and Dockerfile options are deprecated, and will be removed in a future release.**

In the `Build` resource, you use the parameters (`spec.paramValues`) to specify the image that contains the tools to build the final image. For example, the following Build definition specifies a `Dockerfile` image.

```yaml
Expand Down
6 changes: 3 additions & 3 deletions docs/buildrun.md
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ We have two controllers that ensure that buildruns can be deleted automatically
- Buildrun TTL parameters: These are used to make sure that buildruns exist for a fixed duration of time after completiion.
- `buildrun.spec.retention.ttlAfterFailed`: The buildrun is deleted if the mentioned duration of time has passed and the buildrun has failed.
- `buildrun.spec.retention.ttlAfterSucceeded`: The buildrun is deleted if the mentioned duration of time has passed and the buildrun has succeeded.
- Build TTL parameters: These are used to make sure that related buildruns exist for a fixed duration of time after completiion.
- Build TTL parameters: These are used to make sure that related buildruns exist for a fixed duration of time after completion.
- `build.spec.retention.ttlAfterFailed`: The buildrun is deleted if the mentioned duration of time has passed and the buildrun has failed.
- `build.spec.retention.ttlAfterSucceeded`: The buildrun is deleted if the mentioned duration of time has passed and the buildrun has succeeded.
- Build Limit parameters: These are used to make sure that related buildruns exist for a fixed duration of time after completiion.
Expand Down Expand Up @@ -464,7 +464,7 @@ status:
branchName: main
```

Another example of a `BuildRun` with surfaced results for local source code(`bundle`) source:
Another example of a `BuildRun` with surfaced results for local source code(`ociArtifact`) source:

```yaml
# [...]
Expand All @@ -476,7 +476,7 @@ status:
size: 1989004
sources:
- name: default
bundle:
ociArtifact:
digest: sha256:0f5e2070b534f9b880ed093a537626e3c7fdd28d5328a8d6df8d29cd3da760c7
```

Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/build/v1beta1/source.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ type OCIArtifact struct {
PullSecret *string `json:"pullSecret,omitempty"`
}

// Source describes the Git source repository to fetch.
// Source describes the build source type to fetch.
type Source struct {
// Type is the BuildSource qualifier, the type of the source.
Type BuildSourceType `json:"type"`
Expand Down
Loading