Skip to content

Commit 913724e

Browse files
authored
Merge pull request #9 from brainpodnl/feat/add-docs-for-builds
feat: add docs for builds
2 parents 74811c9 + 862379a commit 913724e

1 file changed

Lines changed: 105 additions & 0 deletions

File tree

src/builds.md

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
---
2+
order: 5
3+
hide_menu: false
4+
metas:
5+
description: "Automate container image builds on Brainpod by connecting a GitHub repository. Learn how to set up CI/CD, understand build states, and use build artifacts in your apps."
6+
keywords: ["Brainpod builds", "CI/CD", "GitHub Actions", "container build", "automated deployment", "build pipeline", "artifacts"]
7+
---
8+
# Builds
9+
10+
Builds give you an automated pipeline from GitHub push to running container. Connect a repository to an app, merge the onboarding PR, and Brainpod automatically builds a new container image every time you push.
11+
12+
## How Builds Work
13+
14+
When you connect a repository to an app, Brainpod opens a pull request in that repository. The PR adds a GitHub Actions workflow that handles building and pushing your container image to your pod's private registry on every push to the configured branch.
15+
16+
Once you merge that PR, the pipeline is active. From that point on:
17+
18+
1. You push code to GitHub
19+
2. The GitHub Actions workflow builds your container image
20+
3. The image is pushed to `registry.brainpod.io/<podname>/`
21+
4. The build appears in the Builds page with status and metadata
22+
23+
Brainpod does not run the build itself — GitHub Actions does. Brainpod tracks the result and stores the artifact so you can reference it in your app.
24+
25+
## Setting Up Builds
26+
27+
### Step 1: Connect GitHub
28+
29+
Before you can connect a repository, your GitHub account needs to be linked to your pod.
30+
31+
1. Go to **Settings** in your pod
32+
2. Under the **GitHub** section, click **Connect GitHub**
33+
3. Authorize the Brainpod GitHub App and select which repositories it can access
34+
35+
You only need to do this once per GitHub account. The connection is shared across all apps in your pod.
36+
37+
### Step 2: Connect a Repository to an App
38+
39+
Each build pipeline is tied to a specific app. To connect a repository:
40+
41+
1. Open the app you want to deploy from GitHub (create one first if needed)
42+
2. Click **Connect Repository** in the app editor
43+
3. Select the repository from the list
44+
45+
If the repository hasn't been onboarded before, Brainpod will open a pull request in it. This PR adds the GitHub Actions workflow file to your repository.
46+
47+
### Step 3: Merge the Onboarding PR
48+
49+
Review the PR Brainpod created and merge it. The workflow it adds will:
50+
51+
- Build a Docker image from your repository
52+
- Push it to `registry.brainpod.io/<podname>/`
53+
- Report the build status back to Brainpod
54+
55+
Once merged, your pipeline is live. The next push to the configured branch will trigger a build.
56+
57+
## Build States
58+
59+
Each build goes through the following states:
60+
61+
| State | Meaning |
62+
|---|---|
63+
| **Waiting** | Build triggered, waiting for a runner |
64+
| **Pending** | Build is actively running |
65+
| **Ready** | Build completed successfully, artifact available |
66+
| **Failed** | Build encountered an error |
67+
| **Cancelled** | Build was cancelled before completion |
68+
69+
Active builds (waiting and pending) are shown at the top of the list, separated from the build history.
70+
71+
## Build Details
72+
73+
Click any build row to expand its details:
74+
75+
- **Repository**: The GitHub repository that triggered the build
76+
- **Workflow**: The GitHub Actions workflow name
77+
- **Commit**: The full Git commit SHA
78+
- **Branch**: The branch the commit was pushed to
79+
- **State**: Current build state
80+
- **Created / Finished**: Timestamps and total duration
81+
- **Artifacts**: Container images produced by the build, with their full registry URI
82+
83+
## Artifacts
84+
85+
When a build succeeds, it produces one or more artifacts — container images stored in your pod's private registry. Each artifact has:
86+
87+
- A **name** (e.g. `app`)
88+
- A **URI** pointing to the exact image (e.g. `registry.brainpod.io/<podname>/web@sha256:...`)
89+
90+
You can copy the URI directly from the build details panel and use it in your app's image field. This lets you pin an app to a specific build rather than a floating tag like `latest`.
91+
92+
## Filtering Builds
93+
94+
Use the filter bar at the top of the Builds page to narrow down the list:
95+
96+
- **Repository**: Show builds from a specific GitHub repository
97+
- **Branch**: Show builds from a specific branch
98+
99+
Click **Clear filters** to reset.
100+
101+
## Next Steps
102+
103+
- [Container Registry](registry.md): Understand where build artifacts are stored
104+
- [Apps](resources/apps.md): Configure an app to use a built image
105+
- [Getting Started](getting-started.md): Deploy your first application

0 commit comments

Comments
 (0)