Skip to main content
At a high level, a build takes source code and produces a container image that can run across your application stack — frontend, middleware, backend, etc. This is the same concept as running docker build with a Dockerfile to produce a runnable image.
A simplified architecture diagram showing a dark "Code Base" panel with sections labeled Frontend, Middleware, and Backend. A red user icon on the left connects to the code base, which links to three red package/service icons on the right.
In OpenShift, a BuildConfig is the declarative resource that describes how to transform source code into a container image. A BuildConfig typically defines:
  • where the source lives (git repo, binary, or other),
  • which build strategy to use (source-to-image, Dockerfile, or pipeline),
  • where the resulting image should be pushed (ImageStream or external registry),
  • triggers that automatically start builds (GitHub, generic webhooks, image changes),
  • and any post-build steps (tests or scripts).
Example BuildConfig (typical fields and structure):
BuildConfigs are often generated automatically (for example, when importing an application image, using the web console, or certain CLI workflows). You do not always need to author them by hand, but understanding the fields helps you customize and automate builds.
Key concepts to remember:
  • A build is the process that turns source code into a runnable container image.
  • A BuildConfig is the declarative definition of that process: it specifies the source, strategy, output, triggers, and post-build steps that orchestrate the build lifecycle.
  • Build strategies determine how the image is created (S2I, Dockerfile, or pipelines). The sample above uses a sourceStrategy referencing an ImageStreamTag.
BuildConfig field reference (summary)
Be careful with webhook secrets embedded in BuildConfig YAML (the sample uses secret101). Treat webhook and registry secrets as sensitive: store them securely and rotate them regularly. Prefer using OpenShift Secrets and secure automation to avoid exposing credentials in plain YAML.
See also and further reading:

Watch Video