Ce contenu n'est pas disponible dans la langue sélectionnée.
Chapter 5. BuildRequest [build.openshift.io/v1]
- Description
BuildRequest is the resource used to pass parameters to build generator
Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).
- Type
-
object
5.1. Specification
Property | Type | Description |
---|---|---|
|
| APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources |
|
| BinaryBuildSource describes a binary file to be used for the Docker and Source build strategies, where the file will be extracted and used as the build source. |
|
| DockerStrategyOptions contains extra strategy options for container image builds |
| env contains additional environment variables you want to pass into a builder container. | |
| from is the reference to the ImageStreamTag that triggered the build. | |
|
| Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds |
|
| lastVersion (optional) is the LastVersion of the BuildConfig that was used to generate the build. If the BuildConfig in the generator doesn’t match, a build will not be generated. |
| ||
|
| SourceRevision is the revision or commit information from the source for the build |
|
| SourceStrategyOptions contains extra strategy options for Source builds |
|
| triggeredBy describes which triggers started the most recent update to the build configuration and contains information about those triggers. |
|
| BuildTriggerCause holds information about a triggered build. It is used for displaying build trigger data for each build and build configuration in oc describe. It is also used to describe which triggers led to the most recent update in the build configuration. |
| triggeredByImage is the Image that triggered this build. |
5.1.1. .binary
- Description
- BinaryBuildSource describes a binary file to be used for the Docker and Source build strategies, where the file will be extracted and used as the build source.
- Type
-
object
Property | Type | Description |
---|---|---|
|
|
asFile indicates that the provided binary input should be considered a single file within the build input. For example, specifying "webapp.war" would place the provided binary as |
5.1.2. .dockerStrategyOptions
- Description
- DockerStrategyOptions contains extra strategy options for container image builds
- Type
-
object
Property | Type | Description |
---|---|---|
| Args contains any build arguments that are to be passed to Docker. See https://docs.docker.com/engine/reference/builder/#/arg for more details | |
|
| noCache overrides the docker-strategy noCache option in the build config |
5.1.3. .revision
- Description
- SourceRevision is the revision or commit information from the source for the build
- Type
-
object
- Required
-
type
-
Property | Type | Description |
---|---|---|
|
| GitSourceRevision is the commit information from a git source for a build |
|
| type of the build source, may be one of 'Source', 'Dockerfile', 'Binary', or 'Images' |
5.1.4. .revision.git
- Description
- GitSourceRevision is the commit information from a git source for a build
- Type
-
object
Property | Type | Description |
---|---|---|
|
| SourceControlUser defines the identity of a user of source control |
|
| commit is the commit hash identifying a specific commit |
|
| SourceControlUser defines the identity of a user of source control |
|
| message is the description of a specific commit |
5.1.5. .revision.git.author
- Description
- SourceControlUser defines the identity of a user of source control
- Type
-
object
Property | Type | Description |
---|---|---|
|
| email of the source control user |
|
| name of the source control user |
5.1.6. .revision.git.committer
- Description
- SourceControlUser defines the identity of a user of source control
- Type
-
object
Property | Type | Description |
---|---|---|
|
| email of the source control user |
|
| name of the source control user |
5.1.7. .sourceStrategyOptions
- Description
- SourceStrategyOptions contains extra strategy options for Source builds
- Type
-
object
Property | Type | Description |
---|---|---|
|
| incremental overrides the source-strategy incremental option in the build config |
5.1.8. .triggeredBy
- Description
- triggeredBy describes which triggers started the most recent update to the build configuration and contains information about those triggers.
- Type
-
array
5.1.9. .triggeredBy[]
- Description
- BuildTriggerCause holds information about a triggered build. It is used for displaying build trigger data for each build and build configuration in oc describe. It is also used to describe which triggers led to the most recent update in the build configuration.
- Type
-
object
Property | Type | Description |
---|---|---|
|
| BitbucketWebHookCause has information about a Bitbucket webhook that triggered a build. |
|
| GenericWebHookCause holds information about a generic WebHook that triggered a build. |
|
| GitHubWebHookCause has information about a GitHub webhook that triggered a build. |
|
| GitLabWebHookCause has information about a GitLab webhook that triggered a build. |
|
| ImageChangeCause contains information about the image that triggered a build |
|
| message is used to store a human readable message for why the build was triggered. E.g.: "Manually triggered by user", "Configuration change",etc. |
5.1.10. .triggeredBy[].bitbucketWebHook
- Description
- BitbucketWebHookCause has information about a Bitbucket webhook that triggered a build.
- Type
-
object
Property | Type | Description |
---|---|---|
|
| SourceRevision is the revision or commit information from the source for the build |
|
| Secret is the obfuscated webhook secret that triggered a build. |
5.1.11. .triggeredBy[].bitbucketWebHook.revision
- Description
- SourceRevision is the revision or commit information from the source for the build
- Type
-
object
- Required
-
type
-
Property | Type | Description |
---|---|---|
|
| GitSourceRevision is the commit information from a git source for a build |
|
| type of the build source, may be one of 'Source', 'Dockerfile', 'Binary', or 'Images' |
5.1.12. .triggeredBy[].bitbucketWebHook.revision.git
- Description
- GitSourceRevision is the commit information from a git source for a build
- Type
-
object
Property | Type | Description |
---|---|---|
|
| SourceControlUser defines the identity of a user of source control |
|
| commit is the commit hash identifying a specific commit |
|
| SourceControlUser defines the identity of a user of source control |
|
| message is the description of a specific commit |
5.1.13. .triggeredBy[].bitbucketWebHook.revision.git.author
- Description
- SourceControlUser defines the identity of a user of source control
- Type
-
object
Property | Type | Description |
---|---|---|
|
| email of the source control user |
|
| name of the source control user |
5.1.14. .triggeredBy[].bitbucketWebHook.revision.git.committer
- Description
- SourceControlUser defines the identity of a user of source control
- Type
-
object
Property | Type | Description |
---|---|---|
|
| email of the source control user |
|
| name of the source control user |
5.1.15. .triggeredBy[].genericWebHook
- Description
- GenericWebHookCause holds information about a generic WebHook that triggered a build.
- Type
-
object
Property | Type | Description |
---|---|---|
|
| SourceRevision is the revision or commit information from the source for the build |
|
| secret is the obfuscated webhook secret that triggered a build. |
5.1.16. .triggeredBy[].genericWebHook.revision
- Description
- SourceRevision is the revision or commit information from the source for the build
- Type
-
object
- Required
-
type
-
Property | Type | Description |
---|---|---|
|
| GitSourceRevision is the commit information from a git source for a build |
|
| type of the build source, may be one of 'Source', 'Dockerfile', 'Binary', or 'Images' |
5.1.17. .triggeredBy[].genericWebHook.revision.git
- Description
- GitSourceRevision is the commit information from a git source for a build
- Type
-
object
Property | Type | Description |
---|---|---|
|
| SourceControlUser defines the identity of a user of source control |
|
| commit is the commit hash identifying a specific commit |
|
| SourceControlUser defines the identity of a user of source control |
|
| message is the description of a specific commit |
5.1.18. .triggeredBy[].genericWebHook.revision.git.author
- Description
- SourceControlUser defines the identity of a user of source control
- Type
-
object
Property | Type | Description |
---|---|---|
|
| email of the source control user |
|
| name of the source control user |
5.1.19. .triggeredBy[].genericWebHook.revision.git.committer
- Description
- SourceControlUser defines the identity of a user of source control
- Type
-
object
Property | Type | Description |
---|---|---|
|
| email of the source control user |
|
| name of the source control user |
5.1.20. .triggeredBy[].githubWebHook
- Description
- GitHubWebHookCause has information about a GitHub webhook that triggered a build.
- Type
-
object
Property | Type | Description |
---|---|---|
|
| SourceRevision is the revision or commit information from the source for the build |
|
| secret is the obfuscated webhook secret that triggered a build. |
5.1.21. .triggeredBy[].githubWebHook.revision
- Description
- SourceRevision is the revision or commit information from the source for the build
- Type
-
object
- Required
-
type
-
Property | Type | Description |
---|---|---|
|
| GitSourceRevision is the commit information from a git source for a build |
|
| type of the build source, may be one of 'Source', 'Dockerfile', 'Binary', or 'Images' |
5.1.22. .triggeredBy[].githubWebHook.revision.git
- Description
- GitSourceRevision is the commit information from a git source for a build
- Type
-
object
Property | Type | Description |
---|---|---|
|
| SourceControlUser defines the identity of a user of source control |
|
| commit is the commit hash identifying a specific commit |
|
| SourceControlUser defines the identity of a user of source control |
|
| message is the description of a specific commit |
5.1.23. .triggeredBy[].githubWebHook.revision.git.author
- Description
- SourceControlUser defines the identity of a user of source control
- Type
-
object
Property | Type | Description |
---|---|---|
|
| email of the source control user |
|
| name of the source control user |
5.1.24. .triggeredBy[].githubWebHook.revision.git.committer
- Description
- SourceControlUser defines the identity of a user of source control
- Type
-
object
Property | Type | Description |
---|---|---|
|
| email of the source control user |
|
| name of the source control user |
5.1.25. .triggeredBy[].gitlabWebHook
- Description
- GitLabWebHookCause has information about a GitLab webhook that triggered a build.
- Type
-
object
Property | Type | Description |
---|---|---|
|
| SourceRevision is the revision or commit information from the source for the build |
|
| Secret is the obfuscated webhook secret that triggered a build. |
5.1.26. .triggeredBy[].gitlabWebHook.revision
- Description
- SourceRevision is the revision or commit information from the source for the build
- Type
-
object
- Required
-
type
-
Property | Type | Description |
---|---|---|
|
| GitSourceRevision is the commit information from a git source for a build |
|
| type of the build source, may be one of 'Source', 'Dockerfile', 'Binary', or 'Images' |
5.1.27. .triggeredBy[].gitlabWebHook.revision.git
- Description
- GitSourceRevision is the commit information from a git source for a build
- Type
-
object
Property | Type | Description |
---|---|---|
|
| SourceControlUser defines the identity of a user of source control |
|
| commit is the commit hash identifying a specific commit |
|
| SourceControlUser defines the identity of a user of source control |
|
| message is the description of a specific commit |
5.1.28. .triggeredBy[].gitlabWebHook.revision.git.author
- Description
- SourceControlUser defines the identity of a user of source control
- Type
-
object
Property | Type | Description |
---|---|---|
|
| email of the source control user |
|
| name of the source control user |
5.1.29. .triggeredBy[].gitlabWebHook.revision.git.committer
- Description
- SourceControlUser defines the identity of a user of source control
- Type
-
object
Property | Type | Description |
---|---|---|
|
| email of the source control user |
|
| name of the source control user |
5.1.30. .triggeredBy[].imageChangeBuild
- Description
- ImageChangeCause contains information about the image that triggered a build
- Type
-
object
Property | Type | Description |
---|---|---|
| fromRef contains detailed information about an image that triggered a build. | |
|
| imageID is the ID of the image that triggered a new build. |
5.2. API endpoints
The following API endpoints are available:
/apis/build.openshift.io/v1/namespaces/{namespace}/builds/{name}/clone
-
POST
: create clone of a Build
-
/apis/build.openshift.io/v1/namespaces/{namespace}/buildconfigs/{name}/instantiate
-
POST
: create instantiate of a BuildConfig
-
5.2.1. /apis/build.openshift.io/v1/namespaces/{namespace}/builds/{name}/clone
Parameter | Type | Description |
---|---|---|
|
| name of the BuildRequest |
|
| object name and auth scope, such as for teams and projects |
Parameter | Type | Description |
---|---|---|
|
| When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed |
|
| fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. |
|
|
fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields, provided that the |
|
| If 'true', then the output is pretty printed. |
- HTTP method
-
POST
- Description
- create clone of a Build
Parameter | Type | Description |
---|---|---|
|
|
HTTP code | Reponse body |
---|---|
200 - OK |
|
201 - Created |
|
202 - Accepted |
|
401 - Unauthorized | Empty |
5.2.2. /apis/build.openshift.io/v1/namespaces/{namespace}/buildconfigs/{name}/instantiate
Parameter | Type | Description |
---|---|---|
|
| name of the BuildRequest |
|
| object name and auth scope, such as for teams and projects |
Parameter | Type | Description |
---|---|---|
|
| When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed |
|
| fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. |
|
|
fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields, provided that the |
|
| If 'true', then the output is pretty printed. |
- HTTP method
-
POST
- Description
- create instantiate of a BuildConfig
Parameter | Type | Description |
---|---|---|
|
|
HTTP code | Reponse body |
---|---|
200 - OK |
|
201 - Created |
|
202 - Accepted |
|
401 - Unauthorized | Empty |