Skip to main content

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`

Specification​

PropertyTypeDescription
apiVersionstringAPIVersion 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
binaryobjectBinaryBuildSource 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.
dockerStrategyOptionsobjectDockerStrategyOptions contains extra strategy options for container image builds
envarray (EnvVar)env contains additional environment variables you want to pass into a builder container.
fromObjectReferencefrom is the reference to the ImageStreamTag that triggered the build.
kindstringKind 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
lastVersionintegerlastVersion (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.
metadataObjectMetametadata is the standard object’s metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
revisionobjectSourceRevision is the revision or commit information from the source for the build
sourceStrategyOptionsobjectSourceStrategyOptions contains extra strategy options for Source builds
triggeredByarraytriggeredBy describes which triggers started the most recent update to the build configuration and contains information about those triggers.
triggeredBy[]objectBuildTriggerCause 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.
triggeredByImageObjectReferencetriggeredByImage is the Image that triggered this build.

.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`
PropertyTypeDescription
asFilestringasFile 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 /webapp.war for the builder. If left empty, the Docker and Source build strategies assume this file is a zip, tar, or tar.gz file and extract it as the source. The custom strategy receives this binary as standard input. This filename may not contain slashes or be '..' or '.'.

.dockerStrategyOptions​

Description
DockerStrategyOptions contains extra strategy options for container image builds
Type
`object`
PropertyTypeDescription
buildArgsarray (EnvVar)Args contains any build arguments that are to be passed to Docker. See https://docs.docker.com/engine/reference/builder/#/arg for more details
noCachebooleannoCache overrides the docker-strategy noCache option in the build config

.revision​

Description
SourceRevision is the revision or commit information from the source for the build
Type
`object`
Required
  • type
PropertyTypeDescription
gitobjectGitSourceRevision is the commit information from a git source for a build
typestringtype of the build source, may be one of 'Source', 'Dockerfile', 'Binary', or 'Images'

.revision.git​

Description
GitSourceRevision is the commit information from a git source for a build
Type
`object`
PropertyTypeDescription
authorobjectSourceControlUser defines the identity of a user of source control
commitstringcommit is the commit hash identifying a specific commit
committerobjectSourceControlUser defines the identity of a user of source control
messagestringmessage is the description of a specific commit

.revision.git.author​

Description
SourceControlUser defines the identity of a user of source control
Type
`object`
PropertyTypeDescription
emailstringemail of the source control user
namestringname of the source control user

.revision.git.committer​

Description
SourceControlUser defines the identity of a user of source control
Type
`object`
PropertyTypeDescription
emailstringemail of the source control user
namestringname of the source control user

.sourceStrategyOptions​

Description
SourceStrategyOptions contains extra strategy options for Source builds
Type
`object`
PropertyTypeDescription
incrementalbooleanincremental overrides the source-strategy incremental option in the build config

.triggeredBy​

Description
triggeredBy describes which triggers started the most recent update to the build configuration and contains information about those triggers.
Type
`array`

.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`
PropertyTypeDescription
bitbucketWebHookobjectBitbucketWebHookCause has information about a Bitbucket webhook that triggered a build.
genericWebHookobjectGenericWebHookCause holds information about a generic WebHook that triggered a build.
githubWebHookobjectGitHubWebHookCause has information about a GitHub webhook that triggered a build.
gitlabWebHookobjectGitLabWebHookCause has information about a GitLab webhook that triggered a build.
imageChangeBuildobjectImageChangeCause contains information about the image that triggered a build
messagestringmessage is used to store a human readable message for why the build was triggered. E.g.: "Manually triggered by user", "Configuration change",etc.

.triggeredBy[].bitbucketWebHook​

Description
BitbucketWebHookCause has information about a Bitbucket webhook that triggered a build.
Type
`object`
PropertyTypeDescription
revisionobjectSourceRevision is the revision or commit information from the source for the build
secretstringsecret is the obfuscated webhook secret that triggered a build.

.triggeredBy[].bitbucketWebHook.revision​

Description
SourceRevision is the revision or commit information from the source for the build
Type
`object`
Required
  • type
PropertyTypeDescription
gitobjectGitSourceRevision is the commit information from a git source for a build
typestringtype of the build source, may be one of 'Source', 'Dockerfile', 'Binary', or 'Images'

.triggeredBy[].bitbucketWebHook.revision.git​

Description
GitSourceRevision is the commit information from a git source for a build
Type
`object`
PropertyTypeDescription
authorobjectSourceControlUser defines the identity of a user of source control
commitstringcommit is the commit hash identifying a specific commit
committerobjectSourceControlUser defines the identity of a user of source control
messagestringmessage is the description of a specific commit

.triggeredBy[].bitbucketWebHook.revision.git.author​

Description
SourceControlUser defines the identity of a user of source control
Type
`object`
PropertyTypeDescription
emailstringemail of the source control user
namestringname of the source control user

.triggeredBy[].bitbucketWebHook.revision.git.committer​

Description
SourceControlUser defines the identity of a user of source control
Type
`object`
PropertyTypeDescription
emailstringemail of the source control user
namestringname of the source control user

.triggeredBy[].genericWebHook​

Description
GenericWebHookCause holds information about a generic WebHook that triggered a build.
Type
`object`
PropertyTypeDescription
revisionobjectSourceRevision is the revision or commit information from the source for the build
secretstringsecret is the obfuscated webhook secret that triggered a build.

.triggeredBy[].genericWebHook.revision​

Description
SourceRevision is the revision or commit information from the source for the build
Type
`object`
Required
  • type
PropertyTypeDescription
gitobjectGitSourceRevision is the commit information from a git source for a build
typestringtype of the build source, may be one of 'Source', 'Dockerfile', 'Binary', or 'Images'

.triggeredBy[].genericWebHook.revision.git​

Description
GitSourceRevision is the commit information from a git source for a build
Type
`object`
PropertyTypeDescription
authorobjectSourceControlUser defines the identity of a user of source control
commitstringcommit is the commit hash identifying a specific commit
committerobjectSourceControlUser defines the identity of a user of source control
messagestringmessage is the description of a specific commit

.triggeredBy[].genericWebHook.revision.git.author​

Description
SourceControlUser defines the identity of a user of source control
Type
`object`
PropertyTypeDescription
emailstringemail of the source control user
namestringname of the source control user

.triggeredBy[].genericWebHook.revision.git.committer​

Description
SourceControlUser defines the identity of a user of source control
Type
`object`
PropertyTypeDescription
emailstringemail of the source control user
namestringname of the source control user

.triggeredBy[].githubWebHook​

Description
GitHubWebHookCause has information about a GitHub webhook that triggered a build.
Type
`object`
PropertyTypeDescription
revisionobjectSourceRevision is the revision or commit information from the source for the build
secretstringsecret is the obfuscated webhook secret that triggered a build.

.triggeredBy[].githubWebHook.revision​

Description
SourceRevision is the revision or commit information from the source for the build
Type
`object`
Required
  • type
PropertyTypeDescription
gitobjectGitSourceRevision is the commit information from a git source for a build
typestringtype of the build source, may be one of 'Source', 'Dockerfile', 'Binary', or 'Images'

.triggeredBy[].githubWebHook.revision.git​

Description
GitSourceRevision is the commit information from a git source for a build
Type
`object`
PropertyTypeDescription
authorobjectSourceControlUser defines the identity of a user of source control
commitstringcommit is the commit hash identifying a specific commit
committerobjectSourceControlUser defines the identity of a user of source control
messagestringmessage is the description of a specific commit

.triggeredBy[].githubWebHook.revision.git.author​

Description
SourceControlUser defines the identity of a user of source control
Type
`object`
PropertyTypeDescription
emailstringemail of the source control user
namestringname of the source control user

.triggeredBy[].githubWebHook.revision.git.committer​

Description
SourceControlUser defines the identity of a user of source control
Type
`object`
PropertyTypeDescription
emailstringemail of the source control user
namestringname of the source control user

.triggeredBy[].gitlabWebHook​

Description
GitLabWebHookCause has information about a GitLab webhook that triggered a build.
Type
`object`
PropertyTypeDescription
revisionobjectSourceRevision is the revision or commit information from the source for the build
secretstringsecret is the obfuscated webhook secret that triggered a build.

.triggeredBy[].gitlabWebHook.revision​

Description
SourceRevision is the revision or commit information from the source for the build
Type
`object`
Required
  • type
PropertyTypeDescription
gitobjectGitSourceRevision is the commit information from a git source for a build
typestringtype of the build source, may be one of 'Source', 'Dockerfile', 'Binary', or 'Images'

.triggeredBy[].gitlabWebHook.revision.git​

Description
GitSourceRevision is the commit information from a git source for a build
Type
`object`
PropertyTypeDescription
authorobjectSourceControlUser defines the identity of a user of source control
commitstringcommit is the commit hash identifying a specific commit
committerobjectSourceControlUser defines the identity of a user of source control
messagestringmessage is the description of a specific commit

.triggeredBy[].gitlabWebHook.revision.git.author​

Description
SourceControlUser defines the identity of a user of source control
Type
`object`
PropertyTypeDescription
emailstringemail of the source control user
namestringname of the source control user

.triggeredBy[].gitlabWebHook.revision.git.committer​

Description
SourceControlUser defines the identity of a user of source control
Type
`object`
PropertyTypeDescription
emailstringemail of the source control user
namestringname of the source control user

.triggeredBy[].imageChangeBuild​

Description
ImageChangeCause contains information about the image that triggered a build
Type
`object`
PropertyTypeDescription
fromRefObjectReferencefromRef contains detailed information about an image that triggered a build.
imageIDstringimageID is the ID of the image that triggered a new build.

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

/apis/build.openshift.io/v1/namespaces/{namespace}/builds/{name}/clone​

Global path parameters

ParameterTypeDescription
namestringname of the BuildRequest

Global query parameters

ParameterTypeDescription
dryRunstringWhen 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
fieldValidationstringfieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
HTTP method
`POST`
Description
create clone of a Build

Body parameters

ParameterTypeDescription
bodyBuildRequest schema

HTTP responses

HTTP codeReponse body
200 - OKBuildRequest schema
201 - CreatedBuildRequest schema
202 - AcceptedBuildRequest schema
401 - UnauthorizedEmpty

/apis/build.openshift.io/v1/namespaces/{namespace}/buildconfigs/{name}/instantiate​

Global path parameters

ParameterTypeDescription
namestringname of the BuildRequest

Global query parameters

ParameterTypeDescription
dryRunstringWhen 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
fieldValidationstringfieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
HTTP method
`POST`
Description
create instantiate of a BuildConfig

Body parameters

ParameterTypeDescription
bodyBuildRequest schema

HTTP responses

HTTP codeReponse body
200 - OKBuild schema
201 - CreatedBuild schema
202 - AcceptedBuild schema
401 - UnauthorizedEmpty