Build
We have repeteadly talked about Build in both Project documentation and Initial Build documentation. A build is basically a template of an OS, libraries and other dependencies of the project you deploy.
Build creation
To create a Build you only need four parameters, only the Project field is required as the other three are, if not set, wait until this access is automatically enabled are chosen by default:
- Project: Refers to what we call ProjectEnv, here you choose which ProjectEnv you want to build.
- Branch: Lets you choose any branch of the repository that you've chosen as Project. Defaults to Environment name.
- Commit hash: You can also choose the commit has to build a specific commit and not the last one as we do by default. Defaults to last commit.
- Tag: Just a tag to differentiate builds. Defaults to 'latest'.
Why do we need to Build a Docker image?
As we use Helm charts we need the image because is what they use to deploy a Kubernetes Release.
Remember that you need a Build to update the code that the Deployment runs inside the Kubernetes Cluster.
SleakOps has its own CLI Tool that you can use to automate Builds and Deployments in your CI/CD. More info here.
FAQs
Why is my build failing or getting killed?
Before assuming it's a resource issue, check your build logs to identify the actual cause of failure. Look for specific error messages that indicate resource constraints like OOMKilled or resource limit errors.
If your build process is failing unexpectedly or being terminated, it's often due to insufficient resources (CPU or memory) allocated for the build process. The Pod running the build may be killed by Kubernetes when it exceeds the configured resource limits.
Common symptoms:
- Build fails with OOMKilled (Out of Memory) errors
- Build process stops mid-execution without clear error messages
- Build is extremely slow or appears frozen
Solution: Increase the build resources in Project → Settings → Deploy Build Resources. See the Deploy Build Resources documentation for detailed instructions on how to adjust CPU and memory allocations.