Skip to content

build.v1.buildConfigSpec

"BuildConfigSpec describes when and how builds are created"

Index

Fields

fn withCompletionDeadlineSeconds

withCompletionDeadlineSeconds(completionDeadlineSeconds)

"completionDeadlineSeconds is an optional duration in seconds, counted from the time when a build pod gets scheduled in the system, that the build may be active on a node before the system actively tries to terminate the build; value must be positive integer"

fn withFailedBuildsHistoryLimit

withFailedBuildsHistoryLimit(failedBuildsHistoryLimit)

"failedBuildsHistoryLimit is the number of old failed builds to retain. If not specified, all failed builds are retained."

fn withNodeSelector

withNodeSelector(nodeSelector)

"nodeSelector is a selector which must be true for the build pod to fit on a node If nil, it can be overridden by default build nodeselector values for the cluster. If set to an empty map or a map with any values, default build nodeselector values are ignored."

fn withNodeSelectorMixin

withNodeSelectorMixin(nodeSelector)

"nodeSelector is a selector which must be true for the build pod to fit on a node If nil, it can be overridden by default build nodeselector values for the cluster. If set to an empty map or a map with any values, default build nodeselector values are ignored."

Note: This function appends passed data to existing values

fn withRunPolicy

withRunPolicy(runPolicy)

"RunPolicy describes how the new build created from this build configuration will be scheduled for execution. This is optional, if not specified we default to \"Serial\"."

fn withServiceAccount

withServiceAccount(serviceAccount)

"serviceAccount is the name of the ServiceAccount to use to run the pod created by this build. The pod will be allowed to use secrets referenced by the ServiceAccount"

fn withSuccessfulBuildsHistoryLimit

withSuccessfulBuildsHistoryLimit(successfulBuildsHistoryLimit)

"successfulBuildsHistoryLimit is the number of old successful builds to retain. If not specified, all successful builds are retained."

fn withTriggers

withTriggers(triggers)

"triggers determine how new Builds can be launched from a BuildConfig. If no triggers are defined, a new build can only occur as a result of an explicit client build creation."

fn withTriggersMixin

withTriggersMixin(triggers)

"triggers determine how new Builds can be launched from a BuildConfig. If no triggers are defined, a new build can only occur as a result of an explicit client build creation."

Note: This function appends passed data to existing values

obj output

"BuildOutput is input to a build strategy and describes the Docker image that the strategy should produce."

fn output.withImageLabels

withImageLabels(imageLabels)

"imageLabels define a list of labels that are applied to the resulting image. If there are multiple labels with the same name then the last one in the list is used."

fn output.withImageLabelsMixin

withImageLabelsMixin(imageLabels)

"imageLabels define a list of labels that are applied to the resulting image. If there are multiple labels with the same name then the last one in the list is used."

Note: This function appends passed data to existing values

obj output.pushSecret

"LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace."

fn output.pushSecret.withName

withName(name)

"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names"

obj output.to

"ObjectReference contains enough information to let you inspect or modify the referred object."

fn output.to.withApiVersion

withApiVersion(apiVersion)

"API version of the referent."

fn output.to.withFieldPath

withFieldPath(fieldPath)

"If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: \"spec.containers{name}\" (where \"name\" refers to the name of the container that triggered the event) or if no container name is specified \"spec.containers[2]\" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object."

fn output.to.withKind

withKind(kind)

"Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds"

fn output.to.withName

withName(name)

"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names"

fn output.to.withNamespace

withNamespace(namespace)

"Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/"

fn output.to.withResourceVersion

withResourceVersion(resourceVersion)

"Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency"

fn output.to.withUid

withUid(uid)

"UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids"

obj postCommit

"A BuildPostCommitSpec holds a build post commit hook specification. The hook executes a command in a temporary container running the build output image, immediately after the last layer of the image is committed and before the image is pushed to a registry. The command is executed with the current working directory ($PWD) set to the image's WORKDIR.\n\nThe build will be marked as failed if the hook execution fails. It will fail if the script or command return a non-zero exit code, or if there is any other error related to starting the temporary container.\n\nThere are five different ways to configure the hook. As an example, all forms below are equivalent and will execute rake test --verbose.\n\n1. Shell script:\n\n \"postCommit\": {\n \"script\": \"rake test --verbose\",\n }\n\n The above is a convenient form which is equivalent to:\n\n \"postCommit\": {\n \"command\": [\"/bin/sh\", \"-ic\"],\n \"args\": [\"rake test --verbose\"]\n }\n\n2. A command as the image entrypoint:\n\n \"postCommit\": {\n \"commit\": [\"rake\", \"test\", \"--verbose\"]\n }\n\n Command overrides the image entrypoint in the exec form, as documented in\n Docker: https://docs.docker.com/engine/reference/builder/#entrypoint.\n\n3. Pass arguments to the default entrypoint:\n\n \"postCommit\": {\n\t\t \"args\": [\"rake\", \"test\", \"--verbose\"]\n\t }\n\n This form is only useful if the image entrypoint can handle arguments.\n\n4. Shell script with arguments:\n\n \"postCommit\": {\n \"script\": \"rake test $1\",\n \"args\": [\"--verbose\"]\n }\n\n This form is useful if you need to pass arguments that would otherwise be\n hard to quote properly in the shell script. In the script, $0 will be\n \"/bin/sh\" and $1, $2, etc, are the positional arguments from Args.\n\n5. Command with arguments:\n\n \"postCommit\": {\n \"command\": [\"rake\", \"test\"],\n \"args\": [\"--verbose\"]\n }\n\n This form is equivalent to appending the arguments to the Command slice.\n\nIt is invalid to provide both Script and Command simultaneously. If none of the fields are specified, the hook is not executed."

fn postCommit.withArgs

withArgs(args)

"args is a list of arguments that are provided to either Command, Script or the Docker image's default entrypoint. The arguments are placed immediately after the command to be run."

fn postCommit.withArgsMixin

withArgsMixin(args)

"args is a list of arguments that are provided to either Command, Script or the Docker image's default entrypoint. The arguments are placed immediately after the command to be run."

Note: This function appends passed data to existing values

fn postCommit.withCommand

withCommand(command)

"command is the command to run. It may not be specified with Script. This might be needed if the image doesn't have /bin/sh, or if you do not want to use a shell. In all other cases, using Script might be more convenient."

fn postCommit.withCommandMixin

withCommandMixin(command)

"command is the command to run. It may not be specified with Script. This might be needed if the image doesn't have /bin/sh, or if you do not want to use a shell. In all other cases, using Script might be more convenient."

Note: This function appends passed data to existing values

fn postCommit.withScript

withScript(script)

"script is a shell script to be run with /bin/sh -ic. It may not be specified with Command. Use Script when a shell script is appropriate to execute the post build hook, for example for running unit tests with rake test. If you need control over the image entrypoint, or if the image does not have /bin/sh, use Command and/or Args. The -i flag is needed to support CentOS and RHEL images that use Software Collections (SCL), in order to have the appropriate collections enabled in the shell. E.g., in the Ruby image, this is necessary to make ruby, bundle and other binaries available in the PATH."

obj resources

"ResourceRequirements describes the compute resource requirements."

fn resources.withLimits

withLimits(limits)

"Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/"

fn resources.withLimitsMixin

withLimitsMixin(limits)

"Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/"

Note: This function appends passed data to existing values

fn resources.withRequests

withRequests(requests)

"Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/"

fn resources.withRequestsMixin

withRequestsMixin(requests)

"Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/"

Note: This function appends passed data to existing values

obj revision

"SourceRevision is the revision or commit information from the source for the build"

fn revision.withType

withType(type)

"type of the build source, may be one of 'Source', 'Dockerfile', 'Binary', or 'Images'"

obj revision.git

"GitSourceRevision is the commit information from a git source for a build"

fn revision.git.withCommit

withCommit(commit)

"commit is the commit hash identifying a specific commit"

fn revision.git.withMessage

withMessage(message)

"message is the description of a specific commit"

obj revision.git.author

"SourceControlUser defines the identity of a user of source control"

fn revision.git.author.withEmail

withEmail(email)

"email of the source control user"

fn revision.git.author.withName

withName(name)

"name of the source control user"

obj revision.git.committer

"SourceControlUser defines the identity of a user of source control"

fn revision.git.committer.withEmail

withEmail(email)

"email of the source control user"

fn revision.git.committer.withName

withName(name)

"name of the source control user"

obj source

"BuildSource is the SCM used for the build."

fn source.withConfigMaps

withConfigMaps(configMaps)

"configMaps represents a list of configMaps and their destinations that will be used for the build."

fn source.withConfigMapsMixin

withConfigMapsMixin(configMaps)

"configMaps represents a list of configMaps and their destinations that will be used for the build."

Note: This function appends passed data to existing values

fn source.withContextDir

withContextDir(contextDir)

"contextDir specifies the sub-directory where the source code for the application exists. This allows to have buildable sources in directory other than root of repository."

fn source.withDockerfile

withDockerfile(dockerfile)

"dockerfile is the raw contents of a Dockerfile which should be built. When this option is specified, the FROM may be modified based on your strategy base image and additional ENV stanzas from your strategy environment will be added after the FROM, but before the rest of your Dockerfile stanzas. The Dockerfile source type may be used with other options like git - in those cases the Git repo will have any innate Dockerfile replaced in the context dir."

fn source.withImages

withImages(images)

"images describes a set of images to be used to provide source for the build"

fn source.withImagesMixin

withImagesMixin(images)

"images describes a set of images to be used to provide source for the build"

Note: This function appends passed data to existing values

fn source.withSecrets

withSecrets(secrets)

"secrets represents a list of secrets and their destinations that will be used only for the build."

fn source.withSecretsMixin

withSecretsMixin(secrets)

"secrets represents a list of secrets and their destinations that will be used only for the build."

Note: This function appends passed data to existing values

fn source.withType

withType(type)

"type of build input to accept"

obj source.binary

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

fn source.binary.withAsFile

withAsFile(asFile)

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

obj source.git

"GitBuildSource defines the parameters of a Git SCM"

fn source.git.withHttpProxy

withHttpProxy(httpProxy)

"httpProxy is a proxy used to reach the git repository over http"

fn source.git.withHttpsProxy

withHttpsProxy(httpsProxy)

"httpsProxy is a proxy used to reach the git repository over https"

fn source.git.withNoProxy

withNoProxy(noProxy)

"noProxy is the list of domains for which the proxy should not be used"

fn source.git.withRef

withRef(ref)

"ref is the branch/tag/ref to build."

fn source.git.withUri

withUri(uri)

"uri points to the source that will be built. The structure of the source will depend on the type of build to run"

obj source.sourceSecret

"LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace."

fn source.sourceSecret.withName

withName(name)

"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names"

obj strategy

"BuildStrategy contains the details of how to perform a build."

fn strategy.withType

withType(type)

"type is the kind of build strategy."

obj strategy.customStrategy

"CustomBuildStrategy defines input parameters specific to Custom build."

fn strategy.customStrategy.withBuildAPIVersion

withBuildAPIVersion(buildAPIVersion)

"buildAPIVersion is the requested API version for the Build object serialized and passed to the custom builder"

fn strategy.customStrategy.withEnv

withEnv(env)

"env contains additional environment variables you want to pass into a builder container."

fn strategy.customStrategy.withEnvMixin

withEnvMixin(env)

"env contains additional environment variables you want to pass into a builder container."

Note: This function appends passed data to existing values

fn strategy.customStrategy.withExposeDockerSocket

withExposeDockerSocket(exposeDockerSocket)

"exposeDockerSocket will allow running Docker commands (and build Docker images) from inside the Docker container."

fn strategy.customStrategy.withForcePull

withForcePull(forcePull)

"forcePull describes if the controller should configure the build pod to always pull the images for the builder or only pull if it is not present locally"

fn strategy.customStrategy.withSecrets

withSecrets(secrets)

"secrets is a list of additional secrets that will be included in the build pod"

fn strategy.customStrategy.withSecretsMixin

withSecretsMixin(secrets)

"secrets is a list of additional secrets that will be included in the build pod"

Note: This function appends passed data to existing values

obj strategy.customStrategy.from

"ObjectReference contains enough information to let you inspect or modify the referred object."

fn strategy.customStrategy.from.withApiVersion

withApiVersion(apiVersion)

"API version of the referent."

fn strategy.customStrategy.from.withFieldPath

withFieldPath(fieldPath)

"If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: \"spec.containers{name}\" (where \"name\" refers to the name of the container that triggered the event) or if no container name is specified \"spec.containers[2]\" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object."

fn strategy.customStrategy.from.withKind

withKind(kind)

"Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds"

fn strategy.customStrategy.from.withName

withName(name)

"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names"

fn strategy.customStrategy.from.withNamespace

withNamespace(namespace)

"Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/"

fn strategy.customStrategy.from.withResourceVersion

withResourceVersion(resourceVersion)

"Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency"

fn strategy.customStrategy.from.withUid

withUid(uid)

"UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids"

obj strategy.customStrategy.pullSecret

"LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace."

fn strategy.customStrategy.pullSecret.withName

withName(name)

"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names"

obj strategy.dockerStrategy

"DockerBuildStrategy defines input parameters specific to Docker build."

fn strategy.dockerStrategy.withBuildArgs

withBuildArgs(buildArgs)

"buildArgs contains build arguments that will be resolved in the Dockerfile. See https://docs.docker.com/engine/reference/builder/#/arg for more details."

fn strategy.dockerStrategy.withBuildArgsMixin

withBuildArgsMixin(buildArgs)

"buildArgs contains build arguments that will be resolved in the Dockerfile. See https://docs.docker.com/engine/reference/builder/#/arg for more details."

Note: This function appends passed data to existing values

fn strategy.dockerStrategy.withDockerfilePath

withDockerfilePath(dockerfilePath)

"dockerfilePath is the path of the Dockerfile that will be used to build the Docker image, relative to the root of the context (contextDir)."

fn strategy.dockerStrategy.withEnv

withEnv(env)

"env contains additional environment variables you want to pass into a builder container."

fn strategy.dockerStrategy.withEnvMixin

withEnvMixin(env)

"env contains additional environment variables you want to pass into a builder container."

Note: This function appends passed data to existing values

fn strategy.dockerStrategy.withForcePull

withForcePull(forcePull)

"forcePull describes if the builder should pull the images from registry prior to building."

fn strategy.dockerStrategy.withImageOptimizationPolicy

withImageOptimizationPolicy(imageOptimizationPolicy)

"imageOptimizationPolicy describes what optimizations the system can use when building images to reduce the final size or time spent building the image. The default policy is 'None' which means the final build image will be equivalent to an image created by the Docker build API. The experimental policy 'SkipLayers' will avoid commiting new layers in between each image step, and will fail if the Dockerfile cannot provide compatibility with the 'None' policy. An additional experimental policy 'SkipLayersAndWarn' is the same as 'SkipLayers' but simply warns if compatibility cannot be preserved."

fn strategy.dockerStrategy.withNoCache

withNoCache(noCache)

"noCache if set to true indicates that the docker build must be executed with the --no-cache=true flag"

obj strategy.dockerStrategy.from

"ObjectReference contains enough information to let you inspect or modify the referred object."

fn strategy.dockerStrategy.from.withApiVersion

withApiVersion(apiVersion)

"API version of the referent."

fn strategy.dockerStrategy.from.withFieldPath

withFieldPath(fieldPath)

"If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: \"spec.containers{name}\" (where \"name\" refers to the name of the container that triggered the event) or if no container name is specified \"spec.containers[2]\" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object."

fn strategy.dockerStrategy.from.withKind

withKind(kind)

"Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds"

fn strategy.dockerStrategy.from.withName

withName(name)

"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names"

fn strategy.dockerStrategy.from.withNamespace

withNamespace(namespace)

"Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/"

fn strategy.dockerStrategy.from.withResourceVersion

withResourceVersion(resourceVersion)

"Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency"

fn strategy.dockerStrategy.from.withUid

withUid(uid)

"UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids"

obj strategy.dockerStrategy.pullSecret

"LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace."

fn strategy.dockerStrategy.pullSecret.withName

withName(name)

"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names"

obj strategy.jenkinsPipelineStrategy

"JenkinsPipelineBuildStrategy holds parameters specific to a Jenkins Pipeline build."

fn strategy.jenkinsPipelineStrategy.withEnv

withEnv(env)

"env contains additional environment variables you want to pass into a build pipeline."

fn strategy.jenkinsPipelineStrategy.withEnvMixin

withEnvMixin(env)

"env contains additional environment variables you want to pass into a build pipeline."

Note: This function appends passed data to existing values

fn strategy.jenkinsPipelineStrategy.withJenkinsfile

withJenkinsfile(jenkinsfile)

"Jenkinsfile defines the optional raw contents of a Jenkinsfile which defines a Jenkins pipeline build."

fn strategy.jenkinsPipelineStrategy.withJenkinsfilePath

withJenkinsfilePath(jenkinsfilePath)

"JenkinsfilePath is the optional path of the Jenkinsfile that will be used to configure the pipeline relative to the root of the context (contextDir). If both JenkinsfilePath & Jenkinsfile are both not specified, this defaults to Jenkinsfile in the root of the specified contextDir."

obj strategy.sourceStrategy

"SourceBuildStrategy defines input parameters specific to an Source build."

fn strategy.sourceStrategy.withEnv

withEnv(env)

"env contains additional environment variables you want to pass into a builder container."

fn strategy.sourceStrategy.withEnvMixin

withEnvMixin(env)

"env contains additional environment variables you want to pass into a builder container."

Note: This function appends passed data to existing values

fn strategy.sourceStrategy.withForcePull

withForcePull(forcePull)

"forcePull describes if the builder should pull the images from registry prior to building."

fn strategy.sourceStrategy.withIncremental

withIncremental(incremental)

"incremental flag forces the Source build to do incremental builds if true."

fn strategy.sourceStrategy.withScripts

withScripts(scripts)

"scripts is the location of Source scripts"

obj strategy.sourceStrategy.from

"ObjectReference contains enough information to let you inspect or modify the referred object."

fn strategy.sourceStrategy.from.withApiVersion

withApiVersion(apiVersion)

"API version of the referent."

fn strategy.sourceStrategy.from.withFieldPath

withFieldPath(fieldPath)

"If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: \"spec.containers{name}\" (where \"name\" refers to the name of the container that triggered the event) or if no container name is specified \"spec.containers[2]\" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object."

fn strategy.sourceStrategy.from.withKind

withKind(kind)

"Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds"

fn strategy.sourceStrategy.from.withName

withName(name)

"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names"

fn strategy.sourceStrategy.from.withNamespace

withNamespace(namespace)

"Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/"

fn strategy.sourceStrategy.from.withResourceVersion

withResourceVersion(resourceVersion)

"Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency"

fn strategy.sourceStrategy.from.withUid

withUid(uid)

"UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids"

obj strategy.sourceStrategy.pullSecret

"LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace."

fn strategy.sourceStrategy.pullSecret.withName

withName(name)

"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names"