Builders
CodeDirect Builders Reference
This document describes the configuration attributes available for CodeDirect Builders. A Builder is responsible for performing builds based on the configuration provided. It defines the source context, build resources, build triggers, and target destination for building and storing a container image.
Build context
These settings define the source materials and file inputs used during the build process.
Source repository
The source repository that contains the Dockerfile from which the image will be built.
Files
A list of specific files to include in the build context. Use this to include required configuration files or assets that exist outside of the source repository but are needed in the build context at build time. Template substitution can be used to inject secrets into these included files.
Image destination
These settings determine where the final container image will be stored after a successful build.
Image registry
The image registry where the image will be pushed. This service must be pre-configured in your Providers settings before it can be selected here.
Image repository
The specific repository name within the selected registry where the image will be stored.
Image tags
A list of custom tags to apply to the image. You can define static tags (e.g., production) or use dynamic variables to automatically include build metadata.
To use a variable, wrap the variable name in $():
$(BRANCH): The name of the git branch (e.g.,main).- Usage:
branch-$(BRANCH)
- Usage:
$(COMMIT): The specific git commit short sha.- Usage:
build-$(COMMIT)
- Usage:
$(DATE): The date the build occurred. This variable optionally accepts a Rubystrftimeformat string inside parentheses.- Usage:
$(DATE(%Y%m%d))resolves to20250115 - Usage:
v1.$(DATE(%m-%d))resolves tov1.01-15
- Usage:
Include commit tags?
- Enabled: Tags associated with the Git commit will be included as tags when pushed to the target repository.
- Disabled: Tags associated with the Git commit will be ignored.
Build configuration
These settings control the technical execution of the build and the resources allocated to it.
Dockerfile path
The path to the Dockerfile within your source repository (relative to the root). This file contains the instructions used to create the image.
Platform
The target architecture for the image.
- linux/amd64: Standard Intel/AMD 64-bit architecture.
- linux/arm64: ARM-based 64-bit architecture.
CPU
The amount of CPU computing power allocated to the build runner. 1000 millicores equals 1 full CPU core.
Memory
The amount of RAM allocated to the build runner, measured in Mebibytes (MiB).
Build triggers
These settings define the automation rules for when a build should start.
Included branches
A list of branches that will trigger this builder. You can use wildcards (*) to match multiple branches (e.g., feature/* matches all feature branches). If no included branches are specified, all branches are included.
Excluded branches
A list of branches to ignore, even if they match the Included branches list. This is useful for preventing builds on specific maintenance or test branches.
Build on commit
- Enabled: A build starts automatically whenever code is pushed to a matching branch.
- Disabled: Builds must be started manually.
Feedback
Was this page helpful?
Glad to hear it! Have any more feedback? Please share it here.
Sorry to hear that. Have any more feedback? Please share it here.